# Business Logic — KKW01037SFBean.storeModelData() [156 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW01037SF.KKW01037SFBean` |
| Layer | Service Component / Web View Bean (Controller-adjacent — belongs to the webview package which mediates between JSF pages and business logic) |
| Module | `KKW01037SF` (Package: `eo.web.webview.KKW01037SF`) |

## 1. Role

### KKW01037SFBean.storeModelData()

This method is the central data-routing dispatcher for the KKW01037SF screen bean, responsible for persisting incoming model data into the bean's internal field hierarchy based on a hierarchical dot- or slash-delimited key path. It implements a **tree-dispatch pattern**: the `key` parameter encodes a path (e.g., `"サービス契約一覧リスト/0/被紹介者お客様ID"`) that determines which nested bean and which sub-field should receive the data.

The method handles **two categories of data types**. The first category covers flat String-type fields — specifically the continuation SSID (`hktg_sysid`), continuation customer ID (`hktg_svc_kei_no`), referrer contract information (name `hi_cust_nm`, phone `hi_telno`, SSID `hi_sysid`), and popup mode (`popup_mode`). Each of these subfields has a `value`, `state`, and optionally an `enabled` property that is set via dedicated setters depending on the `subkey` value (`"value"`, `"state"`, or `"enable"`).

The second category covers **list-type (tree-bean) fields** — the service contract list (`svc_kei_list_list`) and customer contract succession list (`cust_kei_hktgi_list_list`). For these, the method parses out the list index from the key path, validates it against list bounds, and recursively delegates to the nested bean's own `storeModelData` method via the `X33VDataTypeBeanInterface` contract. This allows arbitrarily nested data paths to be resolved through the list item hierarchy.

Additionally, keys beginning with `//` are routed to the parent class's `storeCommonInfoData` method, which handles shared/common information across screens. This is a **delegation pattern** for cross-cutting data that does not belong to the screen-specific bean fields.

