# Business Logic — KKW05501SF03DBean.typeModelData() [244 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW05501SF.KKW05501SF03DBean` |
| Layer | Controller / View Data Bean (Web presentation layer) |
| Module | `KKW05501SF` (Package: `eo.web.webview.KKW05501SF`) |

## 1. Role

### KKW05501SF03DBean.typeModelData()

This method serves as the **data type resolver** for the KKW05501SF screen's view data beans. It implements a **routing/dispatch pattern** that maps item names (key) and sub-keys (subkey) to their corresponding Java `Class<?>` types. This enables the framework to determine at runtime what data type a given field should hold -- whether `String`, `Integer`, or a nested data bean -- which is essential for dynamic form rendering and data binding in the web presentation layer.

The method handles **two categories** of fields: (1) **scalar String fields** (e.g., System ID, Service Contract Number, Movement Reason Code, Address, R-ID, M-ID, CAT-ID) where the `subkey` is either `"value"` (the field's current value type) or `"state"` (the field's display/state type, also `String`); and (2) **list/array fields** (Movement Reason Code with index, Option Service Contract Number with index, Simultaneous Application Service Contract Number with index) where the key may carry a `/`-delimited index to resolve a specific element's type from a typed list.

This method is part of the **X33 view framework contract**: it implements the `X33VDataTypeBeanInterface` so that the framework can introspect the bean's field types without hardcoding. It plays a central role in the screen's data initialization pipeline, where the framework queries each field's type to decide how to render inputs, validate data, and manage view-state persistence.

