# Business Logic — KKW00810SF03DBean.storeModelData() [71 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00810SF.KKW00810SF03DBean` |
| Layer | UI Bean / Data Binding Component (package: `eo.web.webview`) |
| Module | `KKW00810SF` (Package: `eo.web.webview.KKW00810SF`) |

## 1. Role

### KKW00810SF03DBean.storeModelData()

This method acts as a **centralized property-routing dispatcher** for telecom service contract data within the KKW00810SF screen module. It receives a human-readable Japanese display key (e.g., "サービス契約ステータス" — Service Contract Status) and a subkey ("value" or "state"), then routes the incoming data to the appropriate strongly-typed setter on the bean. This is a classic **bridge between a dynamic UI model layer and the static bean property model** — allowing upstream code to set bean properties by display-label string rather than by direct method invocation.

The method handles **six distinct data categories**, each corresponding to a property pair (value + state) on the bean: Service Contract Status, Service Code, Price Group Code, Price Course Code, Price Plan Code, and Service Start Date. For each category, it dispatches the value to either a `*_value` setter (when subkey is "value") or a `*_state` setter (when subkey is "state"), using case-insensitive comparison on the subkey.

The method implements a **dispatch/routing design pattern** — the `key` parameter selects the data category, and the `subkey` selects whether to store the actual value or the associated state flag. It is a shared utility method on the UI bean, used by screen controllers or model loaders that populate the bean from dynamic data sources. Note that the `isSetAsString` parameter is defined in the signature but not referenced in the method body, suggesting it is reserved for future extensibility (e.g., long-type fields that need string coercion).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData(key, subkey, in_value, isSetAsString)"])

    START --> CHECK_NULL{key or subkey is null?}
    CHECK_NULL -->|yes| EARLY_RETURN(["return"])
    CHECK_NULL -->|no| COMPUTE_SEP[separaterPoint = key.indexOf/]

    COMPUTE_SEP --> KEY_1{"key equals
サービス契約ステータス?"}
    KEY_1 -->|true| SUBKEY_1{subkey equals value?}
    SUBKEY_1 -->|true| SET_SKS_VAL[setSvc_kei_stat_value]
    SUBKEY_1 -->|false| SET_SKS_ST[setSvc_kei_stat_state]

    KEY_1 -->|false| KEY_2{"key equals
サービスコード?"}
    KEY_2 -->|true| SUBKEY_2{subkey equals value?}
    SUBKEY_2 -->|true| SET_SC_VAL[setSvc_cd_value]
    SUBKEY_2 -->|false| SET_SC_ST[setSvc_cd_state]

    KEY_2 -->|false| KEY_3{"key equals
料金グループコード?"}
    KEY_3 -->|true| SUBKEY_3{subkey equals value?}
    SUBKEY_3 -->|true| SET_PGC_VAL[setPrc_grp_cd_value]
    SUBKEY_3 -->|false| SET_PGC_ST[setPrc_grp_cd_state]

    KEY_3 -->|false| KEY_4{"key equals
料金コースコード?"}
    KEY_4 -->|true| SUBKEY_4{subkey equals value?}
    SUBKEY_4 -->|true| SET_PCS_VAL[setPcrs_cd_value]
    SUBKEY_4 -->|false| SET_PCS_ST[setPcrs_cd_state]

    KEY_4 -->|false| KEY_5{"key equals
料金プランコード?"}
    KEY_5 -->|true| SUBKEY_5{subkey equals value?}
    SUBKEY_5 -->|true| SET_PRN_VAL[setPplan_cd_value]
    SUBKEY_5 -->|false| SET_PRN_ST[setPplan_cd_state]

    KEY_5 -->|false| KEY_6{"key equals
サービス開始年月日?"}
    KEY_6 -->|true| SUBKEY_6{subkey equals value?}
    SUBKEY_6 -->|true| SET_SSY_VAL[setSvc_sta_ymd_value]
    SUBKEY_6 -->|false| SET_SSY_ST[setSvc_sta_ymd_state]

    KEY_6 -->|false| NO_MATCH["no matching key - no-op"]

    SET_SKS_VAL --> END_NODE(["return / Next"])
    SET_SKS_ST --> END_NODE
    SET_SC_VAL --> END_NODE
    SET_SC_ST --> END_NODE
    SET_PGC_VAL --> END_NODE
    SET_PGC_ST --> END_NODE
    SET_PCS_VAL --> END_NODE
    SET_PCS_ST --> END_NODE
    SET_PRN_VAL --> END_NODE
    SET_PRN_ST --> END_NODE
    SET_SSY_VAL --> END_NODE
    SET_SSY_ST --> END_NODE
    NO_MATCH --> END_NODE
    EARLY_RETURN --> END_NODE
```

**CRITICAL — Constant Resolution:**
All branch conditions use **literal Japanese strings** rather than constant references. The resolved values are:

| Constant Equivalent | Resolved Value | Business Meaning |
|--------------------|----------------|------------------|
| `key` condition 1 | `"サービス契約ステータス"` | Service Contract Status |
| `key` condition 2 | `"サービスコード"` | Service Code |
| `key` condition 3 | `"料金グループコード"` | Price Group Code |
| `key` condition 4 | `"料金コースコード"` | Price Course Code |
| `key` condition 5 | `"料金プランコード"` | Price Plan Code |
| `key` condition 6 | `"サービス開始年月日"` | Service Start Date |

Subkey dispatch uses case-insensitive comparison against the literal string `"value"` (or `"state"` as the alternative).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The Japanese display label of the field to populate. Determines which of the 6 property groups (Service Contract Status, Service Code, Price Group Code, Price Course Code, Price Plan Code, Service Start Date) the data belongs to. |
| 2 | `subkey` | `String` | The property selector within a key group. Typically `"value"` to set the actual field value, or `"state"` to set the associated state/status flag. Case-insensitive comparison is used. |
| 3 | `in_value` | `Object` | The data value to store. Cast to `String` before passing to the target setter. Represents the actual business data (e.g., a service code string, a status flag, a date string). |
| 4 | `isSetAsString` | `boolean` | Reserved parameter. Javadoc states: when true, indicates that a String-type value is being set for a Long-type field's Value property. Not currently used in the method body. |

**Instance fields written by this method:**

| Field | Setter Called | Data Category |
|-------|--------------|---------------|
| `svc_kei_stat_value` | `setSvc_kei_stat_value` | Service Contract Status Value |
| `svc_kei_stat_state` | `setSvc_kei_stat_state` | Service Contract Status State |
| `svc_cd_value` | `setSvc_cd_value` | Service Code Value |
| `svc_cd_state` | `setSvc_cd_state` | Service Code State |
| `prc_grp_cd_value` | `setPrc_grp_cd_value` | Price Group Code Value |
| `prc_grp_cd_state` | `setPrc_grp_cd_state` | Price Group Code State |
| `pcrs_cd_value` | `setPcrs_cd_value` | Price Course Code Value |
| `pcrs_cd_state` | `setPcrs_cd_state` | Price Course Code State |
| `pplan_cd_value` | `setPplan_cd_value` | Price Plan Code Value |
| `pplan_cd_state` | `setPplan_cd_state` | Price Plan Code State |
| `svc_sta_ymd_value` | `setSvc_sta_ymd_value` | Service Start Date Value |
| `svc_sta_ymd_state` | `setSvc_sta_ymd_state` | Service Start Date State |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `KKW00810SF03DBean.setSvc_kei_stat_value` | KKW00810SF03DBean | - | Sets the service contract status value field |
| U | `KKW00810SF03DBean.setSvc_kei_stat_state` | KKW00810SF03DBean | - | Sets the service contract status state flag field |
| U | `KKW00810SF03DBean.setSvc_cd_value` | KKW00810SF03DBean | - | Sets the service code value field |
| U | `KKW00810SF03DBean.setSvc_cd_state` | KKW00810SF03DBean | - | Sets the service code state flag field |
| U | `KKW00810SF03DBean.setPrc_grp_cd_value` | KKW00810SF03DBean | - | Sets the price group code value field |
| U | `KKW00810SF03DBean.setPrc_grp_cd_state` | KKW00810SF03DBean | - | Sets the price group code state flag field |
| U | `KKW00810SF03DBean.setPcrs_cd_value` | KKW00810SF03DBean | - | Sets the price course code value field |
| U | `KKW00810SF03DBean.setPcrs_cd_state` | KKW00810SF03DBean | - | Sets the price course code state flag field |
| U | `KKW00810SF03DBean.setPplan_cd_value` | KKW00810SF03DBean | - | Sets the price plan code value field |
| U | `KKW00810SF03DBean.setPplan_cd_state` | KKW00810SF03DBean | - | Sets the price plan code state flag field |
| U | `KKW00810SF03DBean.setSvc_sta_ymd_value` | KKW00810SF03DBean | - | Sets the service start date value field |
| U | `KKW00810SF03DBean.setSvc_sta_ymd_state` | KKW00810SF03DBean | - | Sets the service start date state flag field |

**Classification rationale:** All 12 called methods are **setter operations (U — Update)** on the bean's own instance fields. No external SC (Service Component) or CBS (Common Business Service) calls are made. No database reads or writes occur directly in this method — it is purely a data-routing and assignment layer.

## 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: `setSvc_sta_ymd_state` [-], `setSvc_sta_ymd_value` [-], `setPplan_cd_state` [-], `setPplan_cd_value` [-], `setPcrs_cd_state` [-], `setPcrs_cd_value` [-], `setPrc_grp_cd_state` [-], `setPrc_grp_cd_value` [-], `setSvc_cd_state` [-], `setSvc_cd_value` [-], `setSvc_kei_stat_state` [-], `setSvc_kei_stat_value` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `KKW00810SF03DBean` | Same-class call — self-referencing or intra-bean dispatch | `setSvc_kei_stat_value/setState` [U] bean field |
| 2 | `KKW00810SF03DBean` | Same-class call — self-referencing or intra-bean dispatch | `setSvc_cd_value/setState` [U] bean field |

**Notes:** This method is called from within the same bean class (2 direct callers). No screen entry points (KKSV*) or batch entry points were found within 8 hops. It serves as an internal bean helper — likely invoked by the screen controller or a model-loading routine that iterates over field definitions using the Japanese display key strings as lookups.

## 6. Per-Branch Detail Blocks

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

> Early-exit guard. If either the key or subkey parameter is null, processing stops immediately.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `key == null || subkey == null` — null-check guard clause |
| 2 | RETURN | `return;` // Terminate processing when key or subkey is null |

**Block 2** — [EXEC] Compute separator position (L350)

> Determines the index of "/" within the key string. Note: this value is stored but never used in the current implementation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` // Computes position of "/" separator in key |

**Block 3** — [IF/ELSE-IF chain: key dispatch] (L352)

> Routes processing based on the Japanese display key string. Each branch handles one data category. The subkey sub-branch selects between "value" and "state" property.

**Block 3.1** — [IF] `(key.equals("サービス契約ステータス"))` Service Contract Status (L354)

> Dispatches data for the Service Contract Status field (フィールドID: svc_kei_stat).

| # | Type | Code |
|---|------|------|
| 1 | IF | `key.equals("サービス契約ステータス")` — matches Service Contract Status key |
| 2 | IF | `subkey.equalsIgnoreCase("value")` — checks for value subkey [-> "value"] |
| 3 | EXEC | `setSvc_kei_stat_value((String)in_value)` // Sets the service contract status value |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — checks for state subkey [-> "state"] |
| 5 | EXEC | `setSvc_kei_stat_state((String)in_value)` // Sets the service contract status state flag |

**Block 3.2** — [ELSE-IF] `(key.equals("サービスコード"))` Service Code (L363)

> Dispatches data for the Service Code field (フィールドID: svc_cd).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("サービスコード")` — matches Service Code key |
| 2 | IF | `subkey.equalsIgnoreCase("value")` — checks for value subkey |
| 3 | EXEC | `setSvc_cd_value((String)in_value)` // Sets the service code value |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — checks for state subkey |
| 5 | EXEC | `setSvc_cd_state((String)in_value)` // Sets the service code state flag |

**Block 3.3** — [ELSE-IF] `(key.equals("料金グループコード"))` Price Group Code (L372)

> Dispatches data for the Price Group Code field (フィールドID: prc_grp_cd).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("料金グループコード")` — matches Price Group Code key |
| 2 | IF | `subkey.equalsIgnoreCase("value")` — checks for value subkey |
| 3 | EXEC | `setPrc_grp_cd_value((String)in_value)` // Sets the price group code value |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — checks for state subkey |
| 5 | EXEC | `setPrc_grp_cd_state((String)in_value)` // Sets the price group code state flag |

**Block 3.4** — [ELSE-IF] `(key.equals("料金コースコード"))` Price Course Code (L381)

> Dispatches data for the Price Course Code field (フィールドID: pcrs_cd).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("料金コースコード")` — matches Price Course Code key |
| 2 | IF | `subkey.equalsIgnoreCase("value")` — checks for value subkey |
| 3 | EXEC | `setPcrs_cd_value((String)in_value)` // Sets the price course code value |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — checks for state subkey |
| 5 | EXEC | `setPcrs_cd_state((String)in_value)` // Sets the price course code state flag |

**Block 3.5** — [ELSE-IF] `(key.equals("料金プランコード"))` Price Plan Code (L390)

> Dispatches data for the Price Plan Code field (フィールドID: pplan_cd).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("料金プランコード")` — matches Price Plan Code key |
| 2 | IF | `subkey.equalsIgnoreCase("value")` — checks for value subkey |
| 3 | EXEC | `setPplan_cd_value((String)in_value)` // Sets the price plan code value |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — checks for state subkey |
| 5 | EXEC | `setPplan_cd_state((String)in_value)` // Sets the price plan code state flag |

**Block 3.6** — [ELSE-IF] `(key.equals("サービス開始年月日"))` Service Start Date (L399)

> Dispatches data for the Service Start Date field (フィールドID: svc_sta_ymd).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("サービス開始年月日")` — matches Service Start Date key |
| 2 | IF | `subkey.equalsIgnoreCase("value")` — checks for value subkey |
| 3 | EXEC | `setSvc_sta_ymd_value((String)in_value)` // Sets the service start date value |
| 4 | ELSE-IF | `subkey.equalsIgnoreCase("state")` — checks for state subkey |
| 5 | EXEC | `setSvc_sta_ymd_state((String)in_value)` // Sets the service start date state flag |

**Block 4** — [END] Implicit no-op for unmatched keys (L408)

> If the key does not match any of the 6 known categories, the method completes without performing any action. No exception is thrown and no error is logged — unmatched keys are silently ignored.

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_stat` | Field | Service Contract Status — the operational state of a service contract (e.g., active, suspended, canceled). Internal tracking status flag. |
| `svc_cd` | Field | Service Code — identifies the type of telecom service (e.g., FTTH, Mail, ENUM). Product-level classification code. |
| `prc_grp_cd` | Field | Price Group Code — groups services into pricing tiers or bundles. Used for rate plan association. |
| `pcrs_cd` | Field | Price Course Code — specific pricing course/plan identifier within a price group. Determines customer billing rates. |
| `pplan_cd` | Field | Price Plan Code — the full pricing plan identifier. Encompasses price group and course for complete rate definition. |
| `svc_sta_ymd` | Field | Service Start Date — the date when the service begins (year-month-day format: YYYYMMDD). |
| `*_value` | Field suffix | Stores the actual data value for a property (e.g., the service code string, the date string). |
| `*_state` | Field suffix | Stores the state/status flag associated with a property (e.g., whether the data has been modified, is locked, or requires attention). |
| `*_update` | Field suffix | Tracks update/change state for a property (defined in bean, used by other methods). |
| サービス契約ステータス | Japanese label | Service Contract Status — display label for the svc_kei_stat property group. |
| サービスコード | Japanese label | Service Code — display label for the svc_cd property group. |
| 料金グループコード | Japanese label | Price Group Code — display label for the prc_grp_cd property group. |
| 料金コースコード | Japanese label | Price Course Code — display label for the pcrs_cd property group. |
| 料金プランコード | Japanese label | Price Plan Code — display label for the pplan_cd property group. |
| サービス開始年月日 | Japanese label | Service Start Date — display label for the svc_sta_ymd property group. |
| KKW00810SF | Module | Screen module identifier. Web client screen for telecom service contract management. |
| DBean | Type suffix | Data Bean — UI-layer bean that holds screen data for binding to the presentation tier (Futurity X33 framework). |
| X33VDataTypeBeanInterface | Framework interface | Fujitsu Futurity X33 framework interface for typed data binding beans. |
| X33VListedBeanInterface | Framework interface | Fujitsu Futurity X33 framework interface for list/data-bound bean behavior. |
| isSetAsString | Parameter | Reserved parameter for future Long-to-String type coercion on specific field types. Not active in current implementation. |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom. |
| ENUM | Business term | Electronic Universal Number — telecom numbering service allowing callers to reach a contact regardless of location. |