The method's role in the larger system is as the **primary model-write entry point** for the KKW01037SF screen — when the JSF layer or an intermediate processing step submits form data back into the bean, it calls `storeModelData` to reconstruct the bean's state from the incoming key-value pairs.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData params"])
    CHECK_KEY_NULL{"key == null?"}
    CHECK_SUBKEY_NULL{"subkey == null?"}
    CHECK_COMMON_INFO{"key starts with //?"}
    FIND_FIRST_SLASH["Find first / in key"]
    CHECK_SLASH_POS{"separaterPoint > 0?"}
    EXTRACT_KEY_ELEMENT["Extract keyElement from key"]
    SET_KEY_ELEMENT_FULL["keyElement = key"]

    BRANCH_HKTG_SYSID{"keyElement == '継続SSID'?"}
    BRANCH_HKTG_SVC{"keyElement == '継続お客様ID'?"}
    BRANCH_HI_CUST{"keyElement == '被紹介者契約者名'?"}
    BRANCH_HI_TELNO{"keyElement == '被紹介者電話番号'?"}
    BRANCH_HI_SYSID{"keyElement == '被紹介者SSID'?"}
    BRANCH_SVC_LIST{"keyElement == 'サービス契約一覧リスト'?"}
    BRANCH_CUST_HKTGI{"keyElement == '顧客契約引継リスト'?"}
    BRANCH_POPUP{"keyElement == 'ポップアップモード'?"}

    CHECK_SUBKEY_VALUE_A{"subkey equals 'value'?"}
    CHECK_SUBKEY_ENABLE_A{"subkey equals 'enable'?"}
    CHECK_SUBKEY_STATE_A{"subkey equals 'state'?"}
    CHECK_SUBKEY_VALUE_B{"subkey equals 'value'?"}
    CHECK_SUBKEY_STATE_B{"subkey equals 'state'?"}

    SET_HKTG_SYSID_VALUE["setHktg_sysid_value"]
    SET_HKTG_SYSID_STATE["setHktg_sysid_state"]
    SET_HKTG_SVC_VALUE["setHktg_svc_kei_no_value"]
    SET_HKTG_SVC_STATE["setHktg_svc_kei_no_state"]
    SET_HI_CUST_VALUE["setHi_cust_nm_value"]
    SET_HI_CUST_ENABLE["setHi_cust_nm_enabled"]
    SET_HI_CUST_STATE["setHi_cust_nm_state"]
    SET_HI_TELNO_VALUE["setHi_telno_value"]
    SET_HI_TELNO_ENABLE["setHi_telno_enabled"]
    SET_HI_TELNO_STATE["setHi_telno_state"]
    SET_HI_SYSID_VALUE["setHi_sysid_value"]
    SET_HI_SYSID_ENABLE["setHi_sysid_enabled"]
    SET_HI_SYSID_STATE["setHi_sysid_state"]
    SET_POPUP_VALUE["setPopup_mode_value"]
    SET_POPUP_STATE["setPopup_mode_state"]

    SVC_LIST_EXTRACTION["Extract keyRemain from key"]
    SVC_LIST_FIND_SLASH["Find first / in keyRemain"]
    SVC_LIST_CHECK_SLASH{"separaterPoint > 0?"}
    SVC_LIST_EXTRACT_IDX["Extract index from keyRemain"]
    SVC_LIST_PARSE_IDX{"parseInt succeeds?"}
    SVC_LIST_BOUNDS{"index in range?"}
    SVC_LIST_DELEGATE["Delegate storeModelData to svc_kei_list_list element"]

    CUST_HKTGI_EXTRACTION["Extract keyRemain from key"]
    CUST_HKTGI_FIND_SLASH["Find first / in keyRemain"]
    CUST_HKTGI_CHECK_SLASH{"separaterPoint > 0?"}
    CUST_HKTGI_EXTRACT_IDX["Extract index from keyRemain"]
    CUST_HKTGI_PARSE_IDX{"parseInt succeeds?"}
    CUST_HKTGI_BOUNDS{"index in range?"}
    CUST_HKTGI_DELEGATE["Delegate storeModelData to cust_kei_hktgi_list_list element"]

    NO_MATCH["No matching keyElement"]
    END_NODE(["Return"])

    START --> CHECK_KEY_NULL
    CHECK_KEY_NULL -->|true| END_NODE
    CHECK_KEY_NULL -->|false| CHECK_SUBKEY_NULL
    CHECK_SUBKEY_NULL -->|true| SET_KEY_ELEMENT_FULL
    CHECK_SUBKEY_NULL -->|false| FIND_FIRST_SLASH
    SET_KEY_ELEMENT_FULL --> FIND_FIRST_SLASH
    FIND_FIRST_SLASH --> CHECK_COMMON_INFO
    CHECK_COMMON_INFO -->|true| COMMON_INFO_CALL["super.storeCommonInfoData"]
    COMMON_INFO_CALL --> END_NODE
    CHECK_COMMON_INFO -->|false| CHECK_SLASH_POS
    CHECK_SLASH_POS -->|true| EXTRACT_KEY_ELEMENT
    CHECK_SLASH_POS -->|false| SET_KEY_ELEMENT_FULL2["keyElement = key"]
    EXTRACT_KEY_ELEMENT --> BRANCH_HKTG_SYSID
    SET_KEY_ELEMENT_FULL2 --> BRANCH_HKTG_SYSID

    BRANCH_HKTG_SYSID -->|true| CHECK_SUBKEY_VALUE_A
    BRANCH_HKTG_SYSID -->|false| BRANCH_HKTG_SVC
    BRANCH_HKTG_SVC -->|true| CHECK_SUBKEY_VALUE_B
    BRANCH_HKTG_SVC -->|false| BRANCH_HI_CUST
    BRANCH_HI_CUST -->|true| CHECK_SUBKEY_ENABLE_A
    BRANCH_HI_CUST -->|false| BRANCH_HI_TELNO
    BRANCH_HI_TELNO -->|true| CHECK_SUBKEY_VALUE_B2{"subkey equals 'value'?"}
    BRANCH_HI_TELNO -->|false| BRANCH_HI_SYSID
    BRANCH_HI_SYSID -->|true| CHECK_SUBKEY_ENABLE_A2{"subkey equals 'enable'?"}
    BRANCH_HI_SYSID -->|false| BRANCH_SVC_LIST
    BRANCH_SVC_LIST -->|true| SVC_LIST_EXTRACTION
    BRANCH_SVC_LIST -->|false| BRANCH_CUST_HKTGI
    BRANCH_CUST_HKTGI -->|true| CUST_HKTGI_EXTRACTION
    BRANCH_CUST_HKTGI -->|false| BRANCH_POPUP
    BRANCH_POPUP -->|true| CHECK_SUBKEY_VALUE_B3{"subkey equals 'value'?"}
    BRANCH_POPUP -->|false| NO_MATCH

    CHECK_SUBKEY_VALUE_A -->|true| SET_HKTG_SYSID_VALUE
    CHECK_SUBKEY_VALUE_A -->|false| CHECK_SUBKEY_STATE_A
    CHECK_SUBKEY_STATE_A -->|true| SET_HKTG_SYSID_STATE
    CHECK_SUBKEY_STATE_A -->|false| NO_MATCH

    CHECK_SUBKEY_VALUE_B -->|true| SET_HKTG_SVC_VALUE
    CHECK_SUBKEY_VALUE_B -->|false| CHECK_SUBKEY_STATE_B
    CHECK_SUBKEY_STATE_B -->|true| SET_HKTG_SVC_STATE
    CHECK_SUBKEY_STATE_B -->|false| NO_MATCH

    CHECK_SUBKEY_ENABLE_A -->|true| SET_HI_CUST_ENABLE
    CHECK_SUBKEY_ENABLE_A -->|false| CHECK_SUBKEY_STATE_A
    CHECK_SUBKEY_STATE_A -->|true| SET_HI_CUST_STATE
    CHECK_SUBKEY_STATE_A -->|false| NO_MATCH

    CHECK_SUBKEY_VALUE_B2 -->|true| SET_HI_TELNO_VALUE
    CHECK_SUBKEY_VALUE_B2 -->|false| CHECK_SUBKEY_ENABLE_A2
    CHECK_SUBKEY_ENABLE_A2 -->|true| SET_HI_TELNO_ENABLE
    CHECK_SUBKEY_ENABLE_A2 -->|false| CHECK_SUBKEY_STATE_A2{"subkey equals 'state'?"}
    CHECK_SUBKEY_STATE_A2 -->|true| SET_HI_TELNO_STATE
    CHECK_SUBKEY_STATE_A2 -->|false| NO_MATCH

    CHECK_SUBKEY_ENABLE_A2 -->|true| SET_HI_SYSID_ENABLE
    CHECK_SUBKEY_ENABLE_A2 -->|false| CHECK_SUBKEY_STATE_A2
    CHECK_SUBKEY_STATE_A2 -->|true| SET_HI_SYSID_STATE
    CHECK_SUBKEY_STATE_A2 -->|false| NO_MATCH

    SVC_LIST_EXTRACTION --> SVC_LIST_FIND_SLASH
    SVC_LIST_FIND_SLASH --> SVC_LIST_CHECK_SLASH
    SVC_LIST_CHECK_SLASH -->|true| SVC_LIST_EXTRACT_IDX
    SVC_LIST_CHECK_SLASH -->|false| NO_MATCH
    SVC_LIST_EXTRACT_IDX --> SVC_LIST_PARSE_IDX
    SVC_LIST_PARSE_IDX -->|true| SVC_LIST_BOUNDS
    SVC_LIST_PARSE_IDX -->|false| NO_MATCH
    SVC_LIST_BOUNDS -->|true| SVC_LIST_DELEGATE
    SVC_LIST_BOUNDS -->|false| NO_MATCH
    SVC_LIST_DELEGATE --> END_NODE

    CUST_HKTGI_EXTRACTION --> CUST_HKTGI_FIND_SLASH
    CUST_HKTGI_FIND_SLASH --> CUST_HKTGI_CHECK_SLASH
    CUST_HKTGI_CHECK_SLASH -->|true| CUST_HKTGI_EXTRACT_IDX
    CUST_HKTGI_CHECK_SLASH -->|false| NO_MATCH
    CUST_HKTGI_EXTRACT_IDX --> CUST_HKTGI_PARSE_IDX
    CUST_HKTGI_PARSE_IDX -->|true| CUST_HKTGI_BOUNDS
    CUST_HKTGI_PARSE_IDX -->|false| NO_MATCH
    CUST_HKTGI_BOUNDS -->|true| CUST_HKTGI_DELEGATE
    CUST_HKTGI_BOUNDS -->|false| NO_MATCH
    CUST_HKTGI_DELEGATE --> END_NODE

    SET_HKTG_SYSID_VALUE --> END_NODE
    SET_HKTG_SYSID_STATE --> END_NODE
    SET_HKTG_SVC_VALUE --> END_NODE
    SET_HKTG_SVC_STATE --> END_NODE
    SET_HI_CUST_VALUE --> END_NODE
    SET_HI_CUST_ENABLE --> END_NODE
    SET_HI_CUST_STATE --> END_NODE
    SET_HI_TELNO_VALUE --> END_NODE
    SET_HI_TELNO_ENABLE --> END_NODE
    SET_HI_TELNO_STATE --> END_NODE
    SET_HI_SYSID_VALUE --> END_NODE
    SET_HI_SYSID_ENABLE --> END_NODE
    SET_HI_SYSID_STATE --> END_NODE
    SET_POPUP_VALUE --> END_NODE
    SET_POPUP_STATE --> END_NODE
    NO_MATCH --> END_NODE
