# Business Logic — KKW00401SF01DBean.loadModelData() [119 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00401SF.KKW00401SF01DBean` |
| Layer | Service Component / Data Bean (View data access tier — part of the Fujitsu Futurity X33 web framework) |
| Module | `KKW00401SF` (Package: `eo.web.webview.KKW00401SF`) |

## 1. Role

### KKW00401SF01DBean.loadModelData()

This method serves as the **central data access dispatcher** for the `KKW00401SF` screen's data bean (`KKW00401SF01DBean`). It implements the X33 framework's `X33VDataTypeBeanInterface.loadModelData()` contract, enabling uniform property resolution across the view layer. In business terms, it resolves **six categories of screen data** — code type code, code type name, selection index, initial setting code, code type code value list, and code type name value list — by dispatching to the appropriate field getter or delegated bean method based on the `key` and `subkey` parameters. Each category supports three sub-properties: `value` (the actual data), `enabled` (the editable/active state flag), and `state` (validation/status metadata). The method also supports **index-based list item access** for array-backed data types, delegating to individual `X33VDataTypeStringBean` instances within `X33VDataTypeList` collections. This is a shared utility pattern — every screen in the `KKW00401SF` module (DBeans 01 through 26) implements the same interface and relies on this dispatch mechanism for the view layer to read screen model data uniformly via string-based property paths, avoiding direct field access and keeping the data bean encapsulated.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["loadModelData(key, subkey)"])
    COND_NULL["key == null || subkey == null?"]
    NULL_RET(["return null"])
    FIND_SEP["Find separaterPoint = key.indexOf('/')"]

    COND_CD_DIV_CD["key == 'コードタイプコード'?"]
    SUB_CD_VAL["subkey == 'value'?"]
    RET_CD_VAL["return getCd_div_cd_value()"]
    SUB_CD_EN["subkey == 'enable'?"]
    RET_CD_EN["return getCd_div_cd_enabled()"]
    SUB_CD_ST["subkey == 'state'?"]
    RET_CD_ST["return getCd_div_cd_state()"]

    COND_CD_DIV_NM["key == 'コードタイプ名称'?"]
    SUB_NM_VAL["subkey == 'value'?"]
    RET_NM_VAL["return getCd_div_nm_value()"]
    SUB_NM_EN["subkey == 'enable'?"]
    RET_NM_EN["return getCd_div_nm_enabled()"]
    SUB_NM_ST["subkey == 'state'?"]
    RET_NM_ST["return getCd_div_nm_state()"]

    COND_SEL_IDX["key == '選択インデックス'?"]
    SUB_SEL_VAL["subkey == 'value'?"]
    RET_SEL_VAL["return getSelect_index_value()"]
    SUB_SEL_EN["subkey == 'enable'?"]
    RET_SEL_EN["return getSelect_index_enabled()"]
    SUB_SEL_ST["subkey == 'state'?"]
    RET_SEL_ST["return getSelect_index_state()"]

    COND_DEF_CD["key == '初期設定コード'?"]
    SUB_DEF_VAL["subkey == 'value'?"]
    RET_DEF_VAL["return getDefault_cd_value()"]
    SUB_DEF_EN["subkey == 'enable'?"]
    RET_DEF_EN["return getDefault_cd_enabled()"]
    SUB_DEF_ST["subkey == 'state'?"]
    RET_DEF_ST["return getDefault_cd_state()"]

    COND_LIST_CD["key == 'コードタイプコード値リスト'?"]
    LIST_CD_EXTRACT["Extract index: key.substring(separaterPoint + 1)"]
    LIST_CD_ASTERISK["index == '*'?"]
    LIST_CD_SIZE["return cd_div_cd_list_list.size()"]
    LIST_CD_PARSE["Parse index as Integer"]
    LIST_CD_CATCH(["NumberFormatException -> return null"])
    LIST_CD_BOUNDS["index < 0 || index >= size()?"]
    LIST_CD_BOUNDS_RET(["return null"])
    LIST_CD_DELEGATE["cd_div_cd_list_list.get(index).loadModelData(subkey)"]

    COND_LIST_NM["key == 'コードタイプ名称リスト'?"]
    LIST_NM_EXTRACT["Extract index: key.substring(separaterPoint + 1)"]
    LIST_NM_ASTERISK["index == '*'?"]
    LIST_NM_SIZE["return cd_div_nm_list_list.size()"]
    LIST_NM_PARSE["Parse index as Integer"]
    LIST_NM_CATCH(["NumberFormatException -> return null"])
    LIST_NM_BOUNDS["index < 0 || index >= size()?"]
    LIST_NM_BOUNDS_RET(["return null"])
    LIST_NM_DELEGATE["cd_div_nm_list_list.get(index).loadModelData(subkey)"]

    DEFAULT_RET(["return null (no match)"])
    END_NODE(["End"])

    START --> COND_NULL
    COND_NULL -->|"true"| NULL_RET
    COND_NULL -->|"false"| FIND_SEP
    FIND_SEP --> COND_CD_DIV_CD

    COND_CD_DIV_CD -->|"true"| SUB_CD_VAL
    SUB_CD_VAL -->|"true"| RET_CD_VAL
    SUB_CD_VAL -->|"false"| SUB_CD_EN
    SUB_CD_EN -->|"true"| RET_CD_EN
    SUB_CD_EN -->|"false"| SUB_CD_ST
    SUB_CD_ST -->|"true"| RET_CD_ST
    SUB_CD_ST -->|"false"| COND_CD_DIV_NM

    COND_CD_DIV_CD -->|"false"| COND_CD_DIV_NM

    COND_CD_DIV_NM -->|"true"| SUB_NM_VAL
    SUB_NM_VAL -->|"true"| RET_NM_VAL
    SUB_NM_VAL -->|"false"| SUB_NM_EN
    SUB_NM_EN -->|"true"| RET_NM_EN
    SUB_NM_EN -->|"false"| SUB_NM_ST
    SUB_NM_ST -->|"true"| RET_NM_ST
    SUB_NM_ST -->|"false"| COND_SEL_IDX

    COND_CD_DIV_NM -->|"false"| COND_SEL_IDX

    COND_SEL_IDX -->|"true"| SUB_SEL_VAL
    SUB_SEL_VAL -->|"true"| RET_SEL_VAL
    SUB_SEL_VAL -->|"false"| SUB_SEL_EN
    SUB_SEL_EN -->|"true"| RET_SEL_EN
    SUB_SEL_EN -->|"false"| SUB_SEL_ST
    SUB_SEL_ST -->|"true"| RET_SEL_ST
    SUB_SEL_ST -->|"false"| COND_DEF_CD

    COND_SEL_IDX -->|"false"| COND_DEF_CD

    COND_DEF_CD -->|"true"| SUB_DEF_VAL
    SUB_DEF_VAL -->|"true"| RET_DEF_VAL
    SUB_DEF_VAL -->|"false"| SUB_DEF_EN
    SUB_DEF_EN -->|"true"| RET_DEF_EN
    SUB_DEF_EN -->|"false"| SUB_DEF_ST
    SUB_DEF_ST -->|"true"| RET_DEF_ST
    SUB_DEF_ST -->|"false"| COND_LIST_CD

    COND_DEF_CD -->|"false"| COND_LIST_CD

    COND_LIST_CD -->|"true"| LIST_CD_EXTRACT
    LIST_CD_EXTRACT --> LIST_CD_ASTERISK
    LIST_CD_ASTERISK -->|"true"| LIST_CD_SIZE
    LIST_CD_ASTERISK -->|"false"| LIST_CD_PARSE
    LIST_CD_PARSE --> LIST_CD_CATCH
    LIST_CD_PARSE --> LIST_CD_BOUNDS
    LIST_CD_CATCH --> END_NODE
    LIST_CD_BOUNDS -->|"true"| LIST_CD_BOUNDS_RET
    LIST_CD_BOUNDS -->|"false"| LIST_CD_DELEGATE
    LIST_CD_BOUNDS_RET --> END_NODE
    LIST_CD_DELEGATE --> END_NODE

    COND_LIST_CD -->|"false"| COND_LIST_NM

    COND_LIST_NM -->|"true"| LIST_NM_EXTRACT
    LIST_NM_EXTRACT --> LIST_NM_ASTERISK
    LIST_NM_ASTERISK -->|"true"| LIST_NM_SIZE
    LIST_NM_ASTERISK -->|"false"| LIST_NM_PARSE
    LIST_NM_PARSE --> LIST_NM_CATCH
    LIST_NM_PARSE --> LIST_NM_BOUNDS
    LIST_NM_CATCH --> END_NODE
    LIST_NM_BOUNDS -->|"true"| LIST_NM_BOUNDS_RET
    LIST_NM_BOUNDS -->|"false"| LIST_NM_DELEGATE
    LIST_NM_BOUNDS_RET --> END_NODE
    LIST_NM_DELEGATE --> END_NODE

    COND_LIST_NM -->|"false"| DEFAULT_RET
    DEFAULT_RET --> END_NODE
