# Business Logic — KKW22501SF01DBean.typeModelData() [121 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW22501SF.KKW22501SF01DBean` |
| Layer | Utility / Data-binding (DBean = Data-binding Bean) |
| Module | `KKW22501SF` (Package: `eo.web.webview.KKW22501SF`) |

## 1. Role

### KKW22501SF01DBean.typeModelData()

This method implements a **type-mapping dispatch** pattern for the KKW22501SF screen module. Given a Japanese field name (`key`) and a subkey property (`subkey`), it returns the appropriate `Class<?>` type that the UI framework needs to construct data-binding model objects at runtime. It serves as a **shared type lookup utility** consumed by the webview data-binding infrastructure — every UI item rendered by this screen delegates through this method to determine whether a field's value, enablement flag, and status state are strings, booleans, or other types.

The method handles **9 distinct business fields** (items), each corresponding to a UI-bound data element on the service order change screen. These include agent (dealer) identification fields (代理店コード, 代理店名), display/filter configuration fields (表示用データ抽出項目コード, データ抽出項目コード, データ抽出項目設定条件番号), time fields (受付開始年月日时分, 受付終了年月日时分, 更新年月日时分秒), and a deletion flag (削除チェック). For each field, the method returns `String.class` for `value` and `state` subkeys, `Boolean.class` for `enable` subkeys (except for the deletion-check field which also returns `Boolean.class` for `value`), and `String.class` for `state`. Two of the nine fields — データ抽出項目コード（変更用）and データ抽出項目設定条件番号（変更用）— lack an `enable` subkey entirely. If no matching field is found, the method returns `null` (no matching property).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData key, subkey"])
    START --> CHECK_NULL{"key == null
or subkey == null?"}
    CHECK_NULL -->|Yes| RETURN_NULL["return null"]
    CHECK_NULL -->|No| COMPUTE_SEP["sep = key.indexOf('/')"]
    COMPUTE_SEP --> K1{"key =
代理店コード
(item agnt_cd)"}
    K1 -->|Yes| SUB1{"subkey
equalsIgnoreCase"}
    SUB1 -->|"\"value\""| R_S1["return String.class"]
    SUB1 -->|"\"enable\""| R_B1["return Boolean.class"]
    SUB1 -->|"\"state\""| R_S2["return String.class"]
    K1 -->|No| K2{"key =
代理店名
(item agnt_nm)"}
    K2 -->|Yes| SUB2{"subkey
equalsIgnoreCase"}
    SUB2 -->|"\"value\""| R_S3["return String.class"]
    SUB2 -->|"\"enable\""| R_B2["return Boolean.class"]
    SUB2 -->|"\"state\""| R_S4["return String.class"]
    K2 -->|No| K3{"key =
表示用データ抽出項目コード
(item dsp_dchskm_cd)"}
    K3 -->|Yes| SUB3{"subkey
equalsIgnoreCase"}
    SUB3 -->|"\"value\""| R_S5["return String.class"]
    SUB3 -->|"\"enable\""| R_B3["return Boolean.class"]
    SUB3 -->|"\"state\""| R_S6["return String.class"]
    K3 -->|No| K4{"key =
受付開始年月日时分
(item uk_sta_ymdhm)"}
    K4 -->|Yes| SUB4{"subkey
equalsIgnoreCase"}
    SUB4 -->|"\"value\""| R_S7["return String.class"]
    SUB4 -->|"\"enable\""| R_B4["return Boolean.class"]
    SUB4 -->|"\"state\""| R_S8["return String.class"]
    K4 -->|No| K5{"key =
受付終了年月日时分
(item uk_end_ymdhm)"}
    K5 -->|Yes| SUB5{"subkey
equalsIgnoreCase"}
    SUB5 -->|"\"value\""| R_S9["return String.class"]
    SUB5 -->|"\"enable\""| R_B5["return Boolean.class"]
    SUB5 -->|"\"state\""| R_S10["return String.class"]
    K5 -->|No| K6{"key =
データ抽出項目コード
変更用 item dchskm_cd"}
    K6 -->|Yes| SUB6{"subkey
equalsIgnoreCase"}
    SUB6 -->|"\"value\""| R_S11["return String.class"]
    SUB6 -->|"\"state\""| R_S12["return String.class"]
    K6 -->|No| K7{"key =
データ抽出項目設定条件番号
変更用 item dchskm_sete_jkn_no"}
    K7 -->|Yes| SUB7{"subkey
equalsIgnoreCase"}
    SUB7 -->|"\"value\""| R_S13["return String.class"]
    SUB7 -->|"\"state\""| R_S14["return String.class"]
    K7 -->|No| K8{"key =
更新年月日时分秒
(item upd_dtm)"}
    K8 -->|Yes| SUB8{"subkey
equalsIgnoreCase"}
    SUB8 -->|"\"value\""| R_S15["return String.class"]
    SUB8 -->|"\"state\""| R_S16["return String.class"]
    K8 -->|No| K9{"key =
削除チェック
(item del_check)"}
    K9 -->|Yes| SUB9{"subkey
equalsIgnoreCase"}
    SUB9 -->|"\"value\""| R_B6["return Boolean.class"]
    SUB9 -->|"\"enable\""| R_B7["return Boolean.class"]
    SUB9 -->|"\"state\""| R_S17["return String.class"]
    K9 -->|No| RETURN_NULL_END["return null"]
    R_S1 --> END(["End"])
    R_B1 --> END
    R_S2 --> END
    R_S3 --> END
    R_B2 --> END
    R_S4 --> END
    R_S5 --> END
    R_B3 --> END
    R_S6 --> END
    R_S7 --> END
    R_B4 --> END
    R_S8 --> END
    R_S9 --> END
    R_B5 --> END
    R_S10 --> END
    R_S11 --> END
    R_S12 --> END
    R_S13 --> END
    R_S14 --> END
    R_S15 --> END
    R_S16 --> END
    R_B6 --> END
    R_B7 --> END
    R_S17 --> END
    RETURN_NULL --> END
    RETURN_NULL_END --> END
```

**Processing summary:**
1. **Null-guard**: If `key` or `subkey` is `null`, immediately return `null`.
2. **Separator index**: Compute `key.indexOf("/")` (result stored in local `separaterPoint`, but **never used** in any subsequent branch — dead code).
3. **9-way field dispatch**: Sequential `if-else if` chain compares `key` against 9 hardcoded Japanese field names. Each match delegates to a subkey-level `equalsIgnoreCase` check.
4. **Subkey resolution**: Within each field, return `String.class` or `Boolean.class` based on the subkey (`value`, `enable`, `state`). Fields 6–8 (変更用 fields and 更新年月日时分秒) do not support the `enable` subkey.
5. **Fallback**: If no field matches, return `null`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | Japanese field name (item name) identifying which UI-bound data element to resolve the type for. Examples: "代理店コード" (Dealer/Agent Code), "削除チェック" (Delete Check). Maps to internal item IDs such as `agnt_cd`, `del_check`, `dchskm_cd`. |
| 2 | `subkey` | `String` | Property subkey specifying which attribute of the field to resolve: `value` (the data value type), `enable` (the enable/disable flag type), or `state` (the display state type). Case-insensitive comparison (`equalsIgnoreCase`). |

**No instance fields or external state are read by this method.** It is entirely pure and stateless — the return value depends solely on the two input parameters.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations**, **no service component calls**, and **no database interactions**. It is a pure in-memory type-mapping utility that operates exclusively on its input parameters and returns a `Class<?>` reference.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (none) | — | — | — | No external calls; pure dispatch utility |

## 5. Dependency Trace

This method is a **leaf utility** consumed by other DBeans within the same codebase's data-binding infrastructure. Cross-reference search found many other `typeModelData` implementations in sibling/parallel DBeans (e.g., `FUW00912SF01DBean`, `FUW00926SF01DBean`), but the `typeModelData(String, String)` method defined in `KKW22501SF01DBean` has **no direct callers found** in the searched Java files. It is likely consumed indirectly through reflection or a generic data-binding framework that resolves type metadata at runtime for the KKSV screen module.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | N/A | Direct invocation not detected in codebase | Pure utility; no terminal SC/CRUD |

**Note:** This method follows the same signature pattern as sibling DBeans across the `FUW009xxSF` modules, suggesting it is part of a standardized `typeModelData` contract used by a generic webview rendering framework. Actual callers are likely in framework-level code not captured in the standard search scope (e.g., reflection-based bean metadata resolution).

## 6. Per-Branch Detail Blocks

### Block 1 — IF (Null Guard) (L669)

Guard clause: if either `key` or `subkey` is `null`, return `null` immediately.

| # | Type | Code |
|---|------|------|
| 1 | COND | `if (key == null || subkey == null)` // Null check |
| 2 | RETURN | `return null;` // (key,subkeyがnullの場合、nullを返す — Return null if key/subkey is null) [L670–671] |

### Block 2 — EXEC (Separator Index) (L673)

Compute the position of the "/" character in `key`. The result is stored but **never used** — this is dead code.

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

### Block 3 — ELSE-IF CHAIN (9-Way Field Dispatch) (L676–L784)

#### Block 3.1 — ELSE-IF `[代理店コード = "代理店コード"]` (item agnt_cd) (L677)

Data type is String for the Dealer/Agent Code field (item ID: agnt_cd).

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("代理店コード")` // (項目ごとに処理を入れる — Process per item) [L677] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L678–679] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` -> `return Boolean.class` [L680–681] |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` // (subkeyが"state"の場合、ステータスを返す — Return status when subkey is "state") [L682–683] |

#### Block 3.2 — ELSE-IF `[代理店名 = "代理店名"]` (item agnt_nm) (L687)

Data type is String for the Dealer/Agent Name field (item ID: agnt_nm). Same subkey pattern as Block 3.1.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("代理店名")` // (データタイプがStringの項目"代理店名"(項目ID:agnt_nm) — Item with data type String: Dealer Name (item ID: agnt_nm)) [L687] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L688–689] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` -> `return Boolean.class` [L690–691] |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L692–693] |

#### Block 3.3 — ELSE-IF `[表示用データ抽出項目コード = "表示用データ抽出項目コード"]` (item dsp_dchskm_cd) (L697)

Data type is String for the Display Data Extraction Item Code field (item ID: dsp_dchskm_cd). Same subkey pattern as Block 3.1.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("表示用データ抽出項目コード")` // (データタイプがStringの項目"表示用データ抽出項目コード"(項目ID:dsp_dchskm_cd) — Item with data type String: Display Data Extraction Item Code (item ID: dsp_dchskm_cd)) [L697] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L698–699] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` -> `return Boolean.class` [L700–701] |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L702–703] |

#### Block 3.4 — ELSE-IF `[受付開始年月日时分 = "受付開始年月日时分"]` (item uk_sta_ymdhm) (L707)

Data type is String for the Reception Start Date/Time field (item ID: uk_sta_ymdhm). Same subkey pattern.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("受付開始年月日时分")` // (データタイプがStringの項目"受付開始年月日时分"(項目ID:uk_sta_ymdhm) — Item with data type String: Reception Start Date/Time (item ID: uk_sta_ymdhm)) [L707] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L708–709] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` -> `return Boolean.class` [L710–711] |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L712–713] |

#### Block 3.5 — ELSE-IF `[受付終了年月日时分 = "受付終了年月日时分"]` (item uk_end_ymdhm) (L717)

Data type is String for the Reception End Date/Time field (item ID: uk_end_ymdhm). Same subkey pattern.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("受付終了年月日时分")` // (データタイプがStringの項目"受付終了年月日时分"(項目ID:uk_end_ymdhm) — Item with data type String: Reception End Date/Time (item ID: uk_end_ymdhm)) [L717] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L718–719] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` -> `return Boolean.class` [L720–721] |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L722–723] |

#### Block 3.6 — ELSE-IF `[データ抽出項目コード（変更用）= "データ抽出項目コード（変更用）"]` (item dchskm_cd) (L727)

Data type is String for the Data Extraction Item Code (for modification) field (item ID: dchskm_cd). **Note: No `enable` subkey** — only `value` and `state`.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("データ抽出項目コード（変更用）")` // (データタイプがStringの項目"データ抽出項目コード（変更用）"(項目ID:dchskm_cd) — Item with data type String: Data Extraction Item Code (for modification) (item ID: dchskm_cd)) [L727] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L728–729] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` // (subkeyが"state"の場合、ステータスを返す — Return status when subkey is "state") [L730–731] |

#### Block 3.7 — ELSE-IF `[データ抽出項目設定条件番号（変更用）= "データ抽出項目設定条件番号（変更用）"]` (item dchskm_sete_jkn_no) (L735)

Data type is String for the Data Extraction Item Setting Condition Number (for modification) field (item ID: dchskm_sete_jkn_no). **No `enable` subkey**.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("データ抽出項目設定条件番号（変更用）")` // (データタイプがStringの項目"データ抽出項目設定条件番号（変更用）"(項目ID:dchskm_sete_jkn_no) — Item with data type String: Data Extraction Item Setting Condition Number (for modification) (item ID: dchskm_sete_jkn_no)) [L735] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L736–737] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L738–739] |

#### Block 3.8 — ELSE-IF `[更新年月日时分秒 = "更新年月日时分秒"]` (item upd_dtm) (L743)

Data type is String for the Update Date/Time/Second field (item ID: upd_dtm). **No `enable` subkey**.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("更新年月日时分秒")` // (データタイプがStringの項目"更新年月日时分秒"(項目ID:upd_dtm) — Item with data type String: Update Date/Time/Second (item ID: upd_dtm)) [L743] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return String.class` [L744–745] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L746–747] |

#### Block 3.9 — ELSE-IF `[削除チェック = "削除チェック"]` (item del_check) (L751)

**Boolean** data type for the Delete Check field (item ID: del_check). `value` subkey returns `Boolean.class` (unlike all other fields which return `String.class` for `value`). `enable` also returns `Boolean.class`.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("削除チェック")` // (データタイプがBooleanの項目"削除チェック"(項目ID:del_check) — Item with data type Boolean: Delete Check (item ID: del_check)) [L751] |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("value")` -> `return Boolean.class` [L752–753] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` -> `return Boolean.class` [L754–755] |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` -> `return String.class` [L756–757] |

### Block 4 — RETURN (Fallback Null) (L761)

If no field name matches, return `null`.

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

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `key` | Parameter | Japanese field name used to identify a UI-bound data element |
| `subkey` | Parameter | Property subkey specifying which attribute to resolve: `value`, `enable`, or `state` |
| 代理店コード (agnt_cd) | Field | Dealer/Agent Code — internal tracking ID for the sales agent or dealer partner |
| 代理店名 (agnt_nm) | Field | Dealer/Agent Name — human-readable name of the sales agent or dealer partner |
| 表示用データ抽出項目コード (dsp_dchskm_cd) | Field | Display Data Extraction Item Code — code defining which data fields to extract for display on the screen |
| 受付開始年月日时分 (uk_sta_ymdhm) | Field | Reception Start Date/Time/Minute — the start datetime of the order reception period |
| 受付終了年月日时分 (uk_end_ymdhm) | Field | Reception End Date/Time/Minute — the end datetime of the order reception period |
| データ抽出項目コード（変更用）(dchskm_cd) | Field | Data Extraction Item Code (for modification) — code defining data extraction fields, used in modification workflows |
| データ抽出項目設定条件番号（変更用）(dchskm_sete_jkn_no) | Field | Data Extraction Item Setting Condition Number (for modification) — condition number for data extraction settings, used in modification workflows |
| 更新年月日时分秒 (upd_dtm) | Field | Update Date/Time/Second — the last update timestamp of the record (to the second) |
| 削除チェック (del_check) | Field | Delete Check — boolean flag indicating whether the record is marked for deletion |
| value | Subkey | The data value type of the field (returns `Class<?>` of the value's type) |
| enable | Subkey | The enable/disable flag type (returns `Class<?>` of the enable state) |
| state | Subkey | The display state/status type (returns `Class<?>` of the state, typically `String.class`) |
| DBean | Technical | Data-binding Bean — a framework component that provides type metadata, validation rules, and model properties for the webview rendering engine |
| 変更用 | Domain term | For modification — suffix indicating the field is used in a record modification workflow (vs. creation) |
| indexOf | Technical | String method to find the position of a character; result stored but unused here (dead code) |