The method has **17 conditional branches** covering 17 distinct item keys. Simple fields follow a uniform pattern -- check if `subkey` equals `"value"` or `"state"` and return `String.class`. Complex fields with list data parse an index from the key string, validate bounds, and delegate to the nested bean's `typeModelData(subkey)` method.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData"])
    
    START --> COND_NULL["key or subkey is null?"]
    COND_NULL -->|Yes| RET_NULL1["return null"]
    COND_NULL -->|No| FIND_SLASH["separaterPoint = indexOf('/')"]
    
    FIND_SLASH --> SYSID["key = SystemID?"]
    SYSID -->|Yes| SYSID_SUB["return String.class"]
    SYSID -->|No| SVC_KEY_NO["key = ServiceContractNo?"]
    
    SVC_KEY_NO -->|Yes| SVC_SUB["return String.class"]
    SVC_KEY_NO -->|No| IDO_DIV["key = MovementType?"]
    
    IDO_DIV -->|Yes| IDO_SUB["return String.class"]
    IDO_DIV -->|No| IDO_RSN_CD["key = MovementReasonCode?"]
    
    IDO_RSN_CD -->|Yes| IDO_RSN_PARSE["Parse index from key"]
    IDO_RSN_PARSE --> IDO_RSN_STAR["index is '*'?"]
    IDO_RSN_STAR -->|Yes| RET_INTEGER["return Integer.class"]
    IDO_RSN_STAR -->|No| IDO_RSN_TRY["try Integer.valueOf"]
    IDO_RSN_TRY --> IDO_RSN_VALID["Validate index bounds"]
    IDO_RSN_VALID -->|Out of range| RET_NULL2["return null"]
    IDO_RSN_VALID -->|In range| CALL_IDO_RSN["call typeModelData on bean in list"]
    
    IDO_RSN_CD -->|No| IDO_RSN_MEMO["key = MovementReasonMemo?"]
    IDO_RSN_MEMO -->|Yes| MEMO_SUB["return String.class"]
    IDO_RSN_MEMO -->|No| OP_SVC_KEY_NO["key = OptionServiceContractNo?"]
    
    OP_SVC_KEY_NO -->|Yes| OP_SVC_PARSE["Parse index from key"]
    OP_SVC_PARSE --> OP_SVC_CALL["call typeModelData on bean in list"]
    
    OP_SVC_KEY_NO -->|No| TRAN_DIV["key = ProcessType?"]
    TRAN_DIV -->|Yes| TRAN_SUB["return String.class"]
    TRAN_DIV -->|No| MSKM_NO["key = ApplicationNo?"]
    
    MSKM_NO -->|Yes| MSKM_SUB["return String.class"]
    MSKM_NO -->|No| MSKM_DTL_NO["key = ApplicationDetailNo?"]
    
    MSKM_DTL_NO -->|Yes| MSKM_DTL_SUB["return String.class"]
    MSKM_DTL_NO -->|No| TOKUTEI_KMK_NM["key = SpecificIdItemName?"]
    
    TOKUTEI_KMK_NM -->|Yes| TOKUTEI_NM_SUB["return String.class"]
    TOKUTEI_KMK_NM -->|No| TOKUTEI_KMK_VALUE["key = SpecificIdItemValue?"]
    
    TOKUTEI_KMK_VALUE -->|Yes| TOKUTEI_VALUE_SUB["return String.class"]
    TOKUTEI_KMK_VALUE -->|No| POPUP_MODE["key = PopupMode?"]
    
    POPUP_MODE -->|Yes| POPUP_SUB["return String.class"]
    POPUP_MODE -->|No| MSKM_SVC_KEY_NO["key = SimultaneousAppServiceContractNo?"]
    
    MSKM_SVC_KEY_NO -->|Yes| MSKM_SVC_PARSE["Parse index from key"]
    MSKM_SVC_PARSE --> MSKM_SVC_CALL["call typeModelData on bean in list"]
    
    MSKM_SVC_KEY_NO -->|No| MANS_NM["key = ManshonName?"]
    MANS_NM -->|Yes| MANS_NM_SUB["return String.class"]
    MANS_NM -->|No| MANS_AD_NM["key = Address?"]
    
    MANS_AD_NM -->|Yes| MANS_AD_SUB["return String.class"]
    MANS_AD_NM -->|No| PID["key = R-ID?"]
    
    PID -->|Yes| PID_SUB["return String.class"]
    PID -->|No| MANS_ID["key = M-ID?"]
    
    MANS_ID -->|Yes| MANS_ID_SUB["return String.class"]
    MANS_ID -->|No| CATID["key = CAT-ID?"]
    
    CATID -->|Yes| CATID_SUB["return String.class"]
    CATID -->|No| RET_NULL3["return null"]
    
    RET_NULL1 --> END(["END"])
    RET_NULL2 --> END
    RET_NULL3 --> END
    SYSID_SUB --> END
    SVC_SUB --> END
    IDO_SUB --> END
    RET_INTEGER --> END
    CALL_IDO_RSN --> END
    MEMO_SUB --> END
    OP_SVC_CALL --> END
    TRAN_SUB --> END
    MSKM_SUB --> END
    MSKM_DTL_SUB --> END
    TOKUTEI_NM_SUB --> END
    TOKUTEI_VALUE_SUB --> END
    POPUP_SUB --> END
    MSKM_SVC_CALL --> END
    MANS_NM_SUB --> END
    MANS_AD_SUB --> END
    PID_SUB --> END
    MANS_ID_SUB --> END
    CATID_SUB --> END
