# Business Logic — KKW01037SFBean.loadModelData() [178 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW01037SF.KKW01037SFBean` |
| Layer | View Bean / Web MVC Controller Layer |
| Module | `KKW01037SF` (Package: `eo.web.webview.KKW01037SF`) |

## 1. Role

### KKW01037SFBean.loadModelData()

This method serves as the central data access gateway for the KKW01037SF screen's view model, implementing a hierarchical key-based routing and dispatch pattern. It retrieves data values and status flags from the bean's internal state by parsing a structured `key` string that identifies the target field, service type category, or list element. The method handles eight distinct business data categories: system identifier (継続システムID), customer service category (継続お客様情報), referral contract party name (紹介者契約者名), referral phone number (紹介者電話番号), referral system identifier (紹介者システムID), service contract full list (サービス契約一覧リスト), customer contract succession list (顧客契約引継リスト), and popup mode (ポップアップモード). For scalar fields it routes to specific getter methods that return either the value, enabled state, or display status depending on the `subkey` parameter. For list-based fields it supports wildcard queries (e.g., index `*`) to return list sizes, and fully delegated indexed lookups that route through to individual list element beans implementing `X33VDataTypeBeanInterface`. This design follows the **routing/dispatch pattern** combined with **delegation**, where the parent bean acts as a facade that forwards requests to subordinate data beans, making it a shared utility called by many screen methods to achieve loose coupling between the view layer and the data model.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["Start: loadModelData(key, subkey)"])
    CHECK_NULL_KEY["Is key null?"]
    RETURN_NULL_KEY["Return null"]
    CHECK_NULL_SUBKEY["Is subkey null?"]
    SET_SUBKEY_EMPTY["Set subkey = empty string"]
    CHECK_COMMON_INFO["separaterPoint = key.indexOf('//')"]
    CHECK_COMMON_INFO_ZERO["Is separaterPoint == 0?"]
    CALL_SUPER_COMMON["Call super.loadCommonInfoData(key)"]
    CHECK_ROOT_SLASH["separaterPoint = key.indexOf('/')"]
    CHECK_SLASH_GT0["Is separaterPoint > 0?"]
    EXTRACT_KEY_ELEMENT["Extract keyElement = key.substring(0, separaterPoint)"]
    ELSE_KEY_ELEMENT["Set keyElement = key"]
    CHECK_CONT_SYSTEM_ID["keyElement == '継続システムID'?"]
    CHECK_CONT_SYS_SUBKEY_VALUE["subkey.equalsIgnoreCase('value')?"]
    RETURN_HKTG_SYSID_VAL["Return getHktg_sysid_value()"]
    CHECK_CONT_SYS_SUBKEY_STATE["subkey.equalsIgnoreCase('state')?"]
    RETURN_HKTG_SYSID_STATE["Return getHktg_sysid_state()"]
    CHECK_CONT_CUSTOMER_INFO["keyElement == '継続お客様情報'?"]
    CHECK_CONT_CUST_SUBKEY_VALUE["subkey.equalsIgnoreCase('value')?"]
    RETURN_HKTG_SVC_VAL["Return getHktg_svc_kei_no_value()"]
    CHECK_CONT_CUST_SUBKEY_STATE["subkey.equalsIgnoreCase('state')?"]
    RETURN_HKTG_SVC_STATE["Return getHktg_svc_kei_no_state()"]
    CHECK_REFERRAL_CONTRACT_NAME["keyElement == '紹介者契約者名'?"]
    CHECK_REF_CON_SUBKEY_VALUE["subkey.equalsIgnoreCase('value')?"]
    RETURN_REF_CON_VAL["Return getHi_cust_nm_value()"]
    CHECK_REF_CON_SUBKEY_ENABLE["subkey.equalsIgnoreCase('enable')?"]
    RETURN_REF_CON_ENABLED["Return getHi_cust_nm_enabled()"]
    CHECK_REF_CON_SUBKEY_STATE["subkey.equalsIgnoreCase('state')?"]
    RETURN_REF_CON_STATE["Return getHi_cust_nm_state()"]
    CHECK_REFERRAL_TELNO["keyElement == '紹介者電話番号'?"]
    CHECK_REF_TEL_SUBKEY_VALUE["subkey.equalsIgnoreCase('value')?"]
    RETURN_REF_TEL_VAL["Return getHi_telno_value()"]
    CHECK_REF_TEL_SUBKEY_ENABLE["subkey.equalsIgnoreCase('enable')?"]
    RETURN_REF_TEL_ENABLED["Return getHi_telno_enabled()"]
    CHECK_REF_TEL_SUBKEY_STATE["subkey.equalsIgnoreCase('state')?"]
    RETURN_REF_TEL_STATE["Return getHi_telno_state()"]
    CHECK_REFERRAL_SYSID["keyElement == '紹介者システムID'?"]
    CHECK_REF_SYS_SUBKEY_VALUE["subkey.equalsIgnoreCase('value')?"]
    RETURN_REF_SYS_VAL["Return getHi_sysid_value()"]
    CHECK_REF_SYS_SUBKEY_ENABLE["subkey.equalsIgnoreCase('enable')?"]
    RETURN_REF_SYS_ENABLED["Return getHi_sysid_enabled()"]
    CHECK_REF_SYS_SUBKEY_STATE["subkey.equalsIgnoreCase('state')?"]
    RETURN_REF_SYS_STATE["Return getHi_sysid_state()"]
    CHECK_SVC_LIST["keyElement == 'サービス契約一覧リスト'?"]
    EXTRACT_KEY_REMAIN["Extract keyRemain = key.substring(separaterPoint + 1)"]
    CHECK_KEY_REMAIN_WILDCARD["keyRemain == '*'?"]
    RETURN_SVC_LIST_SIZE["Return svc_kei_list_list.size()"]
    CHECK_SVC_SEP_GT0["separaterPoint = keyRemain.indexOf('/') > 0?"]
    SVC_RETURN_NULL_1["Return null"]
    EXTRACT_SVC_INDEX["keyElement = keyRemain.substring(0, separaterPoint)"]
    SVC_PARSE_INDEX["Parse keyElement as Integer (tmpIndexInt)"]
    SVC_INDEX_PARSE_ERROR["NumberFormatException caught?"]
    SVC_INDEX_NULL["tmpIndexInt == null?"]
    SVC_INDEX_BOUNDS["tmpIndex < 0 || tmpIndex >= svc_kei_list_list.size()?"]
    SVC_EXTRACT_SUB_KEY["keyElement = keyRemain.substring(separaterPoint + 1)"]
    SVC_DELEGATE_LOAD["Delegate: svc_kei_list_list.get(tmpIndex).loadModelData(keyElement, subkey)"]
    CHECK_CUST_LIST["keyElement == '顧客契約引継リスト'?"]
    EXTRACT_CUST_KEY_REMAIN["Extract keyRemain = key.substring(separaterPoint + 1)"]
    CHECK_CUST_KEY_REMAIN_WILDCARD["keyRemain == '*'?"]
    RETURN_CUST_LIST_SIZE["Return cust_kei_hktgi_list_list.size()"]
    CHECK_CUST_SEP_GT0["separaterPoint = keyRemain.indexOf('/') > 0?"]
    CUST_RETURN_NULL_1["Return null"]
    EXTRACT_CUST_INDEX["keyElement = keyRemain.substring(0, separaterPoint)"]
    CUST_PARSE_INDEX["Parse keyElement as Integer (tmpIndexInt)"]
    CUST_INDEX_PARSE_ERROR["NumberFormatException caught?"]
    CUST_INDEX_NULL["tmpIndexInt == null?"]
    CUST_INDEX_BOUNDS["tmpIndex < 0 || tmpIndex >= cust_kei_hktgi_list_list.size()?"]
    CUST_EXTRACT_SUB_KEY["keyElement = keyRemain.substring(separaterPoint + 1)"]
    CUST_DELEGATE_LOAD["Delegate: cust_kei_hktgi_list_list.get(tmpIndex).loadModelData(keyElement, subkey)"]
    CHECK_POPUP_MODE["keyElement == 'ポップアップモード'?"]
    CHECK_POPUP_SUBKEY_VALUE["subkey.equalsIgnoreCase('value')?"]
    RETURN_POPUP_VAL["Return getPopup_mode_value()"]
    CHECK_POPUP_SUBKEY_STATE["subkey.equalsIgnoreCase('state')?"]
    RETURN_POPUP_STATE["Return getPopup_mode_state()"]
    END_RETURN_NULL["Return null"]

    START --> CHECK_NULL_KEY
    CHECK_NULL_KEY -->|"Yes"| RETURN_NULL_KEY
    CHECK_NULL_KEY -->|"No"| CHECK_NULL_SUBKEY
    CHECK_NULL_SUBKEY -->|"Yes"| SET_SUBKEY_EMPTY
    SET_SUBKEY_EMPTY --> CHECK_COMMON_INFO
    CHECK_NULL_SUBKEY -->|"No"| CHECK_COMMON_INFO
    CHECK_COMMON_INFO --> CHECK_COMMON_INFO_ZERO
    CHECK_COMMON_INFO_ZERO -->|"Yes"| CALL_SUPER_COMMON
    CHECK_COMMON_INFO_ZERO -->|"No"| CHECK_ROOT_SLASH
    CHECK_SLASH_GT0 -->|"Yes"| EXTRACT_KEY_ELEMENT
    CHECK_SLASH_GT0 -->|"No"| ELSE_KEY_ELEMENT
    EXTRACT_KEY_ELEMENT --> CHECK_CONT_SYSTEM_ID
    ELSE_KEY_ELEMENT --> CHECK_CONT_SYSTEM_ID
    CHECK_CONT_SYSTEM_ID -->|"Yes"| CHECK_CONT_SYS_SUBKEY_VALUE
    CHECK_CONT_SYS_SUBKEY_VALUE -->|"Yes"| RETURN_HKTG_SYSID_VAL
    CHECK_CONT_SYS_SUBKEY_VALUE -->|"No"| CHECK_CONT_SYS_SUBKEY_STATE
    CHECK_CONT_SYS_SUBKEY_STATE -->|"Yes"| RETURN_HKTG_SYSID_STATE
    CHECK_CONT_SYS_SUBKEY_STATE -->|"No"| CHECK_CONT_CUSTOMER_INFO
    CHECK_CONT_CUSTOMER_INFO -->|"Yes"| CHECK_CONT_CUST_SUBKEY_VALUE
    CHECK_CONT_CUST_SUBKEY_VALUE -->|"Yes"| RETURN_HKTG_SVC_VAL
    CHECK_CONT_CUST_SUBKEY_VALUE -->|"No"| CHECK_CONT_CUST_SUBKEY_STATE
    CHECK_CONT_CUST_SUBKEY_STATE -->|"Yes"| RETURN_HKTG_SVC_STATE
    CHECK_CONT_CUST_SUBKEY_STATE -->|"No"| CHECK_REFERRAL_CONTRACT_NAME
    CHECK_REFERRAL_CONTRACT_NAME -->|"Yes"| CHECK_REF_CON_SUBKEY_VALUE
    CHECK_REF_CON_SUBKEY_VALUE -->|"Yes"| RETURN_REF_CON_VAL
    CHECK_REF_CON_SUBKEY_VALUE -->|"No"| CHECK_REF_CON_SUBKEY_ENABLE
    CHECK_REF_CON_SUBKEY_ENABLE -->|"Yes"| RETURN_REF_CON_ENABLED
    CHECK_REF_CON_SUBKEY_ENABLE -->|"No"| CHECK_REF_CON_SUBKEY_STATE
    CHECK_REF_CON_SUBKEY_STATE -->|"Yes"| RETURN_REF_CON_STATE
    CHECK_REF_CON_SUBKEY_STATE -->|"No"| CHECK_REFERRAL_TELNO
    CHECK_REFERRAL_TELNO -->|"Yes"| CHECK_REF_TEL_SUBKEY_VALUE
    CHECK_REF_TEL_SUBKEY_VALUE -->|"Yes"| RETURN_REF_TEL_VAL
    CHECK_REF_TEL_SUBKEY_VALUE -->|"No"| CHECK_REF_TEL_SUBKEY_ENABLE
    CHECK_REF_TEL_SUBKEY_ENABLE -->|"Yes"| RETURN_REF_TEL_ENABLED
    CHECK_REF_TEL_SUBKEY_ENABLE -->|"No"| CHECK_REF_TEL_SUBKEY_STATE
    CHECK_REF_TEL_SUBKEY_STATE -->|"Yes"| RETURN_REF_TEL_STATE
    CHECK_REF_TEL_SUBKEY_STATE -->|"No"| CHECK_REFERRAL_SYSID
    CHECK_REFERRAL_SYSID -->|"Yes"| CHECK_REF_SYS_SUBKEY_VALUE
    CHECK_REF_SYS_SUBKEY_VALUE -->|"Yes"| RETURN_REF_SYS_VAL
    CHECK_REF_SYS_SUBKEY_VALUE -->|"No"| CHECK_REF_SYS_SUBKEY_ENABLE
    CHECK_REF_SYS_SUBKEY_ENABLE -->|"Yes"| RETURN_REF_SYS_ENABLED
    CHECK_REF_SYS_SUBKEY_ENABLE -->|"No"| CHECK_REF_SYS_SUBKEY_STATE
    CHECK_REF_SYS_SUBKEY_STATE -->|"Yes"| RETURN_REF_SYS_STATE
    CHECK_REF_SYS_SUBKEY_STATE -->|"No"| CHECK_SVC_LIST
    CHECK_SVC_LIST -->|"Yes"| EXTRACT_KEY_REMAIN
    EXTRACT_KEY_REMAIN --> CHECK_KEY_REMAIN_WILDCARD
    CHECK_KEY_REMAIN_WILDCARD -->|"Yes"| RETURN_SVC_LIST_SIZE
    CHECK_KEY_REMAIN_WILDCARD -->|"No"| CHECK_SVC_SEP_GT0
    CHECK_SVC_SEP_GT0 -->|"No"| SVC_RETURN_NULL_1
    CHECK_SVC_SEP_GT0 -->|"Yes"| EXTRACT_SVC_INDEX
    EXTRACT_SVC_INDEX --> SVC_PARSE_INDEX
    SVC_PARSE_INDEX --> SVC_INDEX_PARSE_ERROR
    SVC_INDEX_PARSE_ERROR -->|"Yes"| SVC_RETURN_NULL_1
    SVC_INDEX_PARSE_ERROR -->|"No"| SVC_INDEX_NULL
    SVC_INDEX_NULL -->|"Yes"| SVC_RETURN_NULL_1
    SVC_INDEX_NULL -->|"No"| SVC_INDEX_BOUNDS
    SVC_INDEX_BOUNDS -->|"Yes"| SVC_RETURN_NULL_1
    SVC_INDEX_BOUNDS -->|"No"| SVC_EXTRACT_SUB_KEY
    SVC_EXTRACT_SUB_KEY --> SVC_DELEGATE_LOAD
    CHECK_SVC_LIST -->|"No"| CHECK_CUST_LIST
    CHECK_CUST_LIST -->|"Yes"| EXTRACT_CUST_KEY_REMAIN
    EXTRACT_CUST_KEY_REMAIN --> CHECK_CUST_KEY_REMAIN_WILDCARD
    CHECK_CUST_KEY_REMAIN_WILDCARD -->|"Yes"| RETURN_CUST_LIST_SIZE
    CHECK_CUST_KEY_REMAIN_WILDCARD -->|"No"| CHECK_CUST_SEP_GT0
    CHECK_CUST_SEP_GT0 -->|"No"| CUST_RETURN_NULL_1
    CHECK_CUST_SEP_GT0 -->|"Yes"| EXTRACT_CUST_INDEX
    EXTRACT_CUST_INDEX --> CUST_PARSE_INDEX
    CUST_PARSE_INDEX --> CUST_INDEX_PARSE_ERROR
    CUST_INDEX_PARSE_ERROR -->|"Yes"| CUST_RETURN_NULL_1
    CUST_INDEX_PARSE_ERROR -->|"No"| CUST_INDEX_NULL
    CUST_INDEX_NULL -->|"Yes"| CUST_RETURN_NULL_1
    CUST_INDEX_NULL -->|"No"| CUST_INDEX_BOUNDS
    CUST_INDEX_BOUNDS -->|"Yes"| CUST_RETURN_NULL_1
    CUST_INDEX_BOUNDS -->|"No"| CUST_EXTRACT_SUB_KEY
    CUST_EXTRACT_SUB_KEY --> CUST_DELEGATE_LOAD
    CHECK_CUST_LIST -->|"No"| CHECK_POPUP_MODE
    CHECK_POPUP_MODE -->|"Yes"| CHECK_POPUP_SUBKEY_VALUE
    CHECK_POPUP_SUBKEY_VALUE -->|"Yes"| RETURN_POPUP_VAL
    CHECK_POPUP_SUBKEY_VALUE -->|"No"| CHECK_POPUP_SUBKEY_STATE
    CHECK_POPUP_SUBKEY_STATE -->|"Yes"| RETURN_POPUP_STATE
    CHECK_POPUP_SUBKEY_STATE -->|"No"| END_RETURN_NULL
    CHECK_POPUP_MODE -->|"No"| END_RETURN_NULL