```

**Processing Summary:**

This method implements a **two-level dispatch pattern**. The first level matches the `key` parameter against six string constants (hard-coded Japanese keys). If there is no match, the method returns `null`. When a key matches, the second level matches the `subkey` parameter against three values: `"value"`, `"enable"`, or `"state"` (case-insensitive). The scalar types (cd_div_cd, cd_div_nm, select_index, default_cd) delegate to corresponding getter methods on this bean. The list types (cd_div_cd_list, cd_div_nm_list) additionally support index-based access where the key includes a separator (`/`) followed by either `"*"` (returning list size) or an integer index (delegating to the individual list item's `loadModelData`).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The **item name** (項目名) that identifies which data category to resolve. Valid values are Japanese string literals: `"コードタイプコード"` (Code Type Code), `"コードタイプ名称"` (Code Type Name), `"選択インデックス"` (Selection Index), `"初期設定コード"` (Initial Setting Code), `"コードタイプコード値リスト"` (Code Type Code Value List), `"コードタイプ名称リスト"` (Code Type Name List). For list types, the key may include a `"/"` separator followed by `"*"` (for count) or an integer index for element access. |
| 2 | `subkey` | `String` | The **sub-key** (サブキー) that identifies which property of the data category to return. Valid values (case-insensitive): `"value"` (returns the actual data value), `"enable"` (returns whether the field is currently editable/enabled), `"state"` (returns the validation/binding state). For list types, this is delegated to the individual list item's `loadModelData(subkey)`. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `cd_div_cd_list_list` | `X33VDataTypeList` | List of code type code values — array of `X33VDataTypeStringBean` objects |
| `cd_div_nm_list_list` | `X33VDataTypeList` | List of code type name values — array of `X33VDataTypeStringBean` objects |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `KKW00401SF01DBean.getCd_div_cd_value` | KKW00401SF01DBean | - | Reads the current code type code value from the bean's `cd_div_cd_value` field |
| R | `KKW00401SF01DBean.getCd_div_cd_enabled` | KKW00401SF01DBean | - | Reads the enabled/active flag for the code type code field |
| R | `KKW00401SF01DBean.getCd_div_cd_state` | KKW00401SF01DBean | - | Reads the validation state of the code type code field |
| R | `KKW00401SF01DBean.getCd_div_nm_value` | KKW00401SF01DBean | - | Reads the current code type name value from the bean's `cd_div_nm_value` field |
| R | `KKW00401SF01DBean.getCd_div_nm_enabled` | KKW00401SF01DBean | - | Reads the enabled/active flag for the code type name field |
| R | `KKW00401SF01DBean.getCd_div_nm_state` | KKW00401SF01DBean | - | Reads the validation state of the code type name field |
| R | `KKW00401SF01DBean.getSelect_index_value` | KKW00401SF01DBean | - | Reads the current selection index value from the bean's `select_index_value` field |
| R | `KKW00401SF01DBean.getSelect_index_enabled` | KKW00401SF01DBean | - | Reads the enabled/active flag for the selection index field |
| R | `KKW00401SF01DBean.getSelect_index_state` | KKW00401SF01DBean | - | Reads the validation state of the selection index field |
| R | `KKW00401SF01DBean.getDefault_cd_value` | KKW00401SF01DBean | - | Reads the current initial setting code value from the bean's `default_cd_value` field |
| R | `KKW00401SF01DBean.getDefault_cd_enabled` | KKW00401SF01DBean | - | Reads the enabled/active flag for the initial setting code field |
| R | `KKW00401SF01DBean.getDefault_cd_state` | KKW00401SF01DBean | - | Reads the validation state of the initial setting code field |
| R | `KKW00401SF01DBean.loadModelData` | KKW00401SF01DBean | - | Recursively delegates to list item `X33VDataTypeStringBean.loadModelData(subkey)` for indexed access into code type code/name lists |

**Classification notes:** This method is entirely **read-only (R)**. It performs no database operations, no entity creation/update/deletion, and no calls to external service components (SC/CBS). All operations resolve properties from in-memory bean fields or delegate reads to child data beans within list collections. The method operates as a pure data accessor within the X33 view framework.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | DBean: KKW00401SF01DBean (no-arg overload) | `KKW00401SF01DBean.loadModelData()` → `KKW00401SF01DBean.loadModelData(key, subkey)` | N/A (self-invocation) |
| 2 | DBean: KKW00401SF02DBean | `KKW00401SF02DBean.loadModelData(key, subkey)` → delegates to list item `.loadModelData(key, subkey)` on `stb_ido_div_list`, `sel_type_number_list`, `stb_div_list`, `hdd_capa_list`, `tv_course_list` items, which invoke `KKW00401SF01DBean.loadModelData` | N/A (framework-level property resolution) |
| 3 | DBean: KKW00401SF04DBean | `KKW00401SF04DBean.loadModelData(key, subkey)` → X33 framework resolves property via `loadModelData` dispatch | N/A |
| 4 | DBean: KKW00401SF05DBean | `KKW00401SF05DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 5 | DBean: KKW00401SF06DBean | `KKW00401SF06DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 6 | DBean: KKW00401SF07DBean | `KKW00401SF07DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 7 | DBean: KKW00401SF08DBean | `KKW00401SF08DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 8 | DBean: KKW00401SF09DBean | `KKW00401SF09DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 9 | DBean: KKW00401SF10DBean | `KKW00401SF10DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 10 | DBean: KKW00401SF11DBean | `KKW00401SF11DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 11 | DBean: KKW00401SF12DBean | `KKW00401SF12DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 12 | DBean: KKW00401SF13DBean | `KKW00401SF13DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 13 | DBean: KKW00401SF14DBean | `KKW00401SF14DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 14 | DBean: KKW00401SF15DBean | `KKW00401SF15DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |
| 15 | DBean: KKW00401SF16DBean | `KKW00401SF16DBean.loadModelData(key, subkey)` → X33 framework property binding | N/A |