```

**Processing Flow Summary:**
1. **Null guard** (L1085-L1088): If either `key` or `subkey` is `null`, return `null` immediately. The comment reads: "key,subkeyがnullの場合、nullを返す" (If key and subkey are null, return null).
2. **Separator detection** (L1090): Compute the position of the first `/` character in `key` via `key.indexOf("/")`. This is used by list-type fields to extract the index portion.
3. **Branching dispatch** (L1093-L1321): A cascade of if/else-if conditions matches `key` against 17 known item names. Each branch either returns a type directly or delegates to a nested bean.
4. **Default null return** (L1321): If no key matches, return `null`. The comment reads: "条件に一致するプロパティが存在しない場合、nullを返す" (If no property matches the condition, return null).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The **item name** (項目名) that identifies which screen field to resolve. It can be a plain item name (e.g., "システムID" for System ID) or a slash-delimited path (e.g., "異動理由コード/0" for Movement Reason Code at index 0). The value determines which of the 17+ conditional branches is taken, effectively selecting the data type category for that field. Special value `"*"` in the index position signals "return the list size type" (Integer.class). |
| 2 | `subkey` | `String` | The **sub-key** (サブキー) that specifies which aspect of the field's type is being queried. Typical values are `"value"` (the type of the field's actual data value) and `"state"` (the type of the field's display/state representation). Both resolve to `String.class` for scalar fields. |

**Instance fields read by this method:**

| Field Name | Type | Business Description |
|-----------|------|---------------------|
| `hktgi_ido_rsn_cd_list` | `X33VDataTypeList` | List of Movement Reason Code beans -- used to resolve indexed sub-fields for "異動理由コード" |
| `hktgi_op_svc_kei_no_list` | `X33VDataTypeList` | List of Option Service Contract Number beans -- used to resolve indexed sub-fields for "オプションサービス契約番号" |
| `hktgi_mskm_svc_kei_no_list` | `X33VDataTypeList` | List of Simultaneous Application Service Contract Number beans -- used to resolve indexed sub-fields for "同時申請サービス契約番号" |

## 4. CRUD Operations / Called Services

This method performs **pure type introspection** -- it has no database access, no entity manipulation, and no service component calls that perform CRUD operations. All called methods are type-resolving delegates within the same bean hierarchy.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `String.substring(int)` | java.lang.String | - | Extracts the index portion of the key string (e.g., from "異動理由コード/0" extracts "0"). Used in 3 list-type branches (L1130, L1177, L1240). |
| - | `String.equalsIgnoreCase(String)` | java.lang.String | - | Case-insensitive comparison of subkey against "value" and "state". Used in all 17 branches (2 calls each = 34 calls total). |
| - | `Integer.valueOf(String)` | java.lang.Integer | - | Parses the index string to an integer for bounds checking and list access. Used in 3 list-type branches (L1137, L1184, L1247). |
| - | `ArrayList.size()` | java.util.List | - | Reads the size of the list fields for bounds validation. Used in 3 list-type branches. |
| - | `ArrayList.get(int)` | java.util.List | - | Retrieves the bean at the given index from the list for delegation. Used in 3 list-type branches. |
| - | `X33VDataTypeStringBean.typeModelData(String)` | KKW05501SF03DBean | - | Delegates subkey type resolution to the nested bean in the list. Called via cast in 3 list-type branches (L1152, L1199, L1262). |

**No C/R/U/D operations** -- this method is a pure read-only type resolver with no side effects.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0004 (KKW05501SF) | `KKW05501SFBean.typeModelData(gamenId, key, subkey)` -> `KKW05501SF03DBean.typeModelData(key, subkey)` | `X33VDataTypeStringBean.typeModelData(subkey)` [R] (delegated to nested bean in list) |

**Notes:**
- The primary caller is `KKW05501SFBean.typeModelData(String key, String subkey)` (L9766 in KKW05501SFBean.java), which delegates to the DBean's implementation.
- A wrapper variant `KKW05501SFBean.typeModelData(String gamenId, String key, String subkey)` (L9755) strips the `gamenId` parameter and delegates to `typeModelData(key, subkey)`.
- The pre-computed caller analysis confirms this method is only directly called from within its own class (`KKW05501SF03DBean.typeModelData()`), indicating it serves as the canonical implementation that the parent Bean class delegates to.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `key == null || subkey == null` (L1085)

> Null guard: if either parameter is null, return null immediately.
> Comment: "key,subkeyがnullの場合、nullを返す" (If key and subkey are null, return null).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null` |

**Block 2** — [EXEC] `key.indexOf("/")` (L1090)

> Compute the position of the first "/" separator, used later by list-type branches.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/")` |

**Block 3** — [ELSE-IF] `key.equals("システムID")` [SystemID] (L1093)

> Branch for the System ID field. Returns `String.class` for both "value" and "state" subkeys.
> Comment: "データタイプがStringの項目"システムID"(項目ID:hktgi_sysid)" (Data type is String item "System ID" (item ID: hktgi_sysid)).

**Block 3.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1094)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 3.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1097)

> Comment: "subkeyが"state"の場合、ステータスを返す" (When subkey is "state", return the status type).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 4** — [ELSE-IF] `key.equals("サービス契約番号")` [ServiceContractNo] (L1103)

