# Business Logic — KKW00128SF01DBean.storeModelData() [270 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA16601SF.KKW00128SF01DBean` |
| Layer | View / Bean (webview layer — data binding DTO) |
| Module | `KKA16601SF` (Package: `eo.web.webview.KKA16601SF`) |

## 1. Role

### KKW00128SF01DBean.storeModelData()

This method is a **generic model data setter dispatcher** that routes incoming key-value pairs into the correct bean property based on the business field identified by the `key` parameter. It serves as the central data-binding bridge between the web-view layer (JSP/Hibernate view models) and the strongly-typed `KKW00128SF01DBean` data model, enabling polymorphic field assignment without compile-time knowledge of which specific field is being set.

The method handles **two categories of service types**: (1) simple scalar String fields (e.g., system ID, service codes, pricing codes, popup mode flags) where it delegates to direct setter methods, and (2) list-indexed items (transfer reason codes and option service contract numbers) where it extracts an index from the key, performs range validation, and recursively delegates to the appropriate `X33VDataTypeStringBean` list element. Each scalar branch further branches on the `subkey` parameter to distinguish between `"value"` (the data value) and `"state"` (the item state metadata). The external system code branch uniquely handles three subkey options: `"value"`, `"enable"`, and `"state"`.

The design pattern employed is a **routing/dispatch (multiway if-else) pattern** combined with **delegation** — the method itself performs no data transformation but routes each call to the appropriate setter or recursively to a child bean, keeping the bean itself stateless with respect to the dispatch logic.

Its role in the larger system is that of a **shared view-model binding utility**, enabling screens in the telecom service contract management domain (specifically the service detail change / transfer screen KKA16601SF) to populate bean properties dynamically using string-based field names. This is particularly important for list-rendered UI components where field names include zero-based indices (e.g., `"異動理由コード/0"` → `ido_rsn_cd_list.get(0)`).