```

This method acts as a **centralized routing gateway** that parses a key string and dispatches the request to the appropriate data retrieval handler.

**Phase 1 — Input Validation and Normalization**
The method first checks if `key` is `null` and returns `null` immediately if so. If `subkey` is `null`, it is normalized to an empty string to prevent downstream `null` checks.

**Phase 2 — Common Info Detection**
The method checks if `key` starts with the `//` separator (indicating a common-info view item). If `separaterPoint == 0`, the request is delegated entirely to the parent class's `loadCommonInfoData(key)` method, which handles shared informational display data.

**Phase 3 — Key Element Extraction**
For non-common-info keys, the method locates the first `/` separator. If found (position > 0), the first element before the `/` is extracted as `keyElement` (e.g., from `"サービス契約一覧リスト/0/planName"` the keyElement is `"サービス契約一覧リスト"`). If no separator is found, the entire key is treated as the keyElement for scalar fields.

**Phase 4 — Type-Based Dispatch**
The method branches into 8 type-specific handlers:

1. **継続システムID** (HKTG_SYSID) — Returns the system ID value or state based on subkey.
2. **継続お客様情報** (HKTG_SVC_KEI_NO) — Returns the customer service category value or state.
3. **紹介者契約者名** (HI_CUST_NM) — Returns the referral contract party name value, enabled flag, or state.
4. **紹介者電話番号** (HI_TELNO) — Returns the referral phone number value, enabled flag, or state.
5. **紹介者システムID** (HI_SYSID) — Returns the referral system ID value, enabled flag, or state.
6. **サービス契約一覧リスト** (SVC_KEI_LIST) — A hierarchical list type supporting index-based delegation to child beans.
7. **顧客契約引継リスト** (CUST_KEI_HKTGI_LIST) — A hierarchical list type with the same structure as the service list.
8. **ポップアップモード** (POPUP_MODE) — Returns the popup mode value or state.