> Branch for the Service Contract Number field. Same pattern as Block 3.
> Comment: "データタイプがStringの項目"サービス契約番号"(項目ID:hktgi_svc_kei_no)" (Data type is String item "Service Contract Number" (item ID: hktgi_svc_kei_no)).

**Block 4.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1104)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 4.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1107)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 5** — [ELSE-IF] `key.equals("異動区分")` [MovementType] (L1113)

> Branch for the Movement Type (transfer/division type) field. Same pattern.
> Comment: "データタイプがStringの項目"異動区分"(項目ID:hktgi_ido_div)" (Data type is String item "Movement Type" (item ID: hktgi_ido_div)).

**Block 5.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1114)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 5.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1117)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 6** — [ELSE-IF] `key.equals("異動理由コード")` [MovementReasonCode] (L1123)

> Branch for the Movement Reason Code -- a **list/array field**. Parses an index from the key, resolves the bean at that index, and delegates to its `typeModelData(subkey)`.
> Comment: "配置項目 "異動理由コード"(String型、項目ID:hktgi_ido_rsn_cd)" (Array item "Movement Reason Code" (String type, item ID: hktgi_ido_rsn_cd)).

**Block 6.1** — [EXEC] Extract index substring (L1126)

> Comment: "keyの次の要素を取得" (Get the next element of key).
> Comment: "("異動理由コード/0"から最初の"/"より後を取得)" (Get everything after the first "/" from "MovementReasonCode/0").

| # | Type | Code |
|---|------|------|
| 1 | SET | `key = key.substring(separaterPoint + 1)` |

**Block 6.2** — [IF] `key.equals("*")` (L1128)

> Comment: "インデックス値の代わりに"*"が指定されていたら、リストの要素数を返す" (If "*" is specified instead of an index value, return the number of list elements).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return Integer.class` |

**Block 6.3** — [TRY-CATCH] `Integer.valueOf(key)` (L1133-L1142)

> Comment: "次はリスト中のインデックスを見る" (Next, look at the index in the list).
> Comment: "インデックス値が数値文字列でない場合は、ここでnullを返す" (If the index value is not a numeric string, return null here).

| # | Type | Code |
|---|------|------|
| 1 | SET | `Integer tmpIndexInt = null` |
| 2 | SET | `tmpIndexInt = Integer.valueOf(key)` (try block) |
| 3 | CATCH | `catch(NumberFormatException e) { return null }` |

**Block 6.4** — [IF] `tmpIndexInt == null` (L1143)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null` |

**Block 6.5** — [IF] `tmpIndex < 0 || tmpIndex >= hktgi_ido_rsn_cd_list.size()` (L1148)

> Comment: "インデックス値がリスト個数-1を超えると、ここでnullを返す" (If the index value exceeds list count - 1, return null here).

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` |
| 2 | RETURN | `return null` (out of bounds) |
| 3 | CALL | `((X33VDataTypeStringBean)hktgi_ido_rsn_cd_list.get(tmpIndex)).typeModelData(subkey)` (in bounds) |

**Block 7** — [ELSE-IF] `key.equals("異動理由メモ")` [MovementReasonMemo] (L1156)

> Branch for the Movement Reason Memo field. Scalar String type.
> Comment: "データタイプがStringの項目"異動理由メモ"(項目ID:hktgi_ido_rsn_memo)" (Data type is String item "Movement Reason Memo" (item ID: hktgi_ido_rsn_memo)).

**Block 7.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1157)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 7.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1160)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 8** — [ELSE-IF] `key.equals("オプションサービス契約番号")` [OptionServiceContractNo] (L1166)

> Branch for the Option Service Contract Number -- a **list/array field**. Same index-parse pattern as Block 6.
> Comment: "配置項目 "オプションサービス契約番号"(String型、項目ID:hktgi_op_svc_kei_no)" (Array item "Option Service Contract Number" (String type, item ID: hktgi_op_svc_kei_no)).

**Block 8.1** — [EXEC] Extract index substring (L1169)

> Comment: "keyの次の要素を取得" (Get the next element of key).
> Comment: "("オプションサービス契約番号/0"から最初の"/"より後を取得)" (Get everything after the first "/" from "OptionServiceContractNo/0").

| # | Type | Code |
|---|------|------|
| 1 | SET | `key = key.substring(separaterPoint + 1)` |

**Block 8.2** — [IF] `key.equals("*")` (L1171)

> Comment: "インデックス値の代わりに"*"が指定されていたら、リストの要素数を返す" (If "*" is specified instead of an index value, return the number of list elements).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return Integer.class` |

