# Business Logic — FUW00928SF01DBean.storeModelData() [37 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00928SF.FUW00928SF01DBean` |
| Layer | View / Data-Bound Bean (Web UI model layer) |
| Module | `FUW00928SF` (Package: `eo.web.webview.FUW00928SF`) |

## 1. Role

### FUW00928SF01DBean.storeModelData()

This method serves as a **unified property-routing dispatcher** within the `FUW00928SF` screen's data-bound bean (`DBean`). It accepts a field key and a sub-key (such as "value", "enable", or "state") and routes the incoming data to the correct typed setter on the bean instance. The two supported top-level item groups are **"通信事業者コード" (Telecom Provider Code)** and **"通信事業者名" (Telecom Provider Name)**, each exposing three property dimensions: `value` (the actual data), `enable` (a boolean flag controlling input-field editability), and `state` (a string representation of the field's UI state, e.g., read-only or active). This follows the **strategy/dispatch pattern** where a single entry point resolves at runtime which domain property to populate, enabling the calling screen code to write generic UI-binding loops without hard-coding setter calls per field. Its role in the larger system is to act as a **shared model-synchronization utility** — the view layer can iterate over a map of item-name/key pairs and their associated sub-values, calling `storeModelData` once per entry to hydrate the bean in a single pass.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData key, subkey, in_value, isSetAsString"])
    COND_NULL["key == null or subkey == null"]
    RETURN_EARLY(["return / null; exit"])
    SEPARATOR["int separaterPoint = key.indexOf('/']"]
    COND_TSJGS_CD["key equals '通信事業者コード'"]
    SUBVALUE["subkey == 'value'"]
    SET_VALUE_cd["setTsjgs_cd_value"]
    SUBENABLE["subkey == 'enable'"]
    SET_ENABLE_cd["setTsjgs_cd_enabled"]
    SUBSTATE["subkey == 'state'"]
    SET_STATE_cd["setTsjgs_cd_state"]
    COND_TSJGS_NM["key equals '通信事業者名'"]
    SET_VALUE_nm["setTsjgs_nm_value"]
    SET_ENABLE_nm["setTsjgs_nm_enabled"]
    SET_STATE_nm["setTsjgs_nm_state"]
    END_NODE(["Return / Next"])

    START --> COND_NULL
    COND_NULL -->|true| RETURN_EARLY
    COND_NULL -->|false| SEPARATOR
    SEPARATOR --> COND_TSJGS_CD
    COND_TSJGS_CD -->|true| SUBVALUE
    COND_TSJGS_CD -->|false| COND_TSJGS_NM
    SUBVALUE --> SET_VALUE_cd
    SET_VALUE_cd --> END_NODE
    SUBENABLE --> SET_ENABLE_cd
    SET_ENABLE_cd --> END_NODE
    SUBSTATE --> SET_STATE_cd
    SET_STATE_cd --> END_NODE
    COND_TSJGS_NM -->|true| SET_VALUE_nm
    COND_TSJGS_NM -->|false| END_NODE
    SET_VALUE_nm --> END_NODE
    SET_ENABLE_nm --> END_NODE
    SET_STATE_nm --> END_NODE
```

**CRITICAL — Constant Resolution:**
No external constant classes are referenced in this method. The key literals are hard-coded Japanese strings:
- `"通信事業者コード"` — the item-ID for "Telecom Provider Code" (property prefix `tsjgs_cd`)
- `"通信事業者名"` — the item-ID for "Telecom Provider Name" (property prefix `tsjgs_nm`)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | **Field name (item-ID)** — identifies which business property group to update. Valid values are `"通信事業者コード"` (Telecom Provider Code, mapping to `tsjgs_cd` properties) or `"通信事業者名"` (Telecom Provider Name, mapping to `tsjgs_nm` properties). Used as the primary routing discriminator. |
| 2 | `subkey` | `String` | **Property sub-key** — specifies which dimension of the property to set. Must be `"value"` (for the actual data), `"enable"` (for editability flag), or `"state"` (for UI state string). Comparison is case-insensitive (`equalsIgnoreCase`). |
| 3 | `in_value` | `Object` | **Incoming data value** — the value to store. Type depends on `subkey`: `String` for `value`/`state`, `Boolean` for `enable`. Cast at assignment time. |
| 4 | `isSetAsString` | `boolean` | **String-type flag** — per the Javadoc, `true` indicates that a String value is being set into a Long-type item's Value property. **Note:** This parameter is declared but **never used** in the method body — the entire branch logic, it has no effect on execution. |

**Instance fields read:** None. The method only writes to instance fields via setters.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `FUW00928SF01DBean.setTsjgs_cd_value` | FUW00928SF01DBean | - | Sets the telecom provider code string value on the bean |
| U | `FUW00928SF01DBean.setTsjgs_cd_enabled` | FUW00928SF01DBean | - | Sets the editability boolean flag for the telecom provider code field |
| U | `FUW00928SF01DBean.setTsjgs_cd_state` | FUW00928SF01DBean | - | Sets the UI state string for the telecom provider code field |
| U | `FUW00928SF01DBean.setTsjgs_nm_value` | FUW00928SF01DBean | - | Sets the telecom provider name string value on the bean |
| U | `FUW00928SF01DBean.setTsjgs_nm_enabled` | FUW00928SF01DBean | - | Sets the editability boolean flag for the telecom provider name field |
| U | `FUW00928SF01DBean.setTsjgs_nm_state` | FUW00928SF01DBean | - | Sets the UI state string for the telecom provider name field |

**Classification rationale:** All called methods are setter methods (`set*`) on the bean itself. These are **Update (U)** operations in the CRUD sense — they mutate in-memory model state but do not touch any database or external service component.

## 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: `setTsjgs_nm_state` [-], `setTsjgs_nm_enabled` [-], `setTsjgs_nm_value` [-], `setTsjgs_cd_state` [-], `setTsjgs_cd_enabled` [-], `setTsjgs_cd_value` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW00928SF01DBean.storeModelData(String key, String subkey, Object in_value)` (self-reference) | `storeModelData(String, String, Object, boolean)` | `setTsjgs_cd_value [U] -` |
| 2 | `FUW00928SF01DBean.storeModelData(String key, String subkey, Object in_value)` (self-reference) | `storeModelData(String, String, Object, boolean)` | `setTsjgs_nm_enabled [U] -` |