**Phase 5 — List Type Handling**
For list-based types (Items 6 and 7), the method parses the remaining key path to extract an array index (as a numeric string) and delegates to the specific list element's `loadModelData` method. If the index is `*`, it returns the list size. Index validation catches `NumberFormatException` and out-of-bounds access.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | A hierarchical field identifier that routes to specific data categories. For scalar fields, it contains the Japanese field name (e.g., `継続システムID`). For list types, it follows the pattern `FieldPath/Index/SubField` (e.g., `サービス契約一覧リスト/0/planName`). For common-info items, it starts with `//`. If `null`, the method returns `null` immediately. |
| 2 | `subkey` | `String` | A sub-identifier within the field that specifies which attribute to retrieve. For scalar fields it is `value`, `state`, or `enable` (for boolean-enabled fields). For list elements it targets a specific sub-field of the child bean. If `null`, it is normalized to an empty string. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `hktg_sysid_value` | `String` | The continuation system ID value |
| `hktg_sysid_state` | `String` | The display/interaction state of the system ID field |
| `hktg_svc_kei_no_value` | `String` | The customer service category value |
| `hktg_svc_kei_no_state` | `String` | The state of the service category field |
| `hi_cust_nm_value` | `String` | The referral contract party name value |
| `hi_cust_nm_enabled` | `Boolean` | Whether the referral contract party name field is enabled |
| `hi_cust_nm_state` | `String` | The state of the referral contract party name field |
| `hi_telno_value` | `String` | The referral phone number value |
| `hi_telno_enabled` | `Boolean` | Whether the referral phone number field is enabled (default: `true`) |
| `hi_telno_state` | `String` | The state of the referral phone number field |
| `hi_sysid_value` | `String` | The referral system ID value |
| `hi_sysid_enabled` | `Boolean` | Whether the referral system ID field is enabled |
| `hi_sysid_state` | `String` | The state of the referral system ID field |
| `svc_kei_list_list` | `ArrayList` (of `X33VDataTypeBeanInterface`) | The service contract list — contains child beans for each service line item |
| `cust_kei_hktgi_list_list` | `ArrayList` (of `X33VDataTypeBeanInterface`) | The customer contract succession list — contains child beans for each customer contract item |
| `popup_mode_value` | `Object` (inferred) | The current popup mode value |
| `popup_mode_state` | `Object` (inferred) | The current popup mode state |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `KKW01037SFBean.getHktg_sysid_value` | KKW01037SFBean | - | Returns the continuation system ID string value |
| R | `KKW01037SFBean.getHktg_sysid_state` | KKW01037SFBean | - | Returns the continuation system ID display/interaction state |
| R | `KKW01037SFBean.getHktg_svc_kei_no_value` | KKW01037SFBean | - | Returns the customer service category value |
| R | `KKW01037SFBean.getHktg_svc_kei_no_state` | KKW01037SFBean | - | Returns the customer service category state |
| R | `KKW01037SFBean.getHi_cust_nm_value` | KKW01037SFBean | - | Returns the referral contract party name value |
| R | `KKW01037SFBean.getHi_cust_nm_enabled` | KKW01037SFBean | - | Returns whether the referral contract party name field is enabled |
| R | `KKW01037SFBean.getHi_cust_nm_state` | KKW01037SFBean | - | Returns the referral contract party name state |
| R | `KKW01037SFBean.getHi_telno_value` | KKW01037SFBean | - | Returns the referral phone number value |
| R | `KKW01037SFBean.getHi_telno_enabled` | KKW01037SFBean | - | Returns whether the referral phone number field is enabled |
| R | `KKW01037SFBean.getHi_telno_state` | KKW01037SFBean | - | Returns the referral phone number state |
| R | `KKW01037SFBean.getHi_sysid_value` | KKW01037SFBean | - | Returns the referral system ID value |
| R | `KKW01037SFBean.getHi_sysid_enabled` | KKW01037SFBean | - | Returns whether the referral system ID field is enabled |
| R | `KKW01037SFBean.getHi_sysid_state` | KKW01037SFBean | - | Returns the referral system ID state |
| R | `KKW01037SFBean.getPopup_mode_value` | KKW01037SFBean | - | Returns the popup mode value |
| R | `KKW01037SFBean.getPopup_mode_state` | KKW01037SFBean | - | Returns the popup mode state |
| R | `KKW01037SFBean.loadModelData` (child bean) | KKW01037SFBean | - | Delegates list element data retrieval to child `X33VDataTypeBeanInterface` beans via `svc_kei_list_list` and `cust_kei_hktgi_list_list` |
| R | `super.loadCommonInfoData` | Parent (X33VViewBaseBean) | - | Routes common-info items (key starting with `//`) to parent class for shared info retrieval |
| - | `String.substring` | - | - | Extracts substrings for key element parsing (multiple occurrences) |
| - | `String.indexOf` | - | - | Locates separators (`//` and `/`) within key strings |
| - | `String.equalsIgnoreCase` | - | - | Case-insensitive comparison of subkey against expected attribute names |
| - | `Integer.valueOf` / `intValue` | - | - | Parses numeric index strings for list element access |
| - | `ArrayList.size` | - | - | Returns list sizes for `svc_kei_list_list` and `cust_kei_hktgi_list_list` |
| - | `ArrayList.get` | - | - | Retrieves list element at a given index |