```

**CRITICAL — Constant Resolution:**

All key-element constants are defined in `KKW01037SFConst` and resolved as follows:

| Constant Name | Resolved Value | Business Meaning |
|--------------|---------------|-----------------|
| `HKTG_SYSID` | `"継続SSID"` | Continuation SSID — the session/contract identifier for existing service contracts |
| `HKTG_SVC_KEI_NO` | `"継続お客様ID"` | Continuation Customer ID — the customer identifier for existing/continuing contracts |
| `HI_CUST_NM` | `"被紹介者契約者名"` | Referee (Referrer) Contract Name — the name of the contract party referred by a referral program |
| `HI_TELNO` | `"被紹介者電話番号"` | Referee Phone Number — contact phone of the referred party |
| `HI_SYSID` | `"被紹介者SSID"` | Referee SSID — the SSID identifier for the referred customer |
| `SVC_KEI_LIST` | `"サービス契約一覧リスト"` | Service Contract List — list of service contracts for the customer |
| `CUST_KEI_HKTGI_LIST` | `"顧客契約引継リスト"` | Customer Contract Succession List — list of contracts being transferred/successioned |
| `POPUP_MODE` | `"ポップアップモード"` | Popup Mode — UI mode flag controlling popup window behavior |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | A hierarchical key path that identifies which field (or nested list element) to populate. Format examples: `"継続SSID"` for flat fields, `"サービス契約一覧リスト/0/被紹介者お客様ID"` for list-indexed nested fields. If the key starts with `//`, it indicates common/shared information applicable to all screens rather than screen-specific data. |
| 2 | `subkey` | `String` | The sub-field specifier within the identified entity. Valid values are `"value"` (the actual data value), `"state"` (the display/validation state as a String), and `"enable"` (the editable/visible flag as a Boolean — only applicable for referrer name, referrer phone, and referrer SSID). If null, it is normalized to an empty string. |
| 3 | `in_value` | `Object` | The data payload to be stored. Typically a String for `value` and `state` subkeys, or a Boolean for the `enable` subkey. Cast to the appropriate type when passed to setter methods. |
| 4 | `isSetAsString` | `boolean` | A flag indicating whether a Long-type item's value property should be set using a String value. Passed through to nested `storeModelData` calls on list items and to the parent class's `storeCommonInfoData`. |