**Note:** Both direct callers are overloaded variants of `storeModelData` within the same class (`FUW00928SF01DBean`). These overloads likely wrap the full 4-parameter version with defaults, acting as convenience entry points.

## 6. Per-Branch Detail Blocks

### Block 1 — IF (null guard) (L217)

> Guard clause: if either `key` or `subkey` is null, exit immediately. No processing occurs. This is an early-return pattern preventing `NullPointerException` downstream.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key == null \|\| subkey == null` |
| 2 | RETURN | `return;` // 項目名とサブキーがnullの場合、処理を中止 — Exit if field name and sub-key are null |

### Block 2 — PROCESS (separator computation) (L221)

> Computes the index of the first "/" character in `key`. Note: the result is stored in `separaterPoint` but never used in this method (dead code or future extension point).

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/")` |

### Block 3 — IF / ELSE-IF / ELSE (primary key routing — 通信事業者コード) (L224)

> Routes property setting based on the key being `"通信事業者コード"` (Telecom Provider Code). This is the `tsjgs_cd` property group, handling the telecom provider's system code.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("通信事業者コード")` // 項目ごとに処理を入れる — Insert processing per item |
| 2 | EXEC | Nested subkey dispatch (Block 3.1 – 3.3) |

#### Block 3.1 — ELSE-IF (subkey = "value") (L225)

> Sets the actual telecom provider code value as a String on the bean.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("value")` |
| 2 | CALL | `setTsjgs_cd_value((String)in_value);` // Cast in_value to String |

#### Block 3.2 — ELSE-IF (subkey = "enable") (L227)

> Sets the editability flag for the telecom provider code field. When true, the field is editable in the UI; when false, it is read-only. Comment: subkeyが"enable"の場合、tsjgs_cd_enabledのsetterを実行する — If subkey is "enable", execute the tsjgs_cd_enabled setter.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("enable")` |
| 2 | CALL | `setTsjgs_cd_enabled((Boolean)in_value);` // Cast in_value to Boolean |

#### Block 3.3 — ELSE-IF (subkey = "state") (L229)

> Sets the UI state string for the telecom provider code field. Comment: subkeyが"state"の場合、ステータスを返す — If subkey is "state", return the status.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("state")` |
| 2 | CALL | `setTsjgs_cd_state((String)in_value);` // Cast in_value to String |

### Block 4 — ELSE-IF (primary key routing — 通信事業者名) (L233)

> Routes property setting based on the key being `"通信事業者名"` (Telecom Provider Name). This is the `tsjgs_nm` property group, handling the telecom provider's display name.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("通信事業者名")` // データタイプがStringの項目"通信事業者名" — Item whose data type is String "Telecom Provider Name" |
| 2 | EXEC | Nested subkey dispatch (Block 4.1 – 4.3) |

#### Block 4.1 — ELSE-IF (subkey = "value") (L234)

> Sets the actual telecom provider name value as a String on the bean.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("value")` |
| 2 | CALL | `setTsjgs_nm_value((String)in_value);` // Cast in_value to String |

#### Block 4.2 — ELSE-IF (subkey = "enable") (L236)

> Sets the editability flag for the telecom provider name field. Comment: subkeyが"enable"の場合、tsjgs_nm_enabledのsetterを実行する — If subkey is "enable", execute the tsjgs_nm_enabled setter.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("enable")` |
| 2 | CALL | `setTsjgs_nm_enabled((Boolean)in_value);` // Cast in_value to Boolean |

#### Block 4.3 — ELSE-IF (subkey = "state") (L238)

> Sets the UI state string for the telecom provider name field. Comment: subkeyが"state"の場合、ステータスを返す — If subkey is "state", return the status.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("state")` |
| 2 | CALL | `setTsjgs_nm_state((String)in_value);` // Cast in_value to String |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `通信事業者コード` | Field (key) | Telecom Provider Code — the system-level identifier for a telecommunications service provider |
| `通信事業者名` | Field (key) | Telecom Provider Name — the human-readable display name of a telecommunications service provider |
| `tsjgs_cd` | Field prefix | Short for 通信事業者コード (Telecom Provider Code) — the property group name used internally in the bean for the code-related fields |
| `tsjgs_nm` | Field prefix | Short for 通信事業者名 (Telecom Provider Name) — the property group name used internally in the bean for the name-related fields |
| `value` | Sub-key | The actual data value of a field (String type) |
| `enable` | Sub-key | Boolean flag controlling whether a UI input field is editable (`true`) or read-only (`false`) |
| `state` | Sub-key | String representing the UI state of a field (e.g., "readonly", "active", "disabled") |
| `DBean` | Technical term | Data-Bound Bean — a JavaBean that holds UI model data for a JSP/screen, providing getters/setters for form fields |
| `in_value` | Field | Incoming data object — the value being routed to a setter, typed as Object to support String and Boolean values |
| `isSetAsString` | Field | Flag indicating whether a String value is being assigned to a Long-type property; unused in this method |
| SE | Technical term | Service Element — a business domain term used in K-Opticom's telecom ordering system |
| FTTH | Business term | Fiber To The Home — a broadband network technology providing internet connectivity via fiber-optic cables |