This method performs exclusively **Read** operations — it is a pure data accessor that routes requests to getter methods, list element accessors, and parent-class delegation handlers. No Create, Update, or Delete operations are performed.

## 5. Dependency Trace

### Pre-computed evidence from code analysis graph:

No screen/batch entry points found within 8 hops. Direct callers found: 3 methods.
Terminal operations from this method: `getPopup_mode_state` [R], `getPopup_mode_value` [R], `loadModelData` [R], `loadModelData` [R], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `loadModelData` [R], `loadModelData` [R], `substring` [-], `substring` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `KKW01037SFBean.getJsflist_typelist_cust_kei_hktgi_list()` | `getJsflist_typelist_cust_kei_hktgi_list()` -> `loadModelData(key, subkey)` | `getHi_cust_nm_value` [R], `getHi_cust_nm_enabled` [R], `getHi_cust_nm_state` [R], `getHi_telno_value` [R], `getHi_telno_enabled` [R], `getHi_telno_state` [R], `getHi_sysid_value` [R], `getHi_sysid_enabled` [R], `getHi_sysid_state` [R], `getHktg_sysid_value` [R], `getHktg_sysid_state` [R], `getHktg_svc_kei_no_value` [R], `getHktg_svc_kei_no_state` [R], `getPopup_mode_value` [R], `getPopup_mode_state` [R], `loadModelData` [R] (child) |
| 2 | `KKW01037SFBean.getJsflist_typelist_svc_kei_list()` | `getJsflist_typelist_svc_kei_list()` -> `loadModelData(key, subkey)` | `getHi_cust_nm_value` [R], `getHi_cust_nm_enabled` [R], `getHi_cust_nm_state` [R], `getHi_telno_value` [R], `getHi_telno_enabled` [R], `getHi_telno_state` [R], `getHi_sysid_value` [R], `getHi_sysid_enabled` [R], `getHi_sysid_state` [R], `getHktg_sysid_value` [R], `getHktg_sysid_state` [R], `getHktg_svc_kei_no_value` [R], `getHktg_svc_kei_no_state` [R], `getPopup_mode_value` [R], `getPopup_mode_state` [R], `loadModelData` [R] (child) |
| 3 | `KKW01037SFBean.loadModelData()` (no-arg overload) | `loadModelData()` -> `loadModelData(key, subkey)` | Same as above — delegates to the keyed variant |
| 4 | `KKW01037SFBean.loadModelData()` (no-arg overload, second) | `loadModelData()` -> `loadModelData(key, subkey)` | Same as above — delegates to the keyed variant |