**Instance fields read:**
| Field | Type | Business Meaning |
|-------|------|-----------------|
| `svc_kei_list_list` | `X33VDataTypeList` | The service contract list — a list of `X33VDataTypeBeanInterface` objects, each representing one service contract line item. Used when the key targets `"サービス契約一覧リスト"`. |
| `cust_kei_hktgi_list_list` | `X33VDataTypeList` | The customer contract succession list — a list of `X33VDataTypeBeanInterface` objects, each representing a contract item in the succession process. Used when the key targets `"顧客契約引継リスト"`. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `super.storeCommonInfoData` | X33VViewBaseBean (parent class) | - | Delegates to parent class for common/shared information data (e.g., system-wide metadata). Called when `key` starts with `//`. |
| - | `KKW01037SFBean.setHktg_sysid_value` | KKW01037SFBean | - | Sets the continuation SSID value field (`hktg_sysid_value`). Used for the `"継続SSID"` entity with subkey `"value"`. |
| - | `KKW01037SFBean.setHktg_sysid_state` | KKW01037SFBean | - | Sets the continuation SSID state field (`hktg_sysid_state`). Used for the `"継続SSID"` entity with subkey `"state"`. |
| - | `KKW01037SFBean.setHktg_svc_kei_no_value` | KKW01037SFBean | - | Sets the continuation customer ID value field (`hktg_svc_kei_no_value`). Used for the `"継続お客様ID"` entity with subkey `"value"`. |
| - | `KKW01037SFBean.setHktg_svc_kei_no_state` | KKW01037SFBean | - | Sets the continuation customer ID state field (`hktg_svc_kei_no_state`). Used for the `"継続お客様ID"` entity with subkey `"state"`. |
| - | `KKW01037SFBean.setHi_cust_nm_value` | KKW01037SFBean | - | Sets the referrer contract name value field (`hi_cust_nm_value`). Used for the `"被紹介者契約者名"` entity with subkey `"value"`. |
| - | `KKW01037SFBean.setHi_cust_nm_enabled` | KKW01037SFBean | - | Sets the referrer contract name enabled flag (`hi_cust_nm_enabled`, Boolean). Used for the `"被紹介者契約者名"` entity with subkey `"enable"`. |
| - | `KKW01037SFBean.setHi_cust_nm_state` | KKW01037SFBean | - | Sets the referrer contract name state field (`hi_cust_nm_state`). Used for the `"被紹介者契約者名"` entity with subkey `"state"`. |
| - | `KKW01037SFBean.setHi_telno_value` | KKW01037SFBean | - | Sets the referrer phone number value field (`hi_telno_value`). Used for the `"被紹介者電話番号"` entity with subkey `"value"`. |
| - | `KKW01037SFBean.setHi_telno_enabled` | KKW01037SFBean | - | Sets the referrer phone number enabled flag (`hi_telno_enabled`, Boolean). Used for the `"被紹介者電話番号"` entity with subkey `"enable"`. |
| - | `KKW01037SFBean.setHi_telno_state` | KKW01037SFBean | - | Sets the referrer phone number state field (`hi_telno_state`). Used for the `"被紹介者電話番号"` entity with subkey `"state"`. |
| - | `KKW01037SFBean.setHi_sysid_value` | KKW01037SFBean | - | Sets the referrer SSID value field (`hi_sysid_value`). Used for the `"被紹介者SSID"` entity with subkey `"value"`. |
| - | `KKW01037SFBean.setHi_sysid_enabled` | KKW01037SFBean | - | Sets the referrer SSID enabled flag (`hi_sysid_enabled`, Boolean). Used for the `"被紹介者SSID"` entity with subkey `"enable"`. |
| - | `KKW01037SFBean.setHi_sysid_state` | KKW01037SFBean | - | Sets the referrer SSID state field (`hi_sysid_state`). Used for the `"被紹介者SSID"` entity with subkey `"state"`. |
| - | `KKW01037SFBean.setPopup_mode_value` | KKW01037SFBean | - | Sets the popup mode value field (`popup_mode_value`). Used for the `"ポップアップモード"` entity with subkey `"value"`. |
| - | `KKW01037SFBean.setPopup_mode_state` | KKW01037SFBean | - | Sets the popup mode state field (`popup_mode_state`). Used for the `"ポップアップモード"` entity with subkey `"state"`. |
| - | `KKW01037SFBean.storeModelData` (recursive) | KKW01037SFBean / X33VDataTypeBeanInterface | - | Recursively delegates to nested list element beans. Called when the key targets `"サービス契約一覧リスト"` or `"顧客契約引継リスト"` with a valid list index. Each list item implements `X33VDataTypeBeanInterface` and has its own `storeModelData` to handle nested sub-fields. |