The method has two conditional branch categories: the primary branch on `key` (~17 branches) and the secondary branch on `subkey` (`"value"`, `"state"`, or `"enable"`). Most key branches follow the same value/state pattern; two key branches (`異動理由コード` and `オプションサービス契約番号`) perform index extraction and recursion; one key branch (`外部システムコード`) has an additional `"enable"` subkey path.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData params"])

    START --> NULL_CHECK["key == null or subkey == null?"]

    NULL_CHECK -->|Yes| EARLY_RETURN(["Return early"])
    NULL_CHECK -->|No| FIND_SEP["FIND separaterPoint = key.indexOf slash"]

    FIND_SEP --> SYSID_CHK["key equals 'SYSID'?"]

    SYSID_CHK -->|Yes| SYSID_V_CHK["subkey equals 'value'?"]

    SYSID_V_CHK -->|Yes| SET_SYSID_V["setSysid_value"] --> END_NODE(["Return"])
    SYSID_V_CHK -->|No| SET_SYSID_S["setSysid_state"] --> END_NODE

    SYSID_CHK -->|No| SVC_KEI_NO_CHK["key equals 'サービス契約番号'?"]

    SVC_KEI_NO_CHK -->|Yes| SVKN_V_CHK["subkey equals 'value'?"]
    SVKN_V_CHK -->|Yes| SET_SVKN_V["setSvc_kei_no_value"] --> END_NODE
    SVKN_V_CHK -->|No| SET_SVKN_S["setSvc_kei_no_state"] --> END_NODE

    SVC_KEI_NO_CHK -->|No| IDO_DIV_CHK["key equals '異動区分'?"]

    IDO_DIV_CHK -->|Yes| IDDV_V_CHK["subkey equals 'value'?"]
    IDDV_V_CHK -->|Yes| SET_IDDV_V["setIdo_div_value"] --> END_NODE
    IDDV_V_CHK -->|No| SET_IDDV_S["setIdo_div_state"] --> END_NODE

    IDO_DIV_CHK -->|No| IDO_RSN_CD_CHK["key equals '異動理由コード'?"]

    IDO_RSN_CD_CHK -->|Yes| IDO_RSN_CD_LIST["Extract index from key substring"]
    IDO_RSN_CD_LIST --> PARSE_IDX["Parse index as Integer"]
    PARSE_IDX --> TRY_IDX["Index valid?"]
    TRY_IDX -->|Yes| IDX_RANGE["Range check: 0 <= idx < size"]
    IDX_RANGE -->|Yes| RECURSE_RSN["Recurse: ido_rsn_cd_list.get(idx).storeModelData"] --> END_NODE
    IDX_RANGE -->|No| END_NODE
    TRY_IDX -->|No| IDX_NULL["Set null - skip"] --> END_NODE

    IDO_RSN_CD_CHK -->|No| IDO_RSN_MEMO_CHK["key equals '異動理由メモ'?"]

    IDO_RSN_MEMO_CHK -->|Yes| IRM_V_CHK["subkey equals 'value'?"]
    IRM_V_CHK -->|Yes| SET_IRM_V["setIdo_rsn_memo_value"] --> END_NODE
    IRM_V_CHK -->|No| SET_IRM_S["setIdo_rsn_memo_state"] --> END_NODE

    IDO_RSN_MEMO_CHK -->|No| OP_SVC_KEI_NO_CHK["key equals 'オプションサービス契約番号'?"]

    OP_SVC_KEI_NO_CHK -->|Yes| OP_SVC_IDX["Extract index from key substring"]
    OP_SVC_IDX --> OP_PARSE["Parse index as Integer"]
    OP_PARSE --> OP_RANGE["Range check: 0 <= idx < size"]
    OP_RANGE -->|Yes| RECURSE_OP["Recurse: op_svc_kei_no_list.get(idx).storeModelData"] --> END_NODE
    OP_RANGE -->|No| END_NODE
    OP_PARSE -->|No| END_NODE

    OP_SVC_KEI_NO_CHK -->|No| TRAN_DIV_CHK["key equals '処理区分'?"]

    TRAN_DIV_CHK -->|Yes| TRDIV_V_CHK["subkey equals 'value'?"]
    TRDIV_V_CHK -->|Yes| SET_TRDIV_V["setTran_div_value"] --> END_NODE
    TRDIV_V_CHK -->|No| SET_TRDIV_S["setTran_div_state"] --> END_NODE

    TRAN_DIV_CHK -->|No| MSKM_NO_CHK["key equals '申込番号'?"]

    MSKM_NO_CHK -->|Yes| MSKMN_V_CHK["subkey equals 'value'?"]
    MSKMN_V_CHK -->|Yes| SET_MSFKM_V["setMskm_no_value"] --> END_NODE
    MSKMN_V_CHK -->|No| SET_MSFM_S["setMskm_no_state"] --> END_NODE

    MSKM_NO_CHK -->|No| MSKM_DTL_CHK["key equals '申込詳細番号'?"]

    MSKM_DTL_CHK -->|Yes| MSKDTL_V_CHK["subkey equals 'value'?"]
    MSKDTL_V_CHK -->|Yes| SET_MDTL_V["setMskm_dtl_no_value"] --> END_NODE
    MSKDTL_V_CHK -->|No| SET_MDTL_S["setMskm_dtl_no_state"] --> END_NODE

    MSKM_DTL_CHK -->|No| TOK_NM_CHK["key equals '特定ID項目名'?"]

    TOK_NM_CHK -->|Yes| TKNM_V_CHK["subkey equals 'value'?"]
    TKNM_V_CHK -->|Yes| SET_TKNM_V["setTokutei_id_kmk_nm_value"] --> END_NODE
    TKNM_V_CHK -->|No| SET_TKNM_S["setTokutei_id_kmk_nm_state"] --> END_NODE

    TOK_NM_CHK -->|No| TOK_VAL_CHK["key equals '特定ID項目値'?"]

    TOK_VAL_CHK -->|Yes| TKVL_V_CHK["subkey equals 'value'?"]
    TKVL_V_CHK -->|Yes| SET_TKVL_V["setTokutei_id_kmk_value_value"] --> END_NODE
    TKVL_V_CHK -->|No| SET_TKVL_S["setTokutei_id_kmk_value_state"] --> END_NODE

    TOK_VAL_CHK -->|No| POPUP_CHK["key equals 'ポップアップモード'?"]

    POPUP_CHK -->|Yes| PM_V_CHK["subkey equals 'value'?"]
    PM_V_CHK -->|Yes| SET_PM_V["setPopup_mode_value"] --> END_NODE
    PM_V_CHK -->|No| SET_PM_S["setPopup_mode_state"] --> END_NODE

    POPUP_CHK -->|No| IDO_SENI_CHK["key equals '異動区分選択画面遷移パターン'?"]

    IDO_SENI_CHK -->|Yes| IDSENIV_CHK["subkey equals 'value'?"]
    IDSENIV_CHK -->|Yes| SET_IDSENI_V["setIdo_div_seni_ptn_value"] --> END_NODE
    IDSENIV_CHK -->|No| SET_IDSENI_S["setIdo_div_seni_ptn_state"] --> END_NODE

    IDO_SENI_CHK -->|No| SVC_CD_CHK["key equals 'サービスコード'?"]

    SVC_CD_CHK -->|Yes| SCD_V_CHK["subkey equals 'value'?"]
    SCD_V_CHK -->|Yes| SET_SCD_V["setSvc_cd_value"] --> END_NODE
    SCD_V_CHK -->|No| SET_SCD_S["setSvc_cd_state"] --> END_NODE

    SVC_CD_CHK -->|No| PRC_GRP_CHK["key equals '料金グループコード'?"]

    PRC_GRP_CHK -->|Yes| PGCD_V_CHK["subkey equals 'value'?"]
    PGCD_V_CHK -->|Yes| SET_PGCD_V["setPrc_grp_cd_value"] --> END_NODE
    PGCD_V_CHK -->|No| SET_PGCD_S["setPrc_grp_cd_state"] --> END_NODE

    PRC_GRP_CHK -->|No| PCRS_CHK["key equals '料金コースコード'?"]

    PCRS_CHK -->|Yes| PCSCD_V_CHK["subkey equals 'value'?"]
    PCSCD_V_CHK -->|Yes| SET_PCSCD_V["setPcrs_cd_value"] --> END_NODE
    PCSCD_V_CHK -->|No| SET_PCSCD_S["setPcrs_cd_state"] --> END_NODE

    PCRS_CHK -->|No| PPLAN_CHK["key equals '料金プランコード'?"]

    PPLAN_CHK -->|Yes| PPCD_V_CHK["subkey equals 'value'?"]
    PPCD_V_CHK -->|Yes| SET_PPCD_V["setPplan_cd_value"] --> END_NODE
    PPCD_V_CHK -->|No| SET_PPCD_S["setPplan_cd_state"] --> END_NODE

    PPLAN_CHK -->|No| SVC_BF_CHK["key equals '変更前サービスコード'?"]

    SVC_BF_CHK -->|Yes| SBCD_V_CHK["subkey equals 'value'?"]
    SBCD_V_CHK -->|Yes| SET_SBCD_V["setSvc_cd_bf_value"] --> END_NODE
    SBCD_V_CHK -->|No| SET_SBCD_S["setSvc_cd_bf_state"] --> END_NODE

    SVC_BF_CHK -->|No| PRC_BF_CHK["key equals '変更前料金グループコード'?"]

    PRC_BF_CHK -->|Yes| PBGCD_V_CHK["subkey equals 'value'?"]
    PBGCD_V_CHK -->|Yes| SET_PBGCD_V["setPrc_grp_cd_bf_value"] --> END_NODE
    PBGCD_V_CHK -->|No| SET_PBGCD_S["setPrc_grp_cd_bf_state"] --> END_NODE

    PRC_BF_CHK -->|No| PCRS_BF_CHK["key equals '変更前料金コースコード'?"]

    PCRS_BF_CHK -->|Yes| PBC_V_CHK["subkey equals 'value'?"]
    PBC_V_CHK -->|Yes| SET_PBC_V["setPcrs_cd_bf_value"] --> END_NODE
    PBC_V_CHK -->|No| SET_PBC_S["setPcrs_cd_bf_state"] --> END_NODE

    PCRS_BF_CHK -->|No| PPLAN_BF_CHK["key equals '変更前料金プランコード'?"]

    PPLAN_BF_CHK -->|Yes| PBPCD_V_CHK["subkey equals 'value'?"]
    PBPCD_V_CHK -->|Yes| SET_PBPCD_V["setPplan_cd_bf_value"] --> END_NODE
    PBPCD_V_CHK -->|No| SET_PBPCD_S["setPplan_cd_bf_state"] --> END_NODE

    PPLAN_BF_CHK -->|No| WRIB_CHK["key equals '割引自動適用対象外フラグ'?"]

    WRIB_CHK -->|Yes| WAETG_V_CHK["subkey equals 'value'?"]
    WAETG_V_CHK -->|Yes| SET_WAETG_V["setWrib_auto_aply_tg_gai_flg_value"] --> END_NODE
    WAETG_V_CHK -->|No| SET_WAETG_S["setWrib_auto_aply_tg_gai_flg_state"] --> END_NODE

    WRIB_CHK -->|No| SYSCD_CHK["key equals '外部システムコード'?"]

    SYSCD_CHK -->|Yes| SYSCD_V_CHK["subkey equals 'value'?"]
    SYSCD_V_CHK -->|Yes| SET_SYSCD_V["setSyscd_value"] --> END_NODE
    SYSCD_V_CHK -->|No| SYSCD_E_CHK["subkey equals 'enable'?"]
    SYSCD_E_CHK -->|Yes| SET_SYSCD_E["setSyscd_enabled"] --> END_NODE
    SYSCD_E_CHK -->|No| SET_SYSCD_S["setSyscd_state"] --> END_NODE

    SYSCD_CHK -->|No| NO_MATCH(["No match - no-op"]) --> END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business field identifier that determines which property of the bean to set. Represents one of 17 telecom service-contract domain fields (e.g., `"サービスコード"` for service code, `"料金プランコード"` for pricing plan code, `"異動理由コード"` for transfer reason code). For list-indexed fields (`異動理由コード`, `オプションサービス契約番号`), the key includes a slash and zero-based index (e.g., `"異動理由コード/0"`), enabling dynamic access to list elements. |