**Notes:**
- All callers within the `KKW00401SF` module implement the `X33VDataTypeBeanInterface` and share the same `loadModelData` dispatch contract.
- This method is primarily invoked by the **X33 framework** (Fujitsu Futurity web framework) during view rendering to resolve data properties from DBeans. The framework uses Java reflection to call `loadModelData(key, subkey)` on beans, enabling declarative EL/JSF data binding without requiring explicit getter method names per property.
- The no-arg overload `loadModelData()` (if defined in the same class) calls the two-arg version with specific key/subkey combinations for initialization purposes.
- List item `X33VDataTypeStringBean` beans also implement `X33VDataTypeBeanInterface`, so their `loadModelData(subkey)` calls recursively dispatch back through the same pattern on the child bean's own fields.

## 6. Per-Branch Detail Blocks

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

> Guard clause: Returns `null` immediately if either parameter is null. This prevents `NullPointerException` on subsequent `equals()` calls.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key == null || subkey == null)` |
| 2 | RETURN | `return null;` // key or subkey is null — early return |

---

**Block 2** — EXEC (compute separator) `(key.indexOf('/'))` (L258)

> Computes the position of the "/" separator for list-type key access. This is used by Block 6 and Block 7 to extract the index portion of a key like `"コードタイプコード値リスト/0"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // Find position of "/" separator for list key parsing |

