# Business Logic — KKW22301SF01DBean.storeModelData() [50 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW22301SF.KKW22301SF01DBean` |
| Layer | Display Bean (DBean — View Data Layer, part of the Fujitsu Futurity X33 web framework) |
| Module | `KKW22301SF` (Package: `eo.web.webview.KKW22301SF`) |

## 1. Role

### KKW22301SF01DBean.storeModelData()

This method serves as a centralized **model data routing and binding dispatcher** for the KKW22301SF screen display bean. It receives a generic key name (in Japanese), a subkey identifying the data property, and an arbitrary object value, then routes the value to the correct strongly-typed setter method on the bean. It implements a **conditional dispatch pattern** — branching first on the business domain key ("サービス契約番号" / Service Contract Number, "システムID" / System ID, or "請求契約番号" / Billing Contract Number), then on the subkey ("value", "enable", or "state") — before casting and forwarding the value to the appropriate setter. This approach enables callers to pass heterogeneous data through a single uniform API without requiring type-specific method calls, which is a common pattern in the Futurity X33 MVC framework where view beans receive loosely-typed model data from screens or data-binding layers. The method plays a key role in the **data population phase** of the screen lifecycle, allowing the framework to populate bean fields dynamically during model load operations.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData"])
    NULL_CHECK{key or subkey is null}
    SEP["get separator index"]
    SVC_KEY{key is service contract no}
    SVC_VALUE{subkey is value}
    SVC_ENABLE{subkey is enable}
    SVC_STATE{subkey is state}
    SYS_KEY{key is system ID}
    SYS_VALUE{subkey is value}
    SYS_ENABLE{subkey is enable}
    SYS_STATE{subkey is state}
    SEIKY_KEY{key is billing contract no}
    SEIKY_VALUE{subkey is value}
    SEIKY_ENABLE{subkey is enable}
    SEIKY_STATE{subkey is state}
    END_RETURN(["Return"])

    START --> NULL_CHECK
    NULL_CHECK -->|true| END_RETURN
    NULL_CHECK -->|false| SEP
    SEP --> SVC_KEY
    SVC_KEY -->|true| SVC_VALUE
    SVC_KEY -->|false| SYS_KEY
    SYS_KEY -->|true| SYS_VALUE
    SYS_KEY -->|false| SEIKY_KEY
    SEIKY_KEY -->|true| SEIKY_VALUE
    SEIKY_KEY -->|false| END_RETURN

    SVC_VALUE -->|true| SVC_SET_VALUE["setSvc_kei_no_value"]
    SVC_VALUE -->|false| SVC_ENABLE
    SVC_ENABLE -->|true| SVC_SET_ENABLE["setSvc_kei_no_enabled"]
    SVC_ENABLE -->|false| SVC_STATE
    SVC_STATE -->|true| SVC_SET_STATE["setSvc_kei_no_state"]
    SVC_STATE -->|false| END_RETURN

    SYS_VALUE -->|true| SYS_SET_VALUE["setSysid_value"]
    SYS_VALUE -->|false| SYS_ENABLE
    SYS_ENABLE -->|true| SYS_SET_ENABLE["setSysid_enabled"]
    SYS_ENABLE -->|false| SYS_STATE
    SYS_STATE -->|true| SYS_SET_STATE["setSysid_state"]
    SYS_STATE -->|false| END_RETURN

    SEIKY_VALUE -->|true| SEIKY_SET_VALUE["setSeiky_kei_no_value"]
    SEIKY_VALUE -->|false| SEIKY_ENABLE
    SEIKY_ENABLE -->|true| SEIKY_SET_ENABLE["setSeiky_kei_no_enabled"]
    SEIKY_ENABLE -->|false| SEIKY_STATE
    SEIKY_STATE -->|true| SEIKY_SET_STATE["setSeiky_kei_no_state"]
    SEIKY_STATE -->|false| END_RETURN

    SVC_SET_VALUE --> END_RETURN
    SVC_SET_ENABLE --> END_RETURN
    SVC_SET_STATE --> END_RETURN
    SYS_SET_VALUE --> END_RETURN
    SYS_SET_ENABLE --> END_RETURN
    SYS_SET_STATE --> END_RETURN
    SEIKY_SET_VALUE --> END_RETURN
    SEIKY_SET_ENABLE --> END_RETURN
    SEIKY_SET_STATE --> END_RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The Japanese-labeled field identifier specifying which business domain to update. Valid values: "サービス契約番号" (Service Contract Number — the primary service contract line item), "システムID" (System ID — internal system identifier), or "請求契約番号" (Billing Contract Number — the billing-side contract reference). The method branches on this value to route to the correct setter group. |