| 2 | `subkey` | `String` | The sub-property selector within the field. For most fields, valid values are `"value"` (set the field's data value) or `"state"` (set the field's item state metadata, e.g., whether the item has been modified). For the external system code field (`外部システムコード`), an additional `"enable"` option exists that sets a Boolean `hktgi_syscd_enabled` flag. Case-insensitive comparison is used via `equalsIgnoreCase`. |
| 3 | `in_value` | `Object` | The data value to assign. For almost all branches, this is a `String` cast. For the external system code's `"enable"` subkey branch, this is a `Boolean` cast, setting whether the external system code is enabled. |
| 4 | `isSetAsString` | `boolean` | Controls whether a Long-type field's value property should be set as a String. Documented as: `Long型項目ValueプロパティへString型値の設定を行う場合true`. In the current implementation this parameter is passed to recursive calls on list elements but is not used in the scalar setter branches of this method (270 LOC). |

**Instance fields read:**
| Field | Type | Usage |
|-------|------|-------|
| `ido_rsn_cd_list` | `List` | List of `X33VDataTypeStringBean` elements for transfer reason codes. Used in the `異動理由コード` branch to retrieve the element at the parsed index for recursive model data storage. |
| `op_svc_kei_no_list` | `List` | List of `X33VDataTypeStringBean` elements for option service contract numbers. Used in the `オプションサービス契約番号` branch identically. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKAdEditCC.substring` | JKKAdEditCC | - | Calls `substring` in `JKKAdEditCC` utility |
| - | `JKKAdEdit.substring` | JKKAdEdit | - | Calls `substring` in `JKKAdEdit` utility |
| - | `JKKTelnoInfoAddMapperCC.substring` | JKKTelnoInfoAddMapperCC | - | Calls `substring` in `JKKTelnoInfoAddMapperCC` utility |
| - | `JDKejbStringEdit.substring` | JDKejbStringEdit | - | Calls `substring` in `JDKejbStringEdit` utility |
| - | `KKW00128SF01DBean.setIdo_div_seni_ptn_state` | KKW00128SF01DBean | - | Calls `setIdo_div_seni_ptn_state` bean setter |
| - | `KKW00128SF01DBean.setIdo_div_seni_ptn_value` | KKW00128SF01DBean | - | Calls `setIdo_div_seni_ptn_value` bean setter |
| - | `KKW00128SF01DBean.setIdo_div_state` | KKW00128SF01DBean | - | Calls `setIdo_div_state` bean setter |
| - | `KKW00128SF01DBean.setIdo_div_value` | KKW00128SF01DBean | - | Calls `setIdo_div_value` bean setter |
| - | `KKW00128SF01DBean.setIdo_rsn_memo_state` | KKW00128SF01DBean | - | Calls `setIdo_rsn_memo_state` bean setter |
| - | `KKW00128SF01DBean.setIdo_rsn_memo_value` | KKW00128SF01DBean | - | Calls `setIdo_rsn_memo_value` bean setter |
| - | `KKW00128SF01DBean.setMskm_dtl_no_state` | KKW00128SF01DBean | - | Calls `setMskm_dtl_no_state` bean setter |
| - | `KKW00128SF01DBean.setMskm_dtl_no_value` | KKW00128SF01DBean | - | Calls `setMskm_dtl_no_value` bean setter |
| - | `KKW00128SF01DBean.setMskm_no_state` | KKW00128SF01DBean | - | Calls `setMskm_no_state` bean setter |
| - | `KKW00128SF01DBean.setMskm_no_value` | KKW00128SF01DBean | - | Calls `setMskm_no_value` bean setter |
| - | `KKW00128SF01DBean.setPcrs_cd_bf_state` | KKW00128SF01DBean | - | Calls `setPcrs_cd_bf_state` bean setter |
| - | `KKW00128SF01DBean.setPcrs_cd_bf_value` | KKW00128SF01DBean | - | Calls `setPcrs_cd_bf_value` bean setter |
| - | `KKW00128SF01DBean.setPcrs_cd_state` | KKW00128SF01DBean | - | Calls `setPcrs_cd_state` bean setter |
| - | `KKW00128SF01DBean.setPcrs_cd_value` | KKW00128SF01DBean | - | Calls `setPcrs_cd_value` bean setter |
| - | `KKW00128SF01DBean.setPopup_mode_state` | KKW00128SF01DBean | - | Calls `setPopup_mode_state` bean setter |
| - | `KKW00128SF01DBean.setPopup_mode_value` | KKW00128SF01DBean | - | Calls `setPopup_mode_value` bean setter |
| - | `KKW00128SF01DBean.setPplan_cd_bf_state` | KKW00128SF01DBean | - | Calls `setPplan_cd_bf_state` bean setter |
| - | `KKW00128SF01DBean.setPplan_cd_bf_value` | KKW00128SF01DBean | - | Calls `setPplan_cd_bf_value` bean setter |
| - | `KKW00128SF01DBean.setPplan_cd_state` | KKW00128SF01DBean | - | Calls `setPplan_cd_state` bean setter |
| - | `KKW00128SF01DBean.setPplan_cd_value` | KKW00128SF01DBean | - | Calls `setPplan_cd_value` bean setter |
| - | `KKW00128SF01DBean.setPrc_grp_cd_bf_state` | KKW00128SF01DBean | - | Calls `setPrc_grp_cd_bf_state` bean setter |
| - | `KKW00128SF01DBean.setPrc_grp_cd_bf_value` | KKW00128SF01DBean | - | Calls `setPrc_grp_cd_bf_value` bean setter |
| - | `KKW00128SF01DBean.setPrc_grp_cd_state` | KKW00128SF01DBean | - | Calls `setPrc_grp_cd_state` bean setter |
| - | `KKW00128SF01DBean.setPrc_grp_cd_value` | KKW00128SF01DBean | - | Calls `setPrc_grp_cd_value` bean setter |
| - | `KKW00128SF01DBean.setSvc_cd_bf_state` | KKW00128SF01DBean | - | Calls `setSvc_cd_bf_state` bean setter |
| - | `KKW00128SF01DBean.setSvc_cd_bf_value` | KKW00128SF01DBean | - | Calls `setSvc_cd_bf_value` bean setter |
| - | `KKW00128SF01DBean.setSyscd_enabled` | KKW00128SF01DBean | - | Calls `setSyscd_enabled` bean setter for external system code enable flag |
| - | `KKW00128SF01DBean.setSyscd_state` | KKW00128SF01DBean | - | Calls `setSyscd_state` bean setter |
| - | `KKW00128SF01DBean.setSyscd_value` | KKW00128SF01DBean | - | Calls `setSyscd_value` bean setter |
| - | `KKW00128SF01DBean.setTokutei_id_kmk_nm_state` | KKW00128SF01DBean | - | Calls `setTokutei_id_kmk_nm_state` bean setter |
| - | `KKW00128SF01DBean.setTokutei_id_kmk_nm_value` | KKW00128SF01DBean | - | Calls `setTokutei_id_kmk_nm_value` bean setter |
| - | `KKW00128SF01DBean.setTokutei_id_kmk_value_state` | KKW00128SF01DBean | - | Calls `setTokutei_id_kmk_value_state` bean setter |
| - | `KKW00128SF01DBean.setTokutei_id_kmk_value_value` | KKW00128SF01DBean | - | Calls `setTokutei_id_kmk_value_value` bean setter |
| - | `KKW00128SF01DBean.setTran_div_state` | KKW00128SF01DBean | - | Calls `setTran_div_state` bean setter |
| - | `KKW00128SF01DBean.setTran_div_value` | KKW00128SF01DBean | - | Calls `setTran_div_value` bean setter |
| - | `KKW00128SF01DBean.setWrib_auto_aply_tg_gai_flg_state` | KKW00128SF01DBean | - | Calls `setWrib_auto_aply_tg_gai_flg_state` bean setter |
| - | `KKW00128SF01DBean.setWrib_auto_aply_tg_gai_flg_value` | KKW00128SF01DBean | - | Calls `setWrib_auto_aply_tg_gai_flg_value` bean setter |

**Note:** This method performs **no database or service component (SC/CBS) CRUD operations**. It is a pure in-memory model data setter. All calls are internal bean setters (`set*`) on the `KKW00128SF01DBean` class itself, plus utility `substring` calls from common edit components.

## 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: `setSyscd_state` [-], `setSyscd_enabled` [-], `setSyscd_value` [-], `setWrib_auto_aply_tg_gai_flg_state` [-], `setWrib_auto_aply_tg_gai_flg_value` [-], `setPplan_cd_bf_state` [-], `setPplan_cd_bf_value` [-], `setPcrs_cd_bf_state` [-], `setPcrs_cd_bf_value` [-], `setPrc_grp_cd_bf_state` [-], `setPrc_grp_cd_bf_value` [-], `setSvc_cd_bf_state` [-], `setSvc_cd_bf_value` [-], `setPplan_cd_state` [-], `setPplan_cd_value` [-], `setPcrs_cd_state` [-], `setPcrs_cd_value` [-], `setPrc_grp_cd_state` [-], `setPrc_grp_cd_value` [-], `setSvc_cd_state` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `KKW00128SF01DBean.storeModelData` (self-recursion) | `KKW00128SF01DBean.storeModelData(key, subkey, in_value, isSetAsString)` | `setIdo_div_seni_ptn_state`, `setIdo_div_seni_ptn_value`, `setIdo_div_state`, `setIdo_div_value`, `setIdo_rsn_memo_state`, `setIdo_rsn_memo_value`, `setMskm_dtl_no_state`, `setMskm_dtl_no_value`, `setMskm_no_state`, `setMskm_no_value`, `setPcrs_cd_bf_state`, `setPcrs_cd_bf_value`, `setPcrs_cd_state`, `setPcrs_cd_value`, `setPopup_mode_state`, `setPopup_mode_value`, `setPplan_cd_bf_state`, `setPplan_cd_bf_value`, `setPplan_cd_state`, `setPplan_cd_value`, `setPrc_grp_cd_bf_state`, `setPrc_grp_cd_bf_value`, `setPrc_grp_cd_state`, `setPrc_grp_cd_value`, `setSvc_cd_bf_state`, `setSvc_cd_bf_value`, `setSyscd_enabled`, `setSyscd_state`, `setSyscd_value`, `setTokutei_id_kmk_nm_state`, `setTokutei_id_kmk_nm_value`, `setTokutei_id_kmk_value_state`, `setTokutei_id_kmk_value_value`, `setTran_div_state`, `setTran_div_value`, `setWrib_auto_aply_tg_gai_flg_state`, `setWrib_auto_aply_tg_gai_flg_value` |

**Call chain details:**
- The method is called directly from within its own class (`KKW00128SF01DBean`) — specifically during recursive delegation to list element beans (`X33VDataTypeStringBean`) for the `異動理由コード` and `オプションサービス契約番号` list-indexed fields, and for scalar fields during model population from the screen.
- No external screen (KKSV*) or batch entry points were found within 8 hops. The method is a leaf-level data binding utility consumed by the view layer of the KKA16601SF screen (service detail change / transfer).

## 6. Per-Branch Detail Blocks

**Block 1** — IF (early null check) `key == null || subkey == null` (L1009-1012)

> If either the field identifier or sub-property key is null, abort processing immediately. This is a guard clause preventing NPE on downstream `equals()` and `equalsIgnoreCase()` calls.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return;` // key or subkey is null - abort early |