---

**Block 3** — IF/ELSE-IF (Code Type Code) `key.equals("コードタイプコード")` [項目ID: cd_div_cd] (L262)

> Dispatches access to the **code type code** data category. This is a scalar (single-value) field storing the current code type code value on the screen.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key.equals("コードタイプコード"))` // Data type: "Code Type Code" [item ID: cd_div_cd] |

**Block 3.1** — ELSE-IF `subkey.equalsIgnoreCase("value")` (L263)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(subkey.equalsIgnoreCase("value"))` |
| 2 | CALL | `return getCd_div_cd_value();` // Returns the current code type code value |

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

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("enable"))` // If subkey is "enable", return cd_div_cd_enabled getter result |
| 2 | CALL | `return getCd_div_cd_enabled();` // Returns the enabled flag for code type code field |

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

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("state"))` // If subkey is "state", return the state |
| 2 | CALL | `return getCd_div_cd_state();` // Returns the validation state for code type code field |

---

**Block 4** — ELSE-IF (Code Type Name) `key.equals("コードタイプ名称")` [項目ID: cd_div_nm] (L273)

> Dispatches access to the **code type name** data category. This is a scalar field storing the human-readable label of the code type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(key.equals("コードタイプ名称"))` // Data type: "Code Type Name" [item ID: cd_div_nm] |

**Block 4.1** — ELSE-IF `subkey.equalsIgnoreCase("value")` (L274)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(subkey.equalsIgnoreCase("value"))` |
| 2 | CALL | `return getCd_div_nm_value();` // Returns the current code type name value |

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

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("enable"))` // If subkey is "enable", return cd_div_nm_enabled getter result |
| 2 | CALL | `return getCd_div_nm_enabled();` // Returns the enabled flag for code type name field |

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

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("state"))` // If subkey is "state", return the state |
| 2 | CALL | `return getCd_div_nm_state();` // Returns the validation state for code type name field |