| 2 | `subkey` | `String` | The property descriptor within the chosen domain, indicating which aspect of the field to set: "value" (the actual data value), "enable" (boolean editability flag), or "state" (the display/state string such as readonly, disabled, or visible). Comparison is case-insensitive via `equalsIgnoreCase`. |
| 3 | `in_value` | `Object` | The data payload to store. The actual type depends on the subkey: `String` for "value" and "state" subkeys, `Boolean` for the "enable" subkey. The method performs a cast at the call site, so the caller is responsible for passing the correct type. |
| 4 | `isSetAsString` | `boolean` | Reserved parameter (not used in the current implementation body). Based on the Javadoc, this flag indicates whether a String-type value should be set into a Long-type field's Value property. It is passed through but never evaluated in the method logic. |

**Instance fields read/written:**
- None directly read; this method exclusively invokes setter methods on instance fields (no reads of bean fields occur).
- Instance fields **written** via setter calls: `svc_kei_no_value`, `svc_kei_no_enabled`, `svc_kei_no_state`, `sysid_value`, `sysid_enabled`, `sysid_state`, `seiky_kei_no_value`, `seiky_kei_no_enabled`, `seiky_kei_no_state`.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `KKW22301SF01DBean.setSvc_kei_no_value` | - | - | Sets the service contract number value (String) on the display bean |
| U | `KKW22301SF01DBean.setSvc_kei_no_enabled` | - | - | Sets the editability flag for the service contract number field |
| U | `KKW22301SF01DBean.setSvc_kei_no_state` | - | - | Sets the display state (e.g., readonly/disabled) for the service contract number field |
| U | `KKW22301SF01DBean.setSysid_value` | - | - | Sets the system ID value (String) on the display bean |
| U | `KKW22301SF01DBean.setSysid_enabled` | - | - | Sets the editability flag for the system ID field |
| U | `KKW22301SF01DBean.setSysid_state` | - | - | Sets the display state for the system ID field |
| U | `KKW22301SF01DBean.setSeiky_kei_no_value` | - | - | Sets the billing contract number value (String) on the display bean |
| U | `KKW22301SF01DBean.setSeiky_kei_no_enabled` | - | - | Sets the editability flag for the billing contract number field |
| U | `KKW22301SF01DBean.setSeiky_kei_no_state` | - | - | Sets the display state for the billing contract number field |

All operations are **Update (U)** — this method only writes values to the display bean's fields. It performs no database operations, no entity reads, and no service component calls. It is a pure in-memory data population utility.

## 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: `setSeiky_kei_no_state` [-], `setSeiky_kei_no_enabled` [-], `setSeiky_kei_no_value` [-], `setSysid_state` [-], `setSysid_enabled` [-], `setSysid_value` [-], `setSvc_kei_no_state` [-], `setSvc_kei_no_enabled` [-], `setSvc_kei_no_value` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `KKW22301SF01DBean.storeModelData()` (internal overload) | `KKW22301SF01DBean.storeModelData` -> `KKW22301SF01DBean.storeModelData` | setter methods [U] in-memory fields |
| 2 | `KKW22301SF01DBean.storeModelData()` (internal overload) | `KKW22301SF01DBean.storeModelData` -> `KKW22301SF01DBean.storeModelData` | setter methods [U] in-memory fields |

This method has no external screen/batch entry points. It is called internally from overloaded versions of itself within the same class, meaning it serves as the **shared dispatch core** for the screen's model data population logic. The terminal operations are all in-memory setter calls — no SC, CBS, or database interaction occurs.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null guard) `(key == null || subkey == null)` (L270-271)

Early exit guard: if either the field key or subkey is null, processing is aborted immediately.

> (Japanese comment: key,subkeyがnullの場合、処理を中止 — "If key or subkey is null, abort processing")

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` // Computes separator index [L273] |
| 2 | RETURN | `return;` // Early exit when key or subkey is null [L271] |

Note: `separaterPoint` is computed but never used in the current implementation. It is dead code (likely a remnant of a future or removed branch on keyed sub-fields like "key/subkey" format).

**Block 2** — IF (first key branch) `(key.equals("サービス契約番号"))` (L277)

> (Japanese comment: データタイプがStringの項目"サービス契約番号"(項目ID:svc_kei_no) — "Data type is String field 'Service Contract Number' (field ID: svc_kei_no)")

This branch handles the **Service Contract Number** domain. It dispatches on the subkey.

**Block 2.1** — IF-ELSE-IF (subkey dispatch) `(subkey.equalsIgnoreCase("value"|"enable"|"state"))` (L278-291)

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` [L278] |
| 2 | CALL | `setSvc_kei_no_value((String)in_value)` // Casts Object to String, sets service contract number value [L279] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` [L281] |
| 4 | EXEC | `setSvc_kei_no_enabled((Boolean)in_value)` // Casts Object to Boolean, sets editability flag [L282] |
| 5 | ELSE-IF | `subkey.equalsIgnoreCase("state")` [L284] |
| 6 | EXEC | `setSvc_kei_no_state((String)in_value)` // Casts Object to String, sets display state [L285] |

> (Japanese comments: subkeyが"enable"の場合、svc_kei_no_enabledのsetterを実行する — "When subkey is 'enable', execute the svc_kei_no_enabled setter"; subkeyが"state"の場合、ステータスを返す — "When subkey is 'state', set the status")