All callers reside within the same bean class (`KKW01037SFBean`), indicating this method is an internal data routing utility consumed by other bean methods that prepare data for screen display. No external screen or batch entry points were found within 8 hops.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `key == null` (L323)

> If the key is null, return null immediately. The key is a required routing identifier.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // key is null, nothing to route |

**Block 2** — [ELSE-IF] `subkey == null` (L329)

> If subkey is null, normalize it to an empty string so downstream comparisons work safely.

| # | Type | Code |
|---|------|------|
| 1 | SET | `subkey = new String("");` // Normalize null subkey to empty string |

**Block 3** — [SET] Key parsing setup (L332)

> Declare local variables for common info detection and key element extraction.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String keyElement;` // Holds the top-level field name extracted from key |
| 2 | SET | `int separaterPoint = key.indexOf("//");` // Check if key is for common-info view item |

**Block 4** — [IF] `separaterPoint == 0` (L334)

> Common-info view branch: key starts with `//`, indicating a shared informational display item. Delegate to parent class.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `super.loadCommonInfoData(key);` // Delegate to parent for common-info items |

**Block 5** — [ELSE-IF] `separaterPoint > 0` (L341)

> Root key branch: key contains a `/` separator, meaning it has a hierarchical structure. Extract the first element. If no separator found (else), use the entire key as keyElement.

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/");` // Search for the primary separator `/` |
| 2 | SET | `keyElement = key.substring(0, separaterPoint);` // Extract first element before `/` |
| 3 | SET | `keyElement = key;` // No separator found - entire key is the field name |