---

**Block 5** — ELSE-IF (Selection Index) `key.equals("選択インデックス")` [項目ID: select_index] (L284)

> Dispatches access to the **selection index** data category. This scalar field tracks which item is currently selected in a dropdown or list UI component.

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(key.equals("選択インデックス"))` // Data type: "Selection Index" [item ID: select_index] |

**Block 5.1** — ELSE-IF `subkey.equalsIgnoreCase("value")` (L285)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(subkey.equalsIgnoreCase("value"))` |
| 2 | CALL | `return getSelect_index_value();` // Returns the current selection index value |

**Block 5.2** — ELSE-IF `subkey.equalsIgnoreCase("enable")` (L288)

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("enable"))` // If subkey is "enable", return select_index_enabled getter result |
| 2 | CALL | `return getSelect_index_enabled();` // Returns the enabled flag for selection index field |

**Block 5.3** — ELSE-IF `subkey.equalsIgnoreCase("state")` (L291)

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("state"))` // If subkey is "state", return the state |
| 2 | CALL | `return getSelect_index_state();` // Returns the validation state for selection index field |

---

**Block 6** — ELSE-IF (Initial Setting Code) `key.equals("初期設定コード")` [項目ID: default_cd] (L295)

> Dispatches access to the **initial setting code** data category. This scalar field stores the default/initial code value applied to the screen.

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(key.equals("初期設定コード"))` // Data type: "Initial Setting Code" [item ID: default_cd] |

**Block 6.1** — ELSE-IF `subkey.equalsIgnoreCase("value")` (L296)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(subkey.equalsIgnoreCase("value"))` |
| 2 | CALL | `return getDefault_cd_value();` // Returns the current initial setting code value |

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

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("enable"))` // If subkey is "enable", return default_cd_enabled getter result |
| 2 | CALL | `return getDefault_cd_enabled();` // Returns the enabled flag for initial setting code field |

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

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(subkey.equalsIgnoreCase("state"))` // If subkey is "state", return the state |
| 2 | CALL | `return getDefault_cd_state();` // Returns the validation state for initial setting code field |

---

**Block 7** — ELSE-IF (Code Type Code Value List) `key.equals("コードタイプコード値リスト")` (L306)