**Block 8.3** — [TRY-CATCH] `Integer.valueOf(key)` (L1176-L1185)

> Same parsing pattern as Block 6.3.

| # | Type | Code |
|---|------|------|
| 1 | SET | `Integer tmpIndexInt = null` |
| 2 | SET | `tmpIndexInt = Integer.valueOf(key)` (try) |
| 3 | CATCH | `catch(NumberFormatException e) { return null }` |

**Block 8.4** — [IF] `tmpIndex < 0 || tmpIndex >= hktgi_op_svc_kei_no_list.size()` (L1194)

> Comment: "インデックス値がリスト個数-1を超えると、ここでnullを返す" (If index exceeds list count - 1, return null here).

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` |
| 2 | RETURN | `return null` (out of bounds) |
| 3 | CALL | `((X33VDataTypeStringBean)hktgi_op_svc_kei_no_list.get(tmpIndex)).typeModelData(subkey)` (in bounds) |

**Block 9** — [ELSE-IF] `key.equals("処理区分")` [ProcessType] (L1204)

> Branch for the Process Type field. Scalar String type.
> Comment: "データタイプがStringの項目"処理区分"(項目ID:hktgi_tran_div)" (Data type is String item "Process Type" (item ID: hktgi_tran_div)).

**Block 9.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1205)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 9.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1208)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 10** — [ELSE-IF] `key.equals("申請番号")` [ApplicationNo] (L1214)

> Branch for the Application Number field. Scalar String type.
> Comment: "データタイプがStringの項目"申請番号"(項目ID:hktgi_mskm_no)" (Data type is String item "Application Number" (item ID: hktgi_mskm_no)).

**Block 10.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1215)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 10.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1218)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 11** — [ELSE-IF] `key.equals("申請明細番号")` [ApplicationDetailNo] (L1224)

> Branch for the Application Detail Number field. Scalar String type.
> Comment: "データタイプがStringの項目"申請明細番号"(項目ID:hktgi_mskm_dtl_no)" (Data type is String item "Application Detail Number" (item ID: hktgi_mskm_dtl_no)).

**Block 11.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1225)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 11.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1228)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 12** — [ELSE-IF] `key.equals("特定ID項目名")` [SpecificIdItemName] (L1234)

> Branch for the Specific ID Item Name field. Scalar String type.
> Comment: "データタイプがStringの項目"特定ID項目名"(項目ID:hktgi_tokutei_id_kmk_nm)" (Data type is String item "Specific ID Item Name" (item ID: hktgi_tokutei_id_kmk_nm)).

**Block 12.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1235)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 12.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1238)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 13** — [ELSE-IF] `key.equals("特定ID項目値")` [SpecificIdItemValue] (L1244)

> Branch for the Specific ID Item Value field. Scalar String type.
> Comment: "データタイプがStringの項目"特定ID項目値"(項目ID:hktgi_tokutei_id_kmk_value)" (Data type is String item "Specific ID Item Value" (item ID: hktgi_tokutei_id_kmk_value)).

**Block 13.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1245)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 13.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1248)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 14** — [ELSE-IF] `key.equals("ポップアップモード")` [PopupMode] (L1254)

> Branch for the Popup Mode field. Scalar String type.
> Comment: "データタイプがStringの項目"ポップアップモード"(項目ID:hktgi_popup_mode)" (Data type is String item "Popup Mode" (item ID: hktgi_popup_mode)).

**Block 14.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1255)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 14.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1258)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 15** — [ELSE-IF] `key.equals("同時申請サービス契約番号")` [SimultaneousAppServiceContractNo] (L1264)

> Branch for the Simultaneous Application Service Contract Number -- a **list/array field**. Same index-parse pattern as Block 6 and Block 8.
> Comment: "配置項目 "同時申請サービス契約番号"(String型、項目ID:hktgi_mskm_svc_kei_no)" (Array item "Simultaneous Application Service Contract Number" (String type, item ID: hktgi_mskm_svc_kei_no)).

**Block 15.1** — [EXEC] Extract index substring (L1267)

> Comment: "keyの次の要素を取得" (Get the next element of key).

| # | Type | Code |
|---|------|------|
| 1 | SET | `key = key.substring(separaterPoint + 1)` |

**Block 15.2** — [IF] `key.equals("*")` (L1269)

> Comment: "インデックス値の代わりに"*"が指定されていたら、リストの要素数を返す" (If "*" is specified instead of an index value, return the number of list elements).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return Integer.class` |