---

**Block 2** — SET (compute separator position) (L1014)

> Computes the position of the first `/` character in `key`. This is used later by list-indexed branches to extract the zero-based index from keys like `"異動理由コード/0"`. For scalar fields without a `/`, this value will be `-1` but is unused since those branches do not call `substring` on it.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // Find first slash position |

---

**Block 3** — IF-ELSE-IF chain: 17 key-conditional branches (L1016-L1276)

> The core dispatch logic: 17 `if` / `else if` branches, each matching a specific `key` value (Japanese business field name) and delegating to the appropriate setter. Branches 3.2 and 3.8 are special — they handle list-indexed items with recursive delegation. Branch 3.17 (external system code) has three subkey options (`value`, `enable`, `state`) instead of the standard two (`value`, `state`).

---

**Block 3.1** — IF [key equals "SYSID"] (L1017-1027)

> System ID item — data type String. Sets the system ID value or state property.

| # | Type | Code |
|---|------|------|
| 1 | IF | `key.equals("SYSID")` [SYSID field] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` [Set the SYSID data value] |
| 3 | EXEC | `setSysid_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` [Set SYSID state] |
| 5 | EXEC | `setSysid_state((String)in_value);` // Return the state when subkey is "state" |

---

**Block 3.2** — IF-ELSE-IF [key equals "サービス契約番号"] (L1030-1040)

> Service Contract Number item — data type String. Sets the service contract number value or state property. Item ID: `svc_kei_no`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("サービス契約番号")` [Service Contract Number] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setSvc_kei_no_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setSvc_kei_no_state((String)in_value);` // Return state |

---

**Block 3.3** — IF-ELSE-IF [key equals "異動区分"] (L1043-1053)

> Transfer Classification item — data type String. Sets the transfer classification value or state property. Item ID: `ido_div`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("異動区分")` [Transfer Classification] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setIdo_div_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setIdo_div_state((String)in_value);` // Return state |

---

**Block 3.4** — IF-ELSE-IF [key equals "異動理由コード"] (L1056-1084)

> Transfer Reason Code item — **list-indexed** item. Data type String. Item ID: `ido_rsn_cd`. Extracts a zero-based index from the key (e.g., `"異動理由コード/0"` → index `0`), validates the index is a valid number and within the list bounds, then recursively delegates to the `X33VDataTypeStringBean` at that index.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("異動理由コード")` [Transfer Reason Code - List] |
| 2 | SET | `key = key.substring(separaterPoint + 1);` // Extract substring after first "/" from "ido_rsn_cd/0" |
| 3 | SET | `Integer tmpIndexInt = null;` // Initialize to null |
| 4 | TRY-CATCH | `tmpIndexInt = Integer.valueOf(key);` [Try to parse index as Integer] |
| 5 | CATCH | `catch(NumberFormatException e) { tmpIndexInt = null; }` // If not a numeric string, return null here |
| 6 | IF | `tmpIndexInt != null` [Index is a numeric string] |
| 7 | SET | `int tmpIndex = tmpIndexInt.intValue();` |
| 8 | IF | `tmpIndex >= 0 && tmpIndex < ido_rsn_cd_list.size()` [Index within list bounds] |
| 9 | EXEC | `((X33VDataTypeStringBean)ido_rsn_cd_list.get(tmpIndex)).storeModelData(subkey, in_value);` // Recursive call on list element bean |
| 10 | NOTE | // The cast portion selects one of X33VDataTypeStringBean, X33VDataTypeLongBean, X33VDataTypeBooleanBean depending on item definition. X33VDataTypeLongBean receives subkey and isSetAsString as arguments. |