**Block 3** — ELSE-IF (second key branch) `(key.equals("システムID"))` (L295)

> (Japanese comment: データタイプがStringの項目"システムID"(項目ID:sysid) — "Data type is String field 'System ID' (field ID: sysid)")

This branch handles the **System ID** domain. It dispatches on the subkey using the same pattern as Block 2.

**Block 3.1** — IF-ELSE-IF (subkey dispatch) `(subkey.equalsIgnoreCase("value"|"enable"|"state"))` (L296-309)

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` [L297] |
| 2 | CALL | `setSysid_value((String)in_value)` // Casts Object to String, sets system ID value [L298] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` [L300] |
| 4 | EXEC | `setSysid_enabled((Boolean)in_value)` // Casts Object to Boolean, sets editability flag [L301] |
| 5 | ELSE-IF | `subkey.equalsIgnoreCase("state")` [L303] |
| 6 | EXEC | `setSysid_state((String)in_value)` // Casts Object to String, sets display state [L304] |

> (Japanese comments: subkeyが"enable"の場合、sysid_enabledのsetterを実行する — "When subkey is 'enable', execute the sysid_enabled setter"; subkeyが"state"の場合、ステータスを返す — "When subkey is 'state', set the status")

**Block 4** — ELSE-IF (third key branch) `(key.equals("請求契約番号"))` (L313)

> (Japanese comment: データタイプがStringの項目"請求契約番号"(項目ID:seiky_kei_no) — "Data type is String field 'Billing Contract Number' (field ID: seiky_kei_no)")

This branch handles the **Billing Contract Number** domain. It dispatches on the subkey using the same pattern as Blocks 2 and 3.

**Block 4.1** — IF-ELSE-IF (subkey dispatch) `(subkey.equalsIgnoreCase("value"|"enable"|"state"))` (L314-327)

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` [L315] |
| 2 | CALL | `setSeiky_kei_no_value((String)in_value)` // Casts Object to String, sets billing contract number value [L316] |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` [L318] |
| 4 | EXEC | `setSeiky_kei_no_enabled((Boolean)in_value)` // Casts Object to Boolean, sets editability flag [L319] |
| 5 | ELSE-IF | `subkey.equalsIgnoreCase("state")` [L321] |
| 6 | EXEC | `setSeiky_kei_no_state((String)in_value)` // Casts Object to String, sets display state [L322] |

> (Japanese comments: subkeyが"enable"の場合、seiky_kei_no_enabledのsetterを実行する — "When subkey is 'enable', execute the seiky_kei_no_enabled setter"; subkeyが"state"の場合、ステータスを返す — "When subkey is 'state', set the status")

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the primary contract identifier for a service line item in the telecom order system |
| `svc_kei_no_value` | Field | The actual string value of the service contract number |
| `svc_kei_no_enabled` | Field | Boolean editability flag — determines whether the service contract number field is user-editable in the UI |
| `svc_kei_no_state` | Field | Display state string — describes the UI state (e.g., readonly, disabled, visible) of the service contract number field |
| `sysid` | Field | System ID — the internal system identifier used for tracking and routing within the K-Opticom platform |
| `sysid_value` | Field | The actual string value of the system ID |
| `sysid_enabled` | Field | Boolean editability flag for the system ID field |
| `sysid_state` | Field | Display state string for the system ID field |
| `seiky_kei_no` | Field | Billing contract number — the contract identifier associated with the billing side of a service contract |
| `seiky_kei_no_value` | Field | The actual string value of the billing contract number |
| `seiky_kei_no_enabled` | Field | Boolean editability flag for the billing contract number field |
| `seiky_kei_no_state` | Field | Display state string for the billing contract number field |
| "サービス契約番号" | Field Label | Japanese UI label for "Service Contract Number" — the human-readable field name shown on screens |
| "システムID" | Field Label | Japanese UI label for "System ID" — the human-readable field name shown on screens |
| "請求契約番号" | Field Label | Japanese UI label for "Billing Contract Number" — the human-readable field name shown on screens |
| DBean | Acronym | Display Bean — a view-layer data holder in the Futurity X33 framework that holds screen state and UI properties |
| X33VViewBaseBean | Class | Base class from Fujitsu Futurity X33 framework providing view bean infrastructure (data binding, model loading) |
| X33VDataTypeBeanInterface | Interface | Marker interface from Futurity X33 indicating the bean supports typed data fields (String, Boolean, Long) |
| Futurity X33 | Framework | Fujitsu's enterprise web application framework for building MVC-based Java web applications in the K-Opticom platform |
| key | Parameter | The business domain identifier (Japanese field label) used to route data to the correct setter group |
| subkey | Parameter | The property descriptor within a domain — specifies which aspect (value, enable, state) of the field to update |
| in_value | Parameter | The generic object payload to be cast and stored in the target bean field |
| isSetAsString | Parameter | Boolean flag (unused in current body) indicating whether to set a String value into a Long-type field's Value property |