**Block 6** — [IF] `keyElement.equals("継続システムID")` (L347)
> [CONSTANT: `KKW01037SFConst.HKTG_SYSID = "継続システムID"` (Continuation System ID)]

> Returns the system ID value or state based on subkey.

| # | Type | Code |
|---|------|------|
| 1 | [IF-ELSE] | `subkey.equalsIgnoreCase("value")` -> `return getHktg_sysid_value();` |
| 2 | [ELSE-IF] | `subkey.equalsIgnoreCase("state")` -> `return getHktg_sysid_state();` // Returns status |

**Block 7** — [ELSE-IF] `keyElement.equals("継続お客様情報")` (L357)
> [CONSTANT: `KKW01037SFConst.HKTG_SVC_KEI_NO = "継続お客様情報"` (Continuation Customer Information)]

> Returns the customer service category value or state based on subkey.

| # | Type | Code |
|---|------|------|
| 1 | [IF-ELSE] | `subkey.equalsIgnoreCase("value")` -> `return getHktg_svc_kei_no_value();` |
| 2 | [ELSE-IF] | `subkey.equalsIgnoreCase("state")` -> `return getHktg_svc_kei_no_state();` // Returns status |

**Block 8** — [ELSE-IF] `keyElement.equals("紹介者契約者名")` (L367)
> [CONSTANT: `KKW01037SFConst.HI_CUST_NM = "紹介者契約者名"` (Referral Contract Party Name)]