---

**Block 3.5** — IF-ELSE-IF [key equals "異動理由メモ"] (L1087-1097)

> Transfer Reason Memo item — data type String. Sets the transfer reason memo value or state property. Item ID: `ido_rsn_memo`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("異動理由メモ")` [Transfer Reason Memo] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setIdo_rsn_memo_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setIdo_rsn_memo_state((String)in_value);` // Return state |

---

**Block 3.6** — IF-ELSE-IF [key equals "オプションサービス契約番号"] (L1100-1130)

> Option Service Contract Number item — **list-indexed** item. Data type String. Item ID: `op_svc_kei_no`. Same pattern as Block 3.4 (index extraction, parse, range check, recursive delegation).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("オプションサービス契約番号")` [Option Service Contract Number - List] |
| 2 | SET | `key = key.substring(separaterPoint + 1);` // Extract substring after first "/" from "op_svc_kei_no/0" |
| 3 | SET | `Integer tmpIndexInt = null;` |
| 4 | TRY-CATCH | `tmpIndexInt = Integer.valueOf(key);` [Try to parse as Integer] |
| 5 | CATCH | `catch(NumberFormatException e) { tmpIndexInt = null; }` // Not a numeric string |
| 6 | IF | `tmpIndexInt != null` [Index is a numeric string] |
| 7 | SET | `int tmpIndex = tmpIndexInt.intValue();` |
| 8 | IF | `tmpIndex >= 0 && tmpIndex < op_svc_kei_no_list.size()` [Index within list bounds] |
| 9 | EXEC | `((X33VDataTypeStringBean)op_svc_kei_no_list.get(tmpIndex)).storeModelData(subkey, in_value);` // Recursive call on list element bean |
| 10 | NOTE | // Cast selects among X33VDataTypeStringBean, X33VDataTypeLongBean, X33VDataTypeBooleanBean |

---

**Block 3.7** — IF-ELSE-IF [key equals "処理区分"] (L1133-1143)

> Processing Classification item — data type String. Sets the processing classification value or state property. Item ID: `tran_div`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("処理区分")` [Processing Classification] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setTran_div_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setTran_div_state((String)in_value);` // Return state |

---

**Block 3.8** — IF-ELSE-IF [key equals "申込番号"] (L1146-1156)

> Application Number item — data type String. Sets the application number value or state property. Item ID: `mskm_no`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("申込番号")` [Application Number] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setMskm_no_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setMskm_no_state((String)in_value);` // Return state |

---

**Block 3.9** — IF-ELSE-IF [key equals "申込詳細番号"] (L1159-1169)

> Application Detail Number item — data type String. Sets the application detail number value or state property. Item ID: `mskm_dtl_no`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("申込詳細番号")` [Application Detail Number] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setMskm_dtl_no_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setMskm_dtl_no_state((String)in_value);` // Return state |

---

**Block 3.10** — IF-ELSE-IF [key equals "特定ID項目名"] (L1172-1182)

> Specific ID Item Name item — data type String. Sets the specific ID item name value or state property. Item ID: `tokutei_id_kmk_nm`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("特定ID項目名")` [Specific ID Item Name] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setTokutei_id_kmk_nm_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setTokutei_id_kmk_nm_state((String)in_value);` // Return state |

---

**Block 3.11** — IF-ELSE-IF [key equals "特定ID項目値"] (L1185-1195)

> Specific ID Item Value item — data type String. Sets the specific ID item value value or state property. Item ID: `tokutei_id_kmk_value`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("特定ID項目値")` [Specific ID Item Value] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setTokutei_id_kmk_value_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setTokutei_id_kmk_value_state((String)in_value);` // Return state |

---

**Block 3.12** — IF-ELSE-IF [key equals "ポップアップモード"] (L1198-1208)

> Popup Mode item — data type String. Sets the popup mode value or state property. Item ID: `popup_mode`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("ポップアップモード")` [Popup Mode] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPopup_mode_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPopup_mode_state((String)in_value);` // Return state |

---

**Block 3.13** — IF-ELSE-IF [key equals "異動区分選択画面遷移パターン"] (L1211-1221)

> Transfer Classification Screen Pattern item — data type String. Sets the transfer classification selection screen transition pattern value or state property. Item ID: `ido_div_seni_ptn`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("異動区分選択画面遷移パターン")` [Transfer Classification Screen Pattern] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setIdo_div_seni_ptn_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setIdo_div_seni_ptn_state((String)in_value);` // Return state |

---

**Block 3.14** — IF-ELSE-IF [key equals "サービスコード"] (L1224-1234)

> Service Code item — data type String. Sets the service code value or state property. Item ID: `svc_cd`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("サービスコード")` [Service Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setSvc_cd_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setSvc_cd_state((String)in_value);` // Return state |

---

**Block 3.15** — IF-ELSE-IF [key equals "料金グループコード"] (L1237-1247)

> Pricing Group Code item — data type String. Sets the pricing group code value or state property. Item ID: `prc_grp_cd`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("料金グループコード")` [Pricing Group Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPrc_grp_cd_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPrc_grp_cd_state((String)in_value);` // Return state |

---

**Block 3.16** — IF-ELSE-IF [key equals "料金コースコード"] (L1250-1260)

> Pricing Course Code item — data type String. Sets the pricing course code value or state property. Item ID: `pcrs_cd`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("料金コースコード")` [Pricing Course Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPcrs_cd_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPcrs_cd_state((String)in_value);` // Return state |

---

**Block 3.17** — IF-ELSE-IF [key equals "料金プランコード"] (L1263-1273)

> Pricing Plan Code item — data type String. Sets the pricing plan code value or state property. Item ID: `pplan_cd`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("料金プランコード")` [Pricing Plan Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPplan_cd_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPplan_cd_state((String)in_value);` // Return state |

---

**Block 3.18** — IF-ELSE-IF [key equals "変更前サービスコード"] (L1276-1286)

> Before-Change Service Code item — data type String. Sets the pre-change service code value or state property. Item ID: `svc_cd_bf`. These "before-change" (変更前) fields are used to track the original values before a service contract modification, enabling audit trails and change comparison.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("変更前サービスコード")` [Before-Change Service Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setSvc_cd_bf_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setSvc_cd_bf_state((String)in_value);` // Return state |

---

**Block 3.19** — IF-ELSE-IF [key equals "変更前料金グループコード"] (L1289-1299)

> Before-Change Pricing Group Code item — data type String. Sets the pre-change pricing group code value or state property. Item ID: `prc_grp_cd_bf`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("変更前料金グループコード")` [Before-Change Pricing Group Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPrc_grp_cd_bf_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPrc_grp_cd_bf_state((String)in_value);` // Return state |

---

**Block 3.20** — IF-ELSE-IF [key equals "変更前料金コースコード"] (L1302-1312)

> Before-Change Pricing Course Code item — data type String. Sets the pre-change pricing course code value or state property. Item ID: `pcrs_cd_bf`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("変更前料金コースコード")` [Before-Change Pricing Course Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPcrs_cd_bf_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPcrs_cd_bf_state((String)in_value);` // Return state |

---

**Block 3.21** — IF-ELSE-IF [key equals "変更前料金プランコード"] (L1315-1325)

> Before-Change Pricing Plan Code item — data type String. Sets the pre-change pricing plan code value or state property. Item ID: `pplan_cd_bf`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("変更前料金プランコード")` [Before-Change Pricing Plan Code] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setPplan_cd_bf_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setPplan_cd_bf_state((String)in_value);` // Return state |

---

**Block 3.22** — IF-ELSE-IF [key equals "割引自動適用対象外フラグ"] (L1328-1338)

> Discount Auto-Apply Exclusion Flag item — data type String. Sets the flag indicating whether discounts should be excluded from automatic application. Item ID: `wrib_auto_aply_tg_gai_flg`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("割引自動適用対象外フラグ")` [Discount Auto-Apply Exclusion Flag] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setWrib_auto_aply_tg_gai_flg_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` |
| 5 | EXEC | `setWrib_auto_aply_tg_gai_flg_state((String)in_value);` // Return state |

---

**Block 3.23** — IF [key equals "外部システムコード"] (L1342-1360) [ANK-2693-00-00 ADD]

> External System Code item — data type String. This is the **last branch** of the if-chain, introduced by change request ANK-2693-00-00 (20151211). Uniquely, this branch handles **three** subkey options: `"value"` (set the external system code), `"enable"` (set the `hktgi_syscd_enabled` Boolean flag), and `"state"` (set the item state). This is the only branch with an `enable` subkey path that casts `in_value` to `Boolean` rather than `String`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `key.equals("外部システムコード")` [External System Code - ANK-2693-00-00] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | EXEC | `setSyscd_value((String)in_value);` |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` // Execute setter for hktgi_syscd_enabled when subkey is "enable" |
| 5 | EXEC | `setSyscd_enabled((Boolean)in_value);` |
| 6 | ELSE-IF | `subkey.equalsIgnoreCase("state")` // Return state when subkey is "state" |
| 7 | EXEC | `setSyscd_state((String)in_value);` |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `sysid` | Field | System ID — internal identifier for the system processing the service contract |
| `svc_kei_no` | Field | Service Contract Number — the primary identifier for a service contract line item |
| `ido_div` | Field | Transfer Classification (異動区分) — classifies the type of service contract transfer/change operation |
| `ido_rsn_cd` | Field | Transfer Reason Code (異動理由コード) — the reason code for a transfer/change, stored as a list to support multiple reason codes per contract |
| `ido_rsn_memo` | Field | Transfer Reason Memo (異動理由メモ) — free-form memo text accompanying the transfer reason |
| `op_svc_kei_no` | Field | Option Service Contract Number (オプションサービス契約番号) — identifiers for optional service add-ons, stored as a list |
| `tran_div` | Field | Processing Classification (処理区分) — distinguishes processing types (e.g., new, change, cancel) |
| `mskm_no` | Field | Application Number (申込番号) — the application/order number for a service request |
| `mskm_dtl_no` | Field | Application Detail Number (申込詳細番号) — the line-item number within an application |
| `tokutei_id_kmk_nm` | Field | Specific ID Item Name (特定ID項目名) — name of a specific identification field |
| `tokutei_id_kmk_value` | Field | Specific ID Item Value (特定ID項目値) — value of a specific identification field |
| `popup_mode` | Field | Popup Mode (ポップアップモード) — UI mode flag controlling popup window behavior |
| `ido_div_seni_ptn` | Field | Transfer Classification Screen Pattern (異動区分選択画面遷移パターン) — determines which screen pattern to navigate to based on transfer classification |
| `svc_cd` | Field | Service Code (サービスコード) — code identifying the type of service (e.g., FTTH, Mail, ENUM) |
| `prc_grp_cd` | Field | Pricing Group Code (料金グループコード) — code identifying the pricing group for the service |
| `pcrs_cd` | Field | Pricing Course Code (料金コースコード) — code identifying the pricing course/tariff |
| `pplan_cd` | Field | Pricing Plan Code (料金プランコード) — code identifying the pricing plan |
| `svc_cd_bf` | Field | Before-Change Service Code (変更前サービスコード) — the original service code before a contract modification, used for audit/change tracking |
| `prc_grp_cd_bf` | Field | Before-Change Pricing Group Code (変更前料金グループコード) — original pricing group code before modification |
| `pcrs_cd_bf` | Field | Before-Change Pricing Course Code (変更前料金コースコード) — original pricing course code before modification |
| `pplan_cd_bf` | Field | Before-Change Pricing Plan Code (変更前料金プランコード) — original pricing plan code before modification |
| `wrib_auto_aply_tg_gai_flg` | Field | Discount Auto-Apply Exclusion Flag (割引自動適用対象外フラグ) — flag indicating whether a discount should be excluded from automatic application |
| `syscd` | Field | External System Code (外部システムコード) — code identifying an external system used in service integration |
| `X33VDataTypeStringBean` | Class | A typed bean for string data items in list collections. Supports recursive `storeModelData` calls for nested model binding. |
| `X33VDataTypeLongBean` | Class | A typed bean for long/integer data items. Used in list collections where the field type is numeric. |
| `X33VDataTypeBooleanBean` | Class | A typed bean for boolean data items. Used in list collections where the field type is boolean. |
| ANK-2693-00-00 | Change Request | Change request identifier for the addition of the external system code (外部システムコード) field, dated 20151211 |
| KKA16601SF | Screen ID | Service detail change / transfer screen — the screen that uses this bean for its model data binding |
| `subkey` = `"value"` | Subkey | Indicates the sub-property is the data value to be stored in the field |
| `subkey` = `"state"` | Subkey | Indicates the sub-property is the item state metadata (e.g., modified flag, validation state) |
| `subkey` = `"enable"` | Subkey | Indicates the sub-property is an enable/disable flag (Boolean). Only valid for the external system code field. |
| `isSetAsString` | Parameter | Flag indicating whether to set a Long-type field's value property as a String type |