**Notes:**
- This method performs **no direct database or entity-level CRUD operations**. It is purely a **field-routing setter** that populates bean instance fields and delegates to nested beans.
- The `storeCommonInfoData` call in the parent class (`X33VViewBaseBean`) may involve shared data operations, but those are outside the scope of this method's direct responsibilities.
- The recursive delegation to `svc_kei_list_list` and `cust_kei_hktgi_list_list` list elements means that downstream `storeModelData` calls could trigger further nested dispatches, but the immediate scope of this method is limited to key parsing, index validation, and setter invocation.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods.
Terminal operations from this method: `setPopup_mode_state` [-], `setPopup_mode_value` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `substring` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-]

This method is called by **2 methods** within `KKW01037SFBean` itself. The pre-extracted callers indicate that `KKW01037SFBean.storeModelData` is called recursively (self-referencing) and from internal bean methods. No external screen entry points (e.g., `KKSV*` screens) were found within 8 hops of the call graph.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Self-call: `KKW01037SFBean.storeModelData` | `KKW01037SFBean.storeModelData` -> `KKW01037SFBean.storeModelData` (recursive delegation) | `storeModelData` [-] (nested list item beans) |
| 2 | Internal bean methods | `KKW01037SFBean` internal methods -> `KKW01037SFBean.storeModelData` | `setPopup_mode_state`, `setPopup_mode_value`, `substring` [-] |

**Note:** No screen entry points were discovered in the call graph. The method is called internally by the bean itself, suggesting it is invoked by other bean methods during data processing or model reconstruction. The actual JSF page entry point (likely a screen class such as `KKSVxxxx`) calls into this bean through standard framework wiring rather than a direct method reference visible in the graph.

## 6. Per-Branch Detail Blocks

**Block 1** — IF `(key == null)` (L523)

Early exit guard. If the key is null, the method returns immediately with no processing.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `key == null` |
| 2 | RETURN | `return;` // Early exit — no processing if key is null |

---

**Block 2** — ELSE-IF `(subkey == null)` (L527)

If the subkey is null, normalize it to an empty string so downstream comparisons do not throw NullPointerException.

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

---

**Block 3** — ELSE (main routing logic, starts at L533)

The main dispatch block. First, check if the key starts with `//` (common info indicator), otherwise parse the key path for the first `/` to extract the key element.

**Block 3.1** — IF `(separaterPoint == 0)` — common info key (L534-535)