> Returns the referral contract party name value, enabled flag, or state. This field supports three subkeys: `value`, `enable`, and `state`.

| # | Type | Code |
|---|------|------|
| 1 | [IF-ELSE] | `subkey.equalsIgnoreCase("value")` -> `return getHi_cust_nm_value();` |
| 2 | [ELSE-IF] | `subkey.equalsIgnoreCase("enable")` -> `return getHi_cust_nm_enabled();` // Returns enabled flag |
| 3 | [ELSE-IF] | `subkey.equalsIgnoreCase("state")` -> `return getHi_cust_nm_state();` // Returns status |

**Block 9** — [ELSE-IF] `keyElement.equals("紹介者電話番号")` (L378)
> [CONSTANT: `KKW01037SFConst.HI_TELNO = "紹介者電話番号"` (Referral Phone Number)]

> Returns the referral phone number value, enabled flag, or state. Supports three subkeys: `value`, `enable`, `state`.

| # | Type | Code |
|---|------|------|
| 1 | [IF-ELSE] | `subkey.equalsIgnoreCase("value")` -> `return getHi_telno_value();` |
| 2 | [ELSE-IF] | `subkey.equalsIgnoreCase("enable")` -> `return getHi_telno_enabled();` // Returns enabled flag |
| 3 | [ELSE-IF] | `subkey.equalsIgnoreCase("state")` -> `return getHi_telno_state();` // Returns status |

**Block 10** — [ELSE-IF] `keyElement.equals("紹介者システムID")` (L389)
> [CONSTANT: `KKW01037SFConst.HI_SYSID = "紹介者システムID"` (Referral System ID)]

> Returns the referral system ID value, enabled flag, or state. Supports three subkeys: `value`, `enable`, `state`.

| # | Type | Code |
|---|------|------|
| 1 | [IF-ELSE] | `subkey.equalsIgnoreCase("value")` -> `return getHi_sysid_value();` |
| 2 | [ELSE-IF] | `subkey.equalsIgnoreCase("enable")` -> `return getHi_sysid_enabled();` // Returns enabled flag |
| 3 | [ELSE-IF] | `subkey.equalsIgnoreCase("state")` -> `return getHi_sysid_state();` // Returns status |

**Block 11** — [ELSE-IF] `keyElement.equals("サービス契約一覧リスト")` (L400)
> [Constant meaning: Service Contract Full List - a hierarchical list of service line items]

> Handles list-based data retrieval for the service contract list. Supports wildcard index (`*`) for list size and delegated access to child beans for specific index/subkey queries.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String keyRemain = key.substring(separaterPoint + 1);` // Get remainder after first `/` |
| 2 | IF-ELSE-IF | `keyRemain.equals("*")` -> `return Integer.valueOf(svc_kei_list_list.size());` // Return list size |
| 3 | SET | `separaterPoint = keyRemain.indexOf("/");` // Find next separator in remainder |
| 4 | IF | `separaterPoint <= 0` -> `return null;` // No separator or invalid path |
| 5 | SET | `keyElement = keyRemain.substring(0, separaterPoint);` // Extract index string |
| 6 | TRY | `tmpIndexInt = Integer.valueOf(keyElement);` // Parse index as integer |
| 7 | CATCH(NumberFormatException e) | `return null;` // Index is not a valid number |
| 8 | IF | `tmpIndexInt == null` -> `return null;` // Should not happen, safety check |
| 9 | SET | `int tmpIndex = tmpIndexInt.intValue();` // Get primitive int value |
| 10 | IF | `tmpIndex < 0 || tmpIndex >= svc_kei_list_list.size()` -> `return null;` // Out of bounds |
| 11 | SET | `keyElement = keyRemain.substring(separaterPoint + 1);` // Extract sub-field name |
| 12 | RETURN | `return ((X33VDataTypeBeanInterface)svc_kei_list_list.get(tmpIndex)).loadModelData(keyElement, subkey);` // Delegate to child bean |

**Block 11.1** — [Nested TRY-CATCH inside Block 11] `Integer.valueOf(keyElement)` (L430)

> Catches non-numeric index strings and returns null gracefully.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `tmpIndexInt = Integer.valueOf(keyElement);` // Attempt to parse index |
| 2 | CATCH | `NumberFormatException e` -> `return null;` // Index is not a valid numeric string |

**Block 12** — [ELSE-IF] `keyElement.equals("顧客契約引継リスト")` (L440)
> [Constant meaning: Customer Contract Succession List - a hierarchical list of customer contract items]

> Handles list-based data retrieval for the customer contract succession list. Same structure as Block 11 but operates on `cust_kei_hktgi_list_list`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String keyRemain = key.substring(separaterPoint + 1);` // Get remainder after first `/` |
| 2 | IF-ELSE-IF | `keyRemain.equals("*")` -> `return Integer.valueOf(cust_kei_hktgi_list_list.size());` // Return list size |
| 3 | SET | `separaterPoint = keyRemain.indexOf("/");` // Find next separator in remainder |
| 4 | IF | `separaterPoint <= 0` -> `return null;` // No separator or invalid path |
| 5 | SET | `keyElement = keyRemain.substring(0, separaterPoint);` // Extract index string |
| 6 | TRY | `tmpIndexInt = Integer.valueOf(keyElement);` // Parse index as integer |
| 7 | CATCH(NumberFormatException e) | `return null;` // Index is not a valid number |
| 8 | IF | `tmpIndexInt == null` -> `return null;` // Safety check |
| 9 | SET | `int tmpIndex = tmpIndexInt.intValue();` // Get primitive int value |
| 10 | IF | `tmpIndex < 0 || tmpIndex >= cust_kei_hktgi_list_list.size()` -> `return null;` // Out of bounds |
| 11 | SET | `keyElement = keyRemain.substring(separaterPoint + 1);` // Extract sub-field name |
| 12 | RETURN | `return ((X33VDataTypeBeanInterface)cust_kei_hktgi_list_list.get(tmpIndex)).loadModelData(keyElement, subkey);` // Delegate to child bean |