**Block 15.3** — [TRY-CATCH] `Integer.valueOf(key)` (L1274-L1283)

> Same parsing pattern as Block 6.3.

| # | Type | Code |
|---|------|------|
| 1 | SET | `Integer tmpIndexInt = null` |
| 2 | SET | `tmpIndexInt = Integer.valueOf(key)` (try) |
| 3 | CATCH | `catch(NumberFormatException e) { return null }` |

**Block 15.4** — [IF] `tmpIndex < 0 || tmpIndex >= hktgi_mskm_svc_kei_no_list.size()` (L1292)

> Comment: "インデックス値がリスト個数-1を超えると、ここでnullを返す" (If index exceeds list count - 1, return null here).

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` |
| 2 | RETURN | `return null` (out of bounds) |
| 3 | CALL | `((X33VDataTypeStringBean)hktgi_mskm_svc_kei_no_list.get(tmpIndex)).typeModelData(subkey)` (in bounds) |

**Block 16** — [ELSE-IF] `key.equals("マンション名")` [MansionName] (L1298)

> Branch for the Mansion Name field. Scalar String type.
> Comment: "データタイプがStringの項目"マンション名"(項目ID:hktgi_mans_nm)" (Data type is String item "Mansion Name" (item ID: hktgi_mans_nm)).

**Block 16.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1299)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 16.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1302)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 17** — [ELSE-IF] `key.equals("住所")` [Address] (L1308)

> Branch for the Address field. Scalar String type.
> Comment: "データタイプがStringの項目"住所"(項目ID:hktgi_mans_ad_nm)" (Data type is String item "Address" (item ID: hktgi_mans_ad_nm)).

**Block 17.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1309)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 17.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1312)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 18** — [ELSE-IF] `key.equals("R-ID")` [R_ID] (L1318)

> Branch for the R-ID field (tenant/renter ID). Scalar String type.
> Comment: "データタイプがStringの項目"R-ID"(項目ID:hktgi_pid)" (Data type is String item "R-ID" (item ID: hktgi_pid)).

**Block 18.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1319)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 18.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1322)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 19** — [ELSE-IF] `key.equals("M-ID")` [M_ID] (L1328)

> Branch for the M-ID field (manager/landlord ID). Scalar String type.
> Comment: "データタイプがStringの項目"M-ID"(項目ID:hktgi_mans_id)" (Data type is String item "M-ID" (item ID: hktgi_mans_id)).

**Block 19.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1329)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 19.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1332)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 20** — [ELSE-IF] `key.equals("CAT-ID")` [CAT_ID] (L1338)

> Branch for the CAT-ID field (category ID). Scalar String type.
> Comment: "データタイプがStringの項目"CAT-ID"(項目ID:hktgi_catid)" (Data type is String item "CAT-ID" (item ID: hktgi_catid)).

**Block 20.1** — [IF] `subkey.equalsIgnoreCase("value")` (L1339)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 20.2** — [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L1342)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return String.class` |

**Block 21** — [ELSE / FALLTHROUGH] (L1347)