> Handles the **code type code value list** — an array-backed data type. Supports two access patterns:
> - `"*"` as index: returns the total number of elements in the list
> - Integer index (e.g., `"0"`, `"1"`): returns the specified list item's data by delegating to its `loadModelData(subkey)`
> - Invalid index (non-numeric, out of range): returns `null`

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(key.equals("コードタイプコード値リスト"))` // List item: "Code Type Code Value List" [String type, item ID: cd_div_cd_list] |
| 2 | SET | `key = key.substring(separaterPoint + 1);` // Extract the next element of key (the index portion after "/") |

**Block 7.1** — IF `key.equals("*")` (L311)

> When `"*"` is specified instead of an index, returns the size of the list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key.equals("*"))` // If "*" is specified as the index, return the number of list elements |
| 2 | RETURN | `return Integer.valueOf(cd_div_cd_list_list.size());` // Returns list size as Integer |

**Block 7.2** — TRY/CATCH (index parsing) (L315)

> Attempts to parse the extracted key segment as an integer index. If parsing fails, returns `null`.

| # | Type | Code |
|---|------|------|
| 1 | TRY | `try { tmpIndexInt = Integer.valueOf(key); }` |
| 2 | CATCH | `catch(NumberFormatException e) { return null; }` // If index is not a numeric string, return null here |
| 3 | SET | `Integer tmpIndexInt = null;` // Initialize index variable |

**Block 7.3** — IF `tmpIndexInt == null` (L322)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(tmpIndexInt == null)` |
| 2 | RETURN | `return null;` // Null check after parse |

**Block 7.4** — IF bounds check (L327)

> Validates that the parsed index is within the valid range of the list. Out-of-bounds access returns `null`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue();` // Convert Integer to int |
| 2 | IF | `if(tmpIndex < 0 || tmpIndex >= cd_div_cd_list_list.size())` // If index exceeds list element count - 1, return null |
| 3 | RETURN | `return null;` // Out-of-bounds index |

**Block 7.5** — CALL: delegate to list item (L330)

> Delegates to the individual list item bean's `loadModelData(subkey)` method, enabling the same value/enable/state resolution for each list element.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return ((X33VDataTypeStringBean)cd_div_cd_list_list.get(tmpIndex)).loadModelData(subkey);` // Get list item at index and delegate loadModelData with subkey |

---

**Block 8** — ELSE-IF (Code Type Name Value List) `key.equals("コードタイプ名称リスト")` (L334)

> Handles the **code type name value list** — an array-backed data type. Identical access pattern to Block 7 but for the name list (`cd_div_nm_list_list`).

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(key.equals("コードタイプ名称リスト"))` // List item: "Code Type Name List" [String type, item ID: cd_div_nm_list] |
| 2 | SET | `key = key.substring(separaterPoint + 1);` // Extract the next element of key (the index portion after "/") |

**Block 8.1** — IF `key.equals("*")` (L339)

> When `"*"` is specified, returns the size of the name list.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key.equals("*"))` // If "*" is specified as the index, return the number of list elements |
| 2 | RETURN | `return Integer.valueOf(cd_div_nm_list_list.size());` // Returns name list size as Integer |

**Block 8.2** — TRY/CATCH (index parsing) (L343)

> Parses the key segment as an integer index. Invalid numbers result in `null`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `Integer tmpIndexInt = null;` // Initialize index variable |
| 2 | TRY | `try { tmpIndexInt = Integer.valueOf(key); }` |
| 3 | CATCH | `catch(NumberFormatException e) { return null; }` // If index is not a numeric string, return null here |

**Block 8.3** — IF `tmpIndexInt == null` (L350)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(tmpIndexInt == null)` |
| 2 | RETURN | `return null;` // Null check after parse |

**Block 8.4** — IF bounds check (L355)

> Validates index is within the valid range of the name list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue();` // Convert Integer to int |
| 2 | IF | `if(tmpIndex < 0 || tmpIndex >= cd_div_nm_list_list.size())` // If index exceeds list element count - 1, return null |
| 3 | RETURN | `return null;` // Out-of-bounds index |

**Block 8.5** — CALL: delegate to list item (L358)

> Delegates to the individual list item bean's `loadModelData(subkey)` method.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return ((X33VDataTypeStringBean)cd_div_nm_list_list.get(tmpIndex)).loadModelData(subkey);` // Get list item at index and delegate loadModelData with subkey |