Check if the key starts with `//` (the Japanese comment reads: "keyが共通情報ビューンに関する指定かチェック" — checking if key is a common info specification). If so, delegate to the parent class.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `super.storeCommonInfoData(key, in_value, isSetAsString)` // Delegate common/shared data to parent class |

---

**Block 3.2** — ELSE (L536+)

Non-common-info routing. Parse the key to extract the element identifier.

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/");` // Search for the first delimiter `/` |
| 2 | IF | `separaterPoint > 0` (L539) — see Block 3.2.1 |
| 3 | ELSE | — see Block 3.2.2 |

**Block 3.2.1** — IF `(separaterPoint > 0)` (L540)

The key contains a slash, so extract the element name as the portion before the first slash.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyElement = key.substring(0, separaterPoint);` // Extract element name from the key path |

**Block 3.2.2** — ELSE (L542)

No slash found, so the entire key is the element name.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyElement = key;` // Entire key is the element identifier |

---

**Block 4** — IF `(keyElement.equals("継続SSID"))` [HKTG_SYSID] (L547-555)

Handle the continuation SSID field. This is a String-type field with `value` and `state` sub-keys.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` — see Block 4.1 |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — see Block 4.2 |

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

Set the continuation SSID value.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHktg_sysid_value((String)in_value);` // Set continuation SSID value field |

**Block 4.2** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L551)

Set the continuation SSID state. The Java comment reads: "subkeyが"state"の場合、in_valueをcastして項目ID_stateのsetterを実行する" — when subkey is "state", cast in_value and execute the setter for the item ID state field.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHktg_sysid_state((String)in_value);` // Set continuation SSID state field |

---

**Block 5** — ELSE-IF `(keyElement.equals("継続お客様ID"))` [HKTG_SVC_KEI_NO] (L558-566)

Handle the continuation customer ID field. String-type with `value` and `state` sub-keys.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` — see Block 5.1 |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — see Block 5.2 |

**Block 5.1** — IF `(subkey.equalsIgnoreCase("value"))` (L559)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHktg_svc_kei_no_value((String)in_value);` // Set continuation customer ID value |

**Block 5.2** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L562)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHktg_svc_kei_no_state((String)in_value);` // Set continuation customer ID state |

---

**Block 6** — ELSE-IF `(keyElement.equals("被紹介者契約者名"))` [HI_CUST_NM] (L569-581)

Handle the referrer contract name field. This String-type field has three sub-keys: `value`, `enable` (Boolean), and `state`. The Java comment for `enable` reads: "subkeyが"enable"の場合、項目ID_enableのsetterを実行する" — when subkey is "enable", execute the setter for the item ID enable flag.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` — see Block 6.1 |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` — see Block 6.2 |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — see Block 6.3 |

**Block 6.1** — IF `(subkey.equalsIgnoreCase("value"))` (L570)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_cust_nm_value((String)in_value);` // Set referrer contract name value |

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

Set the referrer contract name enabled/visible flag. Note the cast to `Boolean` rather than `String`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_cust_nm_enabled((Boolean)in_value);` // Set referrer contract name enable flag |

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

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_cust_nm_state((String)in_value);` // Set referrer contract name state |

---

**Block 7** — ELSE-IF `(keyElement.equals("被紹介者電話番号"))` [HI_TELNO] (L584-596)

Handle the referrer phone number field. Similar structure to Block 6 with `value`, `enable`, and `state` sub-keys. The `hi_telno_enabled` field defaults to `true` (editable by default).

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` — see Block 7.1 |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` — see Block 7.2 |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — see Block 7.3 |

**Block 7.1** — IF `(subkey.equalsIgnoreCase("value"))` (L585)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_telno_value((String)in_value);` // Set referrer phone number value |

**Block 7.2** — ELSE-IF `(subkey.equalsIgnoreCase("enable"))` (L588)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_telno_enabled((Boolean)in_value);` // Set referrer phone number enable flag |

**Block 7.3** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L591)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_telno_state((String)in_value);` // Set referrer phone number state |

---

**Block 8** — ELSE-IF `(keyElement.equals("被紹介者SSID"))` [HI_SYSID] (L599-611)

Handle the referrer SSID field. Same `value`/`enable`/`state` structure. The `hi_sysid_enabled` field defaults to `true`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` — see Block 8.1 |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` — see Block 8.2 |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — see Block 8.3 |

**Block 8.1** — IF `(subkey.equalsIgnoreCase("value"))` (L600)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_sysid_value((String)in_value);` // Set referrer SSID value |

**Block 8.2** — ELSE-IF `(subkey.equalsIgnoreCase("enable"))` (L603)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_sysid_enabled((Boolean)in_value);` // Set referrer SSID enable flag |