> No matching key found. Return null.
> Comment: "条件に一致するプロパティが存在しない場合、nullを返す" (If no property matches the condition, return null).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `hktgi_sysid` | Field | System ID -- internal system identifier for the tenant/renter record |
| `hktgi_sysid_value` | Field | System ID value -- the current stored value of the system ID field |
| `hktgi_sysid_state` | Field | System ID state -- display/state metadata for the system ID field |
| `hktgi_svc_kei_no` | Field | Service contract number -- the unique identifier for a service contract line item |
| `hktgi_svc_kei_no_value` | Field | Service contract number value |
| `hktgi_svc_kei_no_state` | Field | Service contract number state metadata |
| `hktgi_ido_div` | Field | Movement/division type -- the type of movement or transfer (e.g., new connection, cancellation, change) |
| `hktgi_ido_div_value` | Field | Movement type value |
| `hktgi_ido_div_state` | Field | Movement type state metadata |
| `hktgi_ido_rsn_cd_list` | Field | List of Movement Reason Code beans -- array of X33VDataTypeStringBean instances, each representing a reason code entry in the movement reason list |
| `hktgi_ido_rsn_cd` | Field | Movement reason code -- the code identifying why a movement/transfer occurred |
| `hktgi_ido_rsn_memo` | Field | Movement reason memo -- free-text explanation for the movement reason |
| `hktgi_op_svc_kei_no_list` | Field | List of Option Service Contract Number beans -- array of X33VDataTypeStringBean for option services attached to the main contract |
| `hktgi_op_svc_kei_no` | Field | Option service contract number -- identifies optional/add-on services (e.g., security, insurance) |
| `hktgi_tran_div` | Field | Process type/division -- categorizes the kind of processing being performed |
| `hktgi_mskm_no` | Field | Application number -- the unique identifier for a service application |
| `hktgi_mskm_dtl_no` | Field | Application detail number -- the line item number within an application |
| `hktgi_tokutei_id_kmk_nm` | Field | Specific ID item name -- the name of a custom/specific identifier field |
| `hktgi_tokutei_id_kmk_value` | Field | Specific ID item value -- the value of a custom/specific identifier field |
| `hktgi_popup_mode` | Field | Popup mode -- controls how popup dialogs are displayed on the screen |
| `hktgi_mskm_svc_kei_no_list` | Field | List of Simultaneous Application Service Contract Number beans -- array for multiple services applied at the same time |
| `hktgi_mskm_svc_kei_no` | Field | Simultaneous application service contract number -- service contracts applied for concurrently in a single application batch |
| `hktgi_mans_nm` | Field | Mansion/hotel name -- the name of the residential building or facility |
| `hktgi_mans_ad_nm` | Field | Address -- the physical address of the resident |
| `hktgi_pid` | Field | R-ID -- Rent tenant ID, identifying the resident/tenant |
| `hktgi_mans_id` | Field | M-ID -- Manager/Landlord ID, identifying the property manager |
| `hktgi_catid` | Field | CAT-ID -- Category ID, classifying the type of entity |
| `X33VDataTypeBeanInterface` | Interface | X33 framework interface for data type introspection -- defines the `typeModelData` contract |
| `X33VListedBeanInterface` | Interface | X33 framework interface for list-based beans -- enables the bean to participate in list rendering |
| `X33VDataTypeList` | Class | Framework class for managing lists of typed data beans within the X33 view layer |
| `X33VDataTypeStringBean` | Class | Framework bean class for String-typed list items -- each element in the three list fields is cast to this type |
| 項目名 (koumokumei) | Japanese term | Item name -- the human-readable label used to identify a form field in the screen |
| サブキー (sabukii) | Japanese term | Sub-key -- the secondary key that disambiguates which attribute of a field is being queried (value, state, enable) |
| 異動 (ido) | Japanese term | Movement/transfer -- in telecom/service context, refers to changes in service status (add, cancel, transfer) |
| 申請 (shinsei) | Japanese term | Application -- refers to a service request/application for telecom services |
| 管理 (kanri) | Context term | Management -- in the KKW05501 module context, refers to customer/service contract management |
| String.class | Type | Java class representing string-typed data -- returned for "value" and "state" subkey lookups |
| Integer.class | Type | Java class representing integer data -- returned when "*" is used as an index to query list size type |