---

**Block 9** — RETURN (no match) (L362)

> Final fallback: no matching key was found. Returns `null`.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // No matching property found, return null |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `cd_div_cd` | Field | Code Type Code — the internal code value identifying a classification category (e.g., equipment type, service type) |
| `cd_div_cd_enabled` | Field | Code Type Code Enabled Flag — boolean indicating whether the code type code field is currently editable on the screen |
| `cd_div_cd_state` | Field | Code Type Code State — validation/binding state string (e.g., "normal", "error") for the code type code field |
| `cd_div_cd_value` | Field | Code Type Code Value — the actual string value of the code type code currently held by the bean |
| `cd_div_cd_list_list` | Field | Code Type Code Value List — an `X33VDataTypeList` containing `X33VDataTypeStringBean` items, representing the array of available code type code options |
| `cd_div_nm` | Field | Code Type Name — the human-readable label/name corresponding to a code type code |
| `cd_div_nm_enabled` | Field | Code Type Name Enabled Flag — boolean indicating whether the code type name field is currently editable |
| `cd_div_nm_state` | Field | Code Type Name State — validation/binding state string for the code type name field |
| `cd_div_nm_value` | Field | Code Type Name Value — the actual string value of the code type name |
| `cd_div_nm_list_list` | Field | Code Type Name Value List — an `X33VDataTypeList` containing `X33VDataTypeStringBean` items, representing the array of available code type name options |
| `select_index` | Field | Selection Index — the index of the currently selected item in a dropdown or list UI component |
| `select_index_enabled` | Field | Selection Index Enabled Flag — boolean indicating whether the selection index field is editable |
| `select_index_state` | Field | Selection Index State — validation/binding state of the selection index field |
| `select_index_value` | Field | Selection Index Value — the current value of the selection index |
| `default_cd` | Field | Initial Setting Code — the default/initial code value applied to the screen when it loads |
| `default_cd_enabled` | Field | Initial Setting Code Enabled Flag — boolean indicating whether the initial setting code field is editable |
| `default_cd_state` | Field | Initial Setting Code State — validation/binding state of the initial setting code field |
| `default_cd_value` | Field | Initial Setting Code Value — the current value of the initial setting code |
| コードタイプコード | Key | "Code Type Code" — hardcoded Japanese key string for the code type code data category |
| コードタイプ名称 | Key | "Code Type Name" — hardcoded Japanese key string for the code type name data category |
| 選択インデックス | Key | "Selection Index" — hardcoded Japanese key string for the selection index data category |
| 初期設定コード | Key | "Initial Setting Code" — hardcoded Japanese key string for the initial setting code data category |
| コードタイプコード値リスト | Key | "Code Type Code Value List" — hardcoded Japanese key string for the code type code value list data category |
| コードタイプ名称リスト | Key | "Code Type Name List" — hardcoded Japanese key string for the code type name value list data category |
| key | Parameter | Item Name (項目名) — identifies which data category to resolve |
| subkey | Parameter | Sub-Key (サブキー) — identifies which property (value/enable/state) to return from a data category |
| X33VDataTypeBeanInterface | Interface | Fujitsu Futurity X33 framework interface for beans that support key/subkey-based data access |
| X33VDataTypeList | Class | X33 framework list type — a generic collection wrapper for data bean items |
| X33VDataTypeStringBean | Class | X33 framework string data bean — a single-item data bean that can be resolved via `loadModelData(subkey)` |
| X33VListedBeanInterface | Interface | X33 framework interface indicating a bean can be contained within a list/collection |
| DBean | Abbreviation | Data Bean — a server-side data holder in the X33 MVC pattern, responsible for model state |
| value | Subkey | The actual data value property |
| enable | Subkey | The editable/enabled state property |
| state | Subkey | The validation/status property |
| KKSVxxxx | Class | Screen class naming convention for `KKW00401SF` module web screens (e.g., KKSV0004, KKSV0005) |
| 項目名 (Koumoku-mei) | Japanese | Item Name — the business-level identifier for a data field on a screen |
| サブキー (Subukee) | Japanese | Sub-Key — a qualifier used to distinguish between value, enabled state, and validation state of a data item |