**Block 8.3** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L606)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHi_sysid_state((String)in_value);` // Set referrer SSID state |

---

**Block 9** — ELSE-IF `(keyElement.equals("サービス契約一覧リスト"))` [SVC_KEI_LIST] (L614-649)

Handle the service contract list — a **tree-bean list** type. The key format is `"サービス契約一覧リスト/INDEX/NESTED_FIELD"`. This block parses the list index from the key path, validates it, and recursively delegates to the nested bean at that index.

The Java comment reads: "データタイプがデータタイプビューン型の項目"サービス契約一覧リスト"" — the data type is a data-type view type item "Service Contract List".

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyRemain = key.substring(separaterPoint + 1);` // Extract remainder after first slash, e.g., "0/フィールド名" |
| 2 | SET | `separaterPoint = keyRemain.indexOf("/");` // Find next delimiter |
| 3 | IF | `separaterPoint > 0` — see Block 9.1 |

**Block 9.1** — IF `(separaterPoint > 0)` (L619)

The key format is correct (has at least two slashes). Extract the index and validate.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyElement = keyRemain.substring(0, separaterPoint);` // Extract index string from keyRemain |
| 2 | SET | `tmpIndexInt = null;` // Initialize index parser variable |
| 3 | TRY-CATCH | Parse index — see Block 9.1.1 and Block 9.1.2 |
| 4 | IF | `tmpIndexInt != null` — see Block 9.2 |

**Block 9.1.1** — TRY `(Integer.valueOf(keyElement))` (L624)

Attempt to parse the key element as an integer list index.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpIndexInt = Integer.valueOf(keyElement);` // Parse index from key element |

**Block 9.1.2** — CATCH `(NumberFormatException e)` (L627-629)

If the key element is not a numeric string, reset the index to null. The Java comment reads: "インデックス値が数値文字列でない場合は、ここで再設定" — if the index value is not a numeric string, reset here.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpIndexInt = null;` // Invalid index — discard |

**Block 9.2** — IF `(tmpIndexInt != null)` (L630)

The index was successfully parsed. Now validate the index range against the list size.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpIndex = tmpIndexInt.intValue();` // Unwrap Integer to int |
| 2 | IF | `tmpIndex >= 0 && tmpIndex < svc_kei_list_list.size()` — see Block 9.2.1 |

**Block 9.2.1** — IF `(tmpIndex >= 0 && tmpIndex < svc_kei_list_list.size())` (L632)

The index is valid. Extract the remaining field name and delegate to the nested bean's `storeModelData`. The Java comment reads: "データタイプビューン型では項目名、subkey、入力値およびisSetAsStringフラグを引数に指定" — for data-type view types, specify the field name, subkey, input value, and isSetAsString flag as arguments.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyElement = keyRemain.substring(separaterPoint + 1);` // Extract the nested field name |
| 2 | CAST | `(X33VDataTypeBeanInterface)svc_kei_list_list.get(tmpIndex)` // Get the list item at the parsed index |
| 3 | CALL | `storeModelData(keyElement, subkey, in_value, isSetAsString);` // Recursive delegation to nested bean |

---

**Block 10** — ELSE-IF `(keyElement.equals("顧客契約引継リスト"))` [CUST_KEI_HKTGI_LIST] (L652-687)

Handle the customer contract succession list — structurally identical to Block 9 (service contract list) but targets a different list (`cust_kei_hktgi_list_list`). The key format is `"顧客契約引継リスト/INDEX/NESTED_FIELD"`.

The Java comment reads: "データタイプがデータタイプビューン型の項目"顧客契約引継リスト"" — the data type is a data-type view type item "Customer Contract Succession List".

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyRemain = key.substring(separaterPoint + 1);` // Extract remainder after first slash |
| 2 | SET | `separaterPoint = keyRemain.indexOf("/");` // Find next delimiter |
| 3 | IF | `separaterPoint > 0` — see Block 10.1 |

**Block 10.1** — IF `(separaterPoint > 0)` (L657)

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyElement = keyRemain.substring(0, separaterPoint);` // Extract index string |
| 2 | SET | `tmpIndexInt = null;` // Initialize |
| 3 | TRY | `tmpIndexInt = Integer.valueOf(keyElement);` — see Block 10.1.1 |
| 4 | CATCH | `NumberFormatException` — see Block 10.1.2 |
| 5 | IF | `tmpIndexInt != null` — see Block 10.2 |

**Block 10.1.1** — TRY (L662)

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpIndexInt = Integer.valueOf(keyElement);` // Parse index |

**Block 10.1.2** — CATCH (L665-667)

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpIndexInt = null;` // Reset on parse failure |

