# Business Logic — CRW03407SF03DBean.storeModelData() [83 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW03407SF.CRW03407SF03DBean` |
| Layer | Controller / Web Component (Package: `eo.web.webview.CRW03407SF`) |
| Module | `CRW03407SF` (Package: `eo.web.webview.CRW03407SF`) |

## 1. Role

### CRW03407SF03DBean.storeModelData()

This method is a **field-level data binder** that populates the model object with values received from the presentation layer. It implements a **dispatch/routing pattern** based on a composite key (field name) and a subkey (property attribute), routing the incoming value to the appropriate strongly-typed setter on the DTO bean.

In business terms, the method handles **six string-typed display fields** for a campaign/service detail screen: **Detail Index** (明細インデックス), **Campaign Code** (キャンペーンコード), **Campaign Name** (キャンペーン名), **Application Month** (適用月), **Row Style Class** (行スタイルクラス), and **Row Style ID** (行スタイルID). Each field supports three attributes: `value` (the actual data), `enable` (whether the field is editable), and `state` (the UI state, such as displayed/hidden or disabled).

The method serves as a **shared utility** called by the screen controller (CRW03407SF03DBean's no-arg overload) to bulk-load model data from a flat key-value representation into the structured DTO. It is a **Write (U)** operation on the presentation-layer model — it mutates bean properties but performs no database access, no SC/CBS invocation, and no entity transformation. The method also computes `separaterPoint` from the key but does not use the result, which is unused dead code.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData params"])
    NULL_CHECK["key == null or subkey == null?"]
    EARLY_RETURN(["Return"])

    SEP_CALC["int separaterPoint = key.indexOf('/')"]

    KEY_01["key equals '明細インデックス'"]
    KEY_01_YES["Yes"]
    KEY_01_NO["No"]

    SUB_01_1["subkey equalsIgnoreCase 'value'"]
    SUB_01_1_YES["setL2_detail_index_value"]
    SUB_01_1_NO["No"]

    SUB_01_2["subkey equalsIgnoreCase 'enable'"]
    SUB_01_2_YES["setL2_detail_index_enabled"]
    SUB_01_2_NO["No"]

    SUB_01_3["subkey equalsIgnoreCase 'state'"]
    SUB_01_3_YES["setL2_detail_index_state"]

    KEY_02["key equals 'キャンペーンコード'"]
    KEY_02_YES["Yes"]
    KEY_02_NO["No"]

    SUB_02_1["subkey equalsIgnoreCase 'value'"]
    SUB_02_1_YES["setL2_dsp_campaign_cd_value"]
    SUB_02_1_NO["No"]

    SUB_02_2["subkey equalsIgnoreCase 'enable'"]
    SUB_02_2_YES["setL2_dsp_campaign_cd_enabled"]
    SUB_02_2_NO["No"]

    SUB_02_3["subkey equalsIgnoreCase 'state'"]
    SUB_02_3_YES["setL2_dsp_campaign_cd_state"]

    KEY_03["key equals 'キャンペーン名'"]
    KEY_03_YES["Yes"]
    KEY_03_NO["No"]

    SUB_03_1["subkey equalsIgnoreCase 'value'"]
    SUB_03_1_YES["setL2_wrib_svc_nm_value"]
    SUB_03_1_NO["No"]

    SUB_03_2["subkey equalsIgnoreCase 'enable'"]
    SUB_03_2_YES["setL2_wrib_svc_nm_enabled"]
    SUB_03_2_NO["No"]

    SUB_03_3["subkey equalsIgnoreCase 'state'"]
    SUB_03_3_YES["setL2_wrib_svc_nm_state"]

    KEY_04["key equals '適用月'"]
    KEY_04_YES["Yes"]
    KEY_04_NO["No"]

    SUB_04_1["subkey equalsIgnoreCase 'value'"]
    SUB_04_1_YES["setL2_wrib_svc_tstaymd_value"]
    SUB_04_1_NO["No"]

    SUB_04_2["subkey equalsIgnoreCase 'enable'"]
    SUB_04_2_YES["setL2_wrib_svc_tstaymd_enabled"]
    SUB_04_2_NO["No"]

    SUB_04_3["subkey equalsIgnoreCase 'state'"]
    SUB_04_3_YES["setL2_wrib_svc_tstaymd_state"]

    KEY_05["key equals '行スタイルクラス'"]
    KEY_05_YES["Yes"]
    KEY_05_NO["No"]

    SUB_05_1["subkey equalsIgnoreCase 'value'"]
    SUB_05_1_YES["setL2_line_style_class_value"]
    SUB_05_1_NO["No"]

    SUB_05_2["subkey equalsIgnoreCase 'state'"]
    SUB_05_2_YES["setL2_line_style_class_state"]

    KEY_06["key equals '行スタイルID'"]
    KEY_06_YES["Yes"]
    KEY_06_NO["No"]

    SUB_06_1["subkey equalsIgnoreCase 'value'"]
    SUB_06_1_YES["setL2_line_style_id_value"]
    SUB_06_1_NO["No"]

    SUB_06_2["subkey equalsIgnoreCase 'state'"]
    SUB_06_2_YES["setL2_line_style_id_state"]

    END_NODE(["Return / Next"])

    START --> NULL_CHECK
    NULL_CHECK --> EARLY_RETURN
    NULL_CHECK --> SEP_CALC
    SEP_CALC --> KEY_01
    KEY_01 --> KEY_01_YES
    KEY_01 --> KEY_01_NO
    KEY_01_YES --> SUB_01_1
    SUB_01_1 --> SUB_01_1_YES
    SUB_01_1 --> SUB_01_1_NO
    SUB_01_1_NO --> SUB_01_2
    SUB_01_2 --> SUB_01_2_YES
    SUB_01_2 --> SUB_01_2_NO
    SUB_01_2_NO --> SUB_01_3
    SUB_01_3 --> SUB_01_3_YES
    KEY_01_NO --> KEY_02
    KEY_02 --> KEY_02_YES
    KEY_02 --> KEY_02_NO
    KEY_02_YES --> SUB_02_1
    SUB_02_1 --> SUB_02_1_YES
    SUB_02_1 --> SUB_02_1_NO
    SUB_02_1_NO --> SUB_02_2
    SUB_02_2 --> SUB_02_2_YES
    SUB_02_2 --> SUB_02_2_NO
    SUB_02_2_NO --> SUB_02_3
    SUB_02_3 --> SUB_02_3_YES
    KEY_02_NO --> KEY_03
    KEY_03 --> KEY_03_YES
    KEY_03 --> KEY_03_NO
    KEY_03_YES --> SUB_03_1
    SUB_03_1 --> SUB_03_1_YES
    SUB_03_1 --> SUB_03_1_NO
    SUB_03_1_NO --> SUB_03_2
    SUB_03_2 --> SUB_03_2_YES
    SUB_03_2 --> SUB_03_2_NO
    SUB_03_2_NO --> SUB_03_3
    SUB_03_3 --> SUB_03_3_YES
    KEY_03_NO --> KEY_04
    KEY_04 --> KEY_04_YES
    KEY_04 --> KEY_04_NO
    KEY_04_YES --> SUB_04_1
    SUB_04_1 --> SUB_04_1_YES
    SUB_04_1 --> SUB_04_1_NO
    SUB_04_1_NO --> SUB_04_2
    SUB_04_2 --> SUB_04_2_YES
    SUB_04_2 --> SUB_04_2_NO
    SUB_04_2_NO --> SUB_04_3
    SUB_04_3 --> SUB_04_3_YES
    KEY_04_NO --> KEY_05
    KEY_05 --> KEY_05_YES
    KEY_05 --> KEY_05_NO
    KEY_05_YES --> SUB_05_1
    SUB_05_1 --> SUB_05_1_YES
    SUB_05_1 --> SUB_05_1_NO
    SUB_05_1_NO --> SUB_05_2
    SUB_05_2 --> SUB_05_2_YES
    KEY_05_NO --> KEY_06
    KEY_06 --> KEY_06_YES
    KEY_06 --> KEY_06_NO
    KEY_06_YES --> SUB_06_1
    SUB_06_1 --> SUB_06_1_YES
    SUB_06_1 --> SUB_06_1_NO
    SUB_06_1_NO --> SUB_06_2
    SUB_06_2 --> SUB_06_2_YES
    SUB_01_3_YES --> END_NODE
    SUB_02_3_YES --> END_NODE
    SUB_03_3_YES --> END_NODE
    SUB_04_3_YES --> END_NODE
    SUB_05_2_YES --> END_NODE
    SUB_06_2_YES --> END_NODE
    SUB_01_1_YES --> END_NODE
    SUB_01_2_YES --> END_NODE
    SUB_02_1_YES --> END_NODE
    SUB_02_2_YES --> END_NODE
    SUB_03_1_YES --> END_NODE
    SUB_03_2_YES --> END_NODE
    SUB_04_1_YES --> END_NODE
    SUB_04_2_YES --> END_NODE
    SUB_05_1_YES --> END_NODE
    SUB_06_1_YES --> END_NODE
    SUB_01_1_NO --> END_NODE
    SUB_01_2_NO --> END_NODE
    SUB_02_1_NO --> END_NODE
    SUB_02_2_NO --> END_NODE
    SUB_03_1_NO --> END_NODE
    SUB_03_2_NO --> END_NODE
    SUB_04_1_NO --> END_NODE
    SUB_04_2_NO --> END_NODE
    SUB_05_1_NO --> END_NODE
    SUB_06_1_NO --> END_NODE
```

**Processing overview:**

The method first validates that both `key` and `subkey` are non-null. If either is null, processing terminates immediately. Next, it computes `separaterPoint` (the index of a "/" delimiter in the key) but never uses the result. Then it chains through six top-level `if/else-if` branches, each matching a specific Japanese field name. Within each field branch, it dispatches further based on the subkey (`value`, `enable`, or `state`, compared case-insensitively) to the appropriate setter. If none of the known field names match, the method returns without action.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business field name to populate. Can take one of six Japanese values: `明細インデックス` (Detail Index — row-level detail line identifier), `キャンペーンコード` (Campaign Code — DSP campaign identification), `キャンペーン名` (Campaign Name — service/writable campaign label), `適用月` (Application Month — billing period start date, YYYYMMDD format), `行スタイルクラス` (Row Style Class — CSS class for table row styling), or `行スタイルID` (Row Style ID — CSS ID for table row styling). Determines which setter chain is executed. |
| 2 | `subkey` | `String` | The property attribute within the selected field. Case-insensitive comparison is performed against three values: `value` (the actual data content), `enable` (editability flag), or `state` (UI presentation state). Determines which setter is invoked within the matched field branch. |
| 3 | `in_value` | `Object` | The data to assign. Cast to `String` for `value`/`state` subkeys, or cast to `Boolean` for the `enable` subkey. Carries the actual business data or control flag to be stored in the model. |
| 4 | `isSetAsString` | `boolean` | A flag indicating whether to set a String-type value into a Long-type item's Value property. Currently unused within this method body but part of the public contract. |

**Instance fields read:** None. This method only writes to bean properties via setters; it does not read any instance fields.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `setL2_detail_index_value` | CRW03407SF03DBean | - | Sets the Detail Index display value (String) on the DTO bean |
| U | `setL2_detail_index_enabled` | CRW03407SF03DBean | - | Sets the Detail Index editability flag (Boolean) on the DTO bean |
| U | `setL2_detail_index_state` | CRW03407SF03DBean | - | Sets the Detail Index UI state (String) on the DTO bean |
| U | `setL2_dsp_campaign_cd_value` | CRW03407SF03DBean | - | Sets the DSP Campaign Code display value (String) on the DTO bean |
| U | `setL2_dsp_campaign_cd_enabled` | CRW03407SF03DBean | - | Sets the DSP Campaign Code editability flag (Boolean) on the DTO bean |
| U | `setL2_dsp_campaign_cd_state` | CRW03407SF03DBean | - | Sets the DSP Campaign Code UI state (String) on the DTO bean |
| U | `setL2_wrib_svc_nm_value` | CRW03407SF03DBean | - | Sets the Campaign Name display value (String) on the DTO bean |
| U | `setL2_wrib_svc_nm_enabled` | CRW03407SF03DBean | - | Sets the Campaign Name editability flag (Boolean) on the DTO bean |
| U | `setL2_wrib_svc_nm_state` | CRW03407SF03DBean | - | Sets the Campaign Name UI state (String) on the DTO bean |
| U | `setL2_wrib_svc_tstaymd_value` | CRW03407SF03DBean | - | Sets the Application Month display value (String) on the DTO bean |
| U | `setL2_wrib_svc_tstaymd_enabled` | CRW03407SF03DBean | - | Sets the Application Month editability flag (Boolean) on the DTO bean |
| U | `setL2_wrib_svc_tstaymd_state` | CRW03407SF03DBean | - | Sets the Application Month UI state (String) on the DTO bean |
| U | `setL2_line_style_class_value` | CRW03407SF03DBean | - | Sets the Row Style Class display value (String) on the DTO bean |
| U | `setL2_line_style_class_state` | CRW03407SF03DBean | - | Sets the Row Style Class UI state (String) on the DTO bean |
| U | `setL2_line_style_id_value` | CRW03407SF03DBean | - | Sets the Row Style ID display value (String) on the DTO bean |
| U | `setL2_line_style_id_state` | CRW03407SF03DBean | - | Sets the Row Style ID UI state (String) on the DTO bean |

All 16 setter calls are **Update (U)** operations on the presentation-layer DTO bean. No database tables, SC codes, CBS components, or entity reads/writes are involved.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class: CRW03407SF03DBean (no-arg overload `storeModelData()`) | `storeModelData()` (overload) -> `storeModelData(key, subkey, in_value, isSetAsString)` | `setL2_line_style_id_state` [U], `setL2_line_style_id_value` [U], `setL2_line_style_class_state` [U], `setL2_line_style_class_value` [U], `setL2_wrib_svc_tstaymd_state` [U], `setL2_wrib_svc_tstaymd_enabled` [U], `setL2_wrib_svc_tstaymd_value` [U], `setL2_wrib_svc_nm_state` [U], `setL2_wrib_svc_nm_enabled` [U], `setL2_wrib_svc_nm_value` [U], `setL2_dsp_campaign_cd_state` [U], `setL2_dsp_campaign_cd_enabled` [U], `setL2_dsp_campaign_cd_value` [U], `setL2_detail_index_state` [U], `setL2_detail_index_enabled` [U], `setL2_detail_index_value` [U] |

**Note:** The only direct caller is the no-argument overload of `storeModelData()` within the same class (`CRW03407SF03DBean`), which iterates over a data source and invokes this parameterized method for each entry. No screen (KKSV*), batch, or CBS entry points were found within 8 hops. The method is a pure DTO-level data binder with no persistence footprint.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null guard) (L393)

Guard clause: if either `key` or `subkey` is null, return immediately without processing.

> （key、subkeyがnullの場合、処理を中止）

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf('/')` // Extracts delimiter position — unused (dead code) |
| 2 | RETURN | `return;` // Early exit |

---

**Block 2** — IF-ELSE-IF-ELSE-IF (Field: 明細インデックス / Detail Index) (L397)

The first top-level branch handles the Detail Index field. This is a string-type display field whose internal ID is `l2_detail_index`. Three subkey attributes are supported: `value` (the actual data), `enable` (editability), and `state` (UI state).

> （データタイプがStringの項目"明細インデックス"（項目ID: l2_detail_index））

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` // (unused — dead code) |
| 2 | EXEC | `setL2_detail_index_value((String) in_value)` // subkey equals "value" — sets the detail index value |
| 3 | EXEC | `setL2_detail_index_enabled((Boolean) in_value)` // subkey equals "enable" — sets the editability flag <br>（subkeyが"enable"の場合、l2_detail_index_enabledのsetterを実行する） |
| 4 | EXEC | `setL2_detail_index_state((String) in_value)` // subkey equals "state" — sets the UI state <br>（subkeyが"state"の場合、ステータスを返す） |

---

**Block 3** — ELSE-IF (Field: キャンペーンコード / Campaign Code) (L408)

The second top-level branch handles the DSP Campaign Code field. Internal ID is `l2_dsp_campaign_cd`. Three subkey attributes: `value`, `enable`, `state`.

> （データタイプがStringの項目"キャンペーンコード"（項目ID: l2_dsp_campaign_cd））

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL2_dsp_campaign_cd_value((String) in_value)` // subkey equals "value" |
| 2 | EXEC | `setL2_dsp_campaign_cd_enabled((Boolean) in_value)` // subkey equals "enable" <br>（subkeyが"enable"の場合、l2_dsp_campaign_cd_enabledのsetterを実行する） |
| 3 | EXEC | `setL2_dsp_campaign_cd_state((String) in_value)` // subkey equals "state" <br>（subkeyが"state"の場合、ステータスを返す） |

---

**Block 4** — ELSE-IF (Field: キャンペーン名 / Campaign Name) (L419)

The third top-level branch handles the Campaign Name (Writable Service Name) field. Internal ID is `l2_wrib_svc_nm`. Three subkey attributes: `value`, `enable`, `state`.

> （データタイプがStringの項目"キャンペーン名"（項目ID: l2_wrib_svc_nm））

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL2_wrib_svc_nm_value((String) in_value)` // subkey equals "value" |
| 2 | EXEC | `setL2_wrib_svc_nm_enabled((Boolean) in_value)` // subkey equals "enable" <br>（subkeyが"enable"の場合、l2_wrib_svc_nm_enabledのsetterを実行する） |
| 3 | EXEC | `setL2_wrib_svc_nm_state((String) in_value)` // subkey equals "state" <br>（subkeyが"state"の場合、ステータスを返す） |

---

**Block 5** — ELSE-IF (Field: 適用月 / Application Month) (L430)

The fourth top-level branch handles the Application Month field. Internal ID is `l2_wrib_svc_tstaymd`. Three subkey attributes: `value`, `enable`, `state`.

> （データタイプがStringの項目"適用月"（項目ID: l2_wrib_svc_tstaymd））

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL2_wrib_svc_tstaymd_value((String) in_value)` // subkey equals "value" |
| 2 | EXEC | `setL2_wrib_svc_tstaymd_enabled((Boolean) in_value)` // subkey equals "enable" <br>（subkeyが"enable"の場合、l2_wrib_svc_tstaymd_enabledのsetterを実行する） |
| 3 | EXEC | `setL2_wrib_svc_tstaymd_state((String) in_value)` // subkey equals "state" <br>（subkeyが"state"の場合、ステータスを返す） |

---

**Block 6** — ELSE-IF (Field: 行スタイルクラス / Row Style Class) (L441)

The fifth top-level branch handles the Row Style Class field. Internal ID is `l2_line_style_class`. Only two subkey attributes are supported: `value` and `state` (no `enable` attribute defined for this field).

> （データタイプがStringの項目"行スタイルクラス"（項目ID: l2_line_style_class））

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL2_line_style_class_value((String) in_value)` // subkey equals "value" |
| 2 | EXEC | `setL2_line_style_class_state((String) in_value)` // subkey equals "state" <br>（subkeyが"state"の場合、ステータスを返す） |

---

**Block 7** — ELSE-IF (Field: 行スタイルID / Row Style ID) (L450)

The sixth and final top-level branch handles the Row Style ID field. Internal ID is `l2_line_style_id`. Only two subkey attributes: `value` and `state` (no `enable` attribute).

> （データタイプがStringの項目"行スタイルID"（項目ID: l2_line_style_id））

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL2_line_style_id_value((String) in_value)` // subkey equals "value" |
| 2 | EXEC | `setL2_line_style_id_state((String) in_value)` // subkey equals "state" <br>（subkeyが"state"の場合、ステータスを返す） |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `l2_detail_index` | Field | Detail Index — internal row-level detail line identifier used in the campaign/service display grid |
| `l2_dsp_campaign_cd` | Field | DSP Campaign Code — Digital Service Provider campaign identification code |
| `l2_wrib_svc_nm` | Field | Writable Campaign Name — service/writable campaign name label displayed to users |
| `l2_wrib_svc_tstaymd` | Field | Application Month — the billing/service application period (format: YYYYMMDD) |
| `l2_line_style_class` | Field | Row Style Class — CSS class name applied to table rows for visual styling |
| `l2_line_style_id` | Field | Row Style ID — CSS ID applied to table rows for targeted styling |
| 明細インデックス | Japanese | Detail Index — detail line number identifier |
| キャンペーンコード | Japanese | Campaign Code — campaign identification code |
| キャンペーン名 | Japanese | Campaign Name — campaign title/label |
| 適用月 | Japanese | Application Month — the billing period for which the service applies |
| 行スタイルクラス | Japanese | Row Style Class — CSS class for table row formatting |
| 行スタイルID | Japanese | Row Style ID — CSS ID for table row formatting |
| DTO / Bean | Technical | Data Transfer Object — a Java class that carries data between layers; here it holds presentation-layer model state |
| enable | Attribute | Boolean flag controlling whether a field is editable or disabled in the UI |
| state | Attribute | String flag controlling the presentation state of a field (e.g., displayed, hidden, read-only) |
| L2 | Convention | "Level 2" — indicates the second layer of a display hierarchy, typically detail lines within a primary record |
| DSP | Business | Digital Service Provider — advertising/platform partner that runs campaigns |
| Wrib | Abbreviation | Writable — a domain-specific prefix (likely "Write-in" or "Writable") applied to service-related fields |
| TSTAY | Abbreviation | Stay/Start — used in `l2_wrib_svc_tstaymd` as the service term start date (YMDD = Year-Month-Day) |
| CRW03407SF | Module | A screen feature module (SF = Screen Function) in the telecom billing/ordering system |