**Block 13** — [ELSE-IF] `keyElement.equals("ポップアップモード")` (L478)
> [Constant meaning: Popup Mode - controls display mode for popup windows]

> Returns the popup mode value or state based on subkey.

| # | Type | Code |
|---|------|------|
| 1 | [IF-ELSE] | `subkey.equalsIgnoreCase("value")` -> `return getPopup_mode_value();` |
| 2 | [ELSE-IF] | `subkey.equalsIgnoreCase("state")` -> `return getPopup_mode_state();` // Returns status |

**Block 14** — [ELSE - default] (L486)

> None of the known field types matched. Return null.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // Unrecognized keyElement |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `継続システムID` | Field | Continuation System ID - the identifier of the legacy/continuation system for this customer |
| `hktg_sysid` | Field (internal) | Shortened field ID for 継続システムID |
| `継続お客様情報` | Field | Continuation Customer Information - the customer's service category information carried over from previous contracts |
| `hktg_svc_kei_no` | Field (internal) | Shortened field ID for 継続お客様情報; tracks service type numbers |
| `紹介者契約者名` | Field | Referral Contract Party Name - the name of the party who referred or introduced the customer |
| `hi_cust_nm` | Field (internal) | Shortened field ID for 紹介者契約者名 |
| `紹介者電話番号` | Field | Referral Phone Number - the phone number of the referring party |
| `hi_telno` | Field (internal) | Shortened field ID for 紹介者電話番号 |
| `紹介者システムID` | Field | Referral System ID - the system identifier for the referral source |
| `hi_sysid` | Field (internal) | Shortened field ID for 紹介者システムID |
| `サービス契約一覧リスト` | Field | Service Contract Full List - a hierarchical list of all service line items associated with the contract |
| `svc_kei_list` | Field (internal) | Shortened field ID for サービス契約一覧リスト |
| `顧客契約引継リスト` | Field | Customer Contract Succession List - a hierarchical list of customer contracts being transferred/successored |
| `cust_kei_hktgi_list` | Field (internal) | Shortened field ID for 顧客契約引継リスト |
| `ポップアップモード` | Field | Popup Mode - the display mode flag for popup windows on the screen |
| `popup_mode` | Field (internal) | Shortened field ID for ポップアップモード |
| `key` | Parameter | Hierarchical field identifier used for routing data retrieval; supports nested paths for list elements |
| `subkey` | Parameter | Sub-attribute selector within a field; typically `value`, `state`, or `enable` |
| `X33VDataTypeBeanInterface` | Interface | The X33 framework interface for data-type beans; child list elements implement this for delegated data access |
| `X33VDataTypeList` | Class | The X33 framework container class for typed data lists |
| `loadCommonInfoData` | Method | Parent class method that handles common-info view items identified by `//`-prefixed keys |
| `state` | Subkey | Returns the display/interaction state flag of a field (e.g., visible, disabled, hidden) |
| `enable` | Subkey | Returns the boolean enabled/disabled flag of a field |
| `value` | Subkey | Returns the actual data value of a field |
| `//` | Separator | Common-info view item marker - keys starting with `//` are delegated to the parent class |
| `/` | Separator | Hierarchical key separator - used to separate field path, index, and sub-field name |
| `*` | Wildcard | List-size wildcard - when used as the index in a list key path, returns the total element count |
| KKW01037SF | Module | Screen module for customer contract succession/referral data entry (webview) |
| Bean | Pattern | A Java class that encapsulates screen state and provides getter/setter access to UI model data |
| X33 Framework | Technology | Fujitsu's Web Client tool framework for building JavaServer Faces-based web applications |
