# Business Logic — FUW00928SF01DBean.typeModelData() [39 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00928SF.FUW00928SF01DBean` |
| Layer | View / DBean (Data Bean) — part of the Web Client tier that bridges the presentation layer with business logic |
| Module | `FUW00928SF` (Package: `eo.web.webview.FUW00928SF`) |

## 1. Role

### FUW00928SF01DBean.typeModelData()

This method serves as a **data type descriptor resolver** for the Web Client 2.0 framework (X33). It maps specific item names (key) and sub-keys (subkey) to their corresponding Java `Class<?>` types, enabling the framework to perform **data type validation and rendering** on dynamic form fields. The method implements a **lookup/routing pattern**: given a field identifier and a sub-property descriptor, it returns the expected Java type (e.g., `String.class`, `Boolean.class`) so the UI framework knows how to render and validate that field.

The method handles two **telecom service operator fields** in the order data entry screen (Screen module FUW00928SF):

1. **Communication Service Provider Code** (項目ID: `tsjgs_cd`) — represents the telecom carrier assigned to a service contract.
2. **Communication Service Provider Name** (項目ID: `tsjgs_nm`) — represents the human-readable name of the telecom carrier.

For each item, the method resolves sub-keys: `value` (the data itself), `enable` (editability flag), and `state` (display state). This follows a **dispatch/routing design pattern** that is part of a broader `typeModelData` protocol shared across dozens of DBean classes in the X33 framework. No external services, database operations, or cross-module calls are performed — this is a **pure lookup utility** with zero side effects.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData key, subkey"])
    NULL_CHECK{"key or subkey
is null"}
    NULL_CHECK -- Yes --> RETURN_NULL_1(["return null"])
    NULL_CHECK -- No --> COMPUTE_SEPERATER["int separaterPoint = key.indexOf('/')"]
    COMPUTE_SEPERATER --> KEY_CHECK_1{"key equals
通信事業者コード"}

    KEY_CHECK_1 -- Yes --> SUBKEY_V1{"subkey equals
\"value\""}
    SUBKEY_V1 -- Yes --> RET_STR_TSJGS_CD["return String.class"]
    SUBKEY_V1 -- No --> SUBKEY_E1{"subkey equals
\"enable\""}
    SUBKEY_E1 -- Yes --> RET_BOOL_TSJGS_CD["return Boolean.class"]
    SUBKEY_E1 -- No --> SUBKEY_S1{"subkey equals
\"state\""}
    SUBKEY_S1 -- Yes --> RET_STR_TSJGS_CD_S["return String.class"]
    SUBKEY_S1 -- No --> NEXT_CHECK
    KEY_CHECK_1 -- No --> NEXT_CHECK{"key equals
通信事業者名"}

    NEXT_CHECK -- Yes --> SUBKEY_V2{"subkey equals
\"value\""}
    SUBKEY_V2 -- Yes --> RET_STR_TSJGS_NM["return String.class"]
    SUBKEY_V2 -- No --> SUBKEY_E2{"subkey equals
\"enable\""}
    SUBKEY_E2 -- Yes --> RET_BOOL_TSJGS_NM["return Boolean.class"]
    SUBKEY_E2 -- No --> SUBKEY_S2{"subkey equals
\"state\""}
    SUBKEY_S2 -- Yes --> RET_STR_TSJGS_NM_S["return String.class"]
    SUBKEY_S2 -- No --> RET_NULL_2
    NEXT_CHECK -- No --> RET_NULL_2(["return null"])

    RET_NULL_1 --> END(["End"])
    RET_STR_TSJGS_CD --> END
    RET_BOOL_TSJGS_CD --> END
    RET_STR_TSJGS_CD_S --> END
    RET_STR_TSJGS_NM --> END
    RET_BOOL_TSJGS_NM --> END
    RET_STR_TSJGS_NM_S --> END
    RET_NULL_2 --> END
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The **item name** (項目名) that identifies a specific field in the order data entry screen. It determines which business entity the type lookup targets. Currently supports two values: `"通信事業者コード"` (Communication Service Provider Code — item ID: `tsjgs_cd`) and `"通信事業者名"` (Communication Service Provider Name — item ID: `tsjgs_nm`). Case-sensitive comparison. |
| 2 | `subkey` | `String` | The **sub-key** (サブキー) that specifies which property/aspect of the field is being queried. Controls the return type. Supported values (case-insensitive): `"value"` (the data field itself), `"enable"` (editability status), `"state"` (display state). |

**External/instance state read:** None. This method is purely functional — it reads no instance fields and has no dependencies on external state.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no external services, SC codes, or CBS codes**. It is a pure in-memory type lookup.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (none) | — | — | — | — |

## 5. Dependency Trace

The `typeModelData` method is part of a framework protocol. The search results show this method signature is shared across **17+ DBean classes** within the webview module. In `FUW00928SF`, this specific method has **no known callers** identified in the codebase search.

The `typeModelData(String key, String subkey)` pattern is implemented by multiple DBean classes (e.g., `FUW00912SF01DBean`, `FUW00926SF01DBean`, `FUW00959SF01DBean`, `FUW00964SF01DBean`) which delegate to this method from their parent `*SFBean` classes, which implement the `X33VDataTypeList` interface.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | — | No callers found within FUW00928SF module | — |

**Note:** The `typeModelData` protocol is a generic X33 framework mechanism invoked through the `X33VListedBeanInterface` interface. In related modules (e.g., `FUW00912SF`, `FUW00959SF`), the parent bean generates `keyElement` strings via `createListKey()` and calls `typeModelData(keyElement, subkey)` to determine field rendering types. The specific FUW00928SF implementation handles only two fields.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null guard) `(key == null || subkey == null)` (L275)

> Guard clause: if either parameter is null, return null immediately. This prevents NullPointerException on the subsequent string comparisons.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // 項目名とサブキーがnullの場合はnullを返す (Returns null if key or subkey is null) |

**Block 2** — SET (separator index computation) (L279)

> Computes the index of the first `/` character in `key`. The result is stored but never used in the current implementation — this appears to be legacy code or preparation for future key-composition features.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // 区切り位置を計算 (Compute the separator position) |

**Block 3** — IF/ELSE-IF/ELSE (key dispatch: 通信事業者コード) `(key.equals("通信事業者コード"))` (L282)

> Branch for the Communication Service Provider Code field (item ID: `tsjgs_cd`). This field identifies which telecom carrier is assigned to a service contract. The subkey determines which aspect of the field's type metadata to return.

**Block 3.1** — IF `(subkey.equalsIgnoreCase("value"))` (L283)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class;` // データ型はString (The data type is String) |

**Block 3.2** — ELSE-IF `(subkey.equalsIgnoreCase("enable"))` (L286)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return Boolean.class;` // イネーブルフラグの型はBoolean (Enable flag type is Boolean) |

**Block 3.3** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L289)

> The comment states: subkey that is "state" returns state type. (subkeyが"state"の場合、ステータスを返す。)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class;` // stateのサブキーの場合、ステータスを返す (When subkey is "state", returns state type) |

**Block 3.4** — ELSE (implicit fall-through) (L292)

> No matching subkey for 通信事業者コード — falls through to the next key check.

**Block 4** — ELSE-IF (key dispatch: 通信事業者名) `(key.equals("通信事業者名"))` (L295)

> Branch for the Communication Service Provider Name field (item ID: `tsjgs_nm`). This field stores the display name of the telecom carrier. Same subkey handling pattern as Block 3.

**Block 4.1** — IF `(subkey.equalsIgnoreCase("value"))` (L296)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class;` // データ型はString (The data type is String) |

**Block 4.2** — ELSE-IF `(subkey.equalsIgnoreCase("enable"))` (L299)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return Boolean.class;` // イネーブルフラグの型はBoolean (Enable flag type is Boolean) |

**Block 4.3** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L302)

> The comment states: subkey that is "state" returns state type. (subkeyが"state"の場合、ステータスを返す。)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class;` // stateのサブキーの場合、ステータスを返す (When subkey is "state", returns state type) |

**Block 5** — ELSE (implicit final return) (L306)

> No matching key was found. The method falls through to the final return statement.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // 条件に合致するプロパティが存在しない場合はnullを返す (Returns null if no matching property exists) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `tsjgs_cd` | Field | Communication Service Provider Code — internal ID identifying a telecom carrier in the order system. Abbreviation: 通事 (tsuujin shigyo) + 者 (sha) + 名 (mei) + 号 (go) = tsjgs + cd (code). |
| `tsjgs_nm` | Field | Communication Service Provider Name — human-readable display name of the telecom carrier. Abbreviation: 通事者名 (tsjgs_nm). |
| 通信事業者コード | Field | Japanese: 通信事業者コード — Communication Service Provider Code. The telecom carrier identifier assigned to a service contract line item. |
| 通信事業者名 | Field | Japanese: 通信事業者名 — Communication Service Provider Name. The display name of the assigned telecom carrier. |
| DBean | Technical | Data Bean — a presentation-layer bean in the Web Client 2.0 (X33) framework that holds form data and defines field metadata including data types, labels, and validation rules. |
| X33 | Technical | Web Client 2.0 — the Fujitsu Futurity-based web application framework used across K-Opticom's telecom order management system. Provides `X33VDataTypeList`, `X33VListedBeanInterface`, and `X33VDataTypeBeanInterface` for dynamic form rendering. |
| FUW00928SF | Module | Screen module identifier. SF = Screen. The screen module handling communication service provider selection/order data entry. |
| key | Parameter | Item name (項目名) — identifies which form field the caller is querying type information for. |
| subkey | Parameter | Sub-key (サブキー) — identifies which aspect/property of the field (value, enable, state) the caller needs type info for. |
| value | Sub-key | The data field itself — the actual typed value stored in the form field. |
| enable | Sub-key | Editability flag — indicates whether the form field is currently editable (read-only vs. modifiable). |
| state | Sub-key | Display state — the visual state of the form field (e.g., normal, disabled, error). |
| typeModelData | Method | Framework callback method that resolves the Java `Class<?>` type for a given item/subkey pair. Used by the X33 runtime to validate, render, and bind form data correctly. |
| SC | Technical | Service Component — server-side business logic component (not called by this method). Pattern: `[A-Z]{3}\d{4}[A-Z]\d{3}SC`. |
| CBS | Technical | Common Business Service — shared business logic component (not called by this method). Pattern: `[A-Z]{3}\d{4}[A-Z]\d{3}CBS`. |