**Block 10.2** — IF `(tmpIndexInt != null)` (L668)

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpIndex = tmpIndexInt.intValue();` // Unwrap |
| 2 | IF | `tmpIndex >= 0 && tmpIndex < cust_kei_hktgi_list_list.size()` — see Block 10.2.1 |

**Block 10.2.1** — IF `(tmpIndex in range)` (L670)

| # | Type | Code |
|---|------|------|
| 1 | SET | `keyElement = keyRemain.substring(separaterPoint + 1);` // Extract nested field name |
| 2 | CAST | `(X33VDataTypeBeanInterface)cust_kei_hktgi_list_list.get(tmpIndex)` // Get list item |
| 3 | CALL | `storeModelData(keyElement, subkey, in_value, isSetAsString);` // Recursive delegation |

---

**Block 11** — ELSE-IF `(keyElement.equals("ポップアップモード"))` [POPUP_MODE] (L690-699)

Handle the popup mode field. A String-type field with `value` and `state` sub-keys. The Java comment reads: "データタイプが String の項目"ポップアップモード"" — data type is a String item "Popup Mode".

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` — see Block 11.1 |
| 2 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — see Block 11.2 |

**Block 11.1** — IF `(subkey.equalsIgnoreCase("value"))` (L691)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setPopup_mode_value((String)in_value);` // Set popup mode value |

**Block 11.2** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L694)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setPopup_mode_state((String)in_value);` // Set popup mode state |

---

**Block 12** — END (implicit else, no default action)

If none of the key elements match, the method returns without taking any action. The `else` branch is implicit — no default handling is performed for unrecognized keys.

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `hktg_sysid` | Field | Continuation SSID — the session/contract identifier for existing service contracts being continued |
| `hktg_svc_kei_no` | Field | Continuation Customer ID — the customer identifier for existing/continuing service contracts |
| `hi_cust_nm` | Field | Referee (Referrer) Contract Name — the name of the contract party in a referral program context |
| `hi_telno` | Field | Referee Phone Number — the contact phone number of the referred party |
| `hi_sysid` | Field | Referee SSID — the SSID identifier for the referred customer in the referral system |
| `svc_kei_list` | Field | Service Contract List — a list of service contracts associated with the customer |
| `cust_kei_hktgi_list` | Field | Customer Contract Succession List — a list of contracts being transferred/successioned to a new party |
| `popup_mode` | Field | Popup Mode — a UI mode flag controlling popup window behavior on the screen |
| `HKTG_SYSID` | Constant | "継続SSID" — the key constant for continuation SSID field routing |
| `HKTG_SVC_KEI_NO` | Constant | "継続お客様ID" — the key constant for continuation customer ID field routing |
| `HI_CUST_NM` | Constant | "被紹介者契約者名" — the key constant for referrer contract name field routing |
| `HI_TELNO` | Constant | "被紹介者電話番号" — the key constant for referrer phone number field routing |
| `HI_SYSID` | Constant | "被紹介者SSID" — the key constant for referrer SSID field routing |
| `SVC_KEI_LIST` | Constant | "サービス契約一覧リスト" — the key constant for service contract list field routing |
| `CUST_KEI_HKTGI_LIST` | Constant | "顧客契約引継リスト" — the key constant for customer contract succession list routing |
| `POPUP_MODE` | Constant | "ポップアップモード" — the key constant for popup mode field routing |
| SSID | Acronym | Session/Service Identifier — a unique identifier used to track a contract session or service instance |
| X33VDataTypeBeanInterface | Interface | A contract interface for data-type view beans that support hierarchical key-based model data access (both `storeModelData` and likely `retrieveModelData`) |
| X33VDataTypeList | Class | A list container for `X33VDataTypeBeanInterface` objects, providing indexed access to nested data-type beans |
| X33VViewBaseBean | Class | The parent base bean class providing common view-layer functionality including `storeCommonInfoData` for shared information |
| common info (共通情報) | Domain concept | Screen-level shared data (e.g., system settings, menu data) that applies across all screens rather than being specific to a particular screen's data model |
| enable (Boolean) | Sub-key | A flag indicating whether a field is editable/visible. Only present on referrer-related fields (`hi_cust_nm`, `hi_telno`, `hi_sysid`) |
| state (String) | Sub-key | A field state indicator (e.g., "readonly", "error", "required") used by the UI rendering layer |
| value (String) | Sub-key | The actual data value to be stored in the field |
| KKW01037SF | Module | The screen module code — this bean belongs to the KKW01037SF service flow, likely related to continuation/referral customer contract management |
| `in_value` | Parameter | The input data object containing the value to be stored, cast to the appropriate type based on the target field |
| `isSetAsString` | Parameter | A flag passed through to nested beans indicating whether Long-type fields should be populated from String values |
