# Business Logic — FUW00114SF01DBean.storeModelData() [31 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00114SF.FUW00114SF01DBean` |
| Layer | Web / Screen DBean (Data Bean — View-layer data carrier) |
| Module | `FUW00114SF` (Package: `eo.web.webview.FUW00114SF`) |

## 1. Role

### FUW00114SF01DBean.storeModelData()

This method is a **data dispatch and storage** routine within a Screen Data Bean (DBean) for the email address configuration screen (module FUW00114SF). Its business purpose is to accept a key-value pair representing a screen field and store it into the bean's internal property holders — acting as a flexible, key-based setter that replaces the need for individual setter calls throughout the screen logic. It supports two field types: the destination email address itself (`"送信先メールアドレス"`, item ID `mlad`) and the email address setting field code (`"メールアドレス設定フィールドコード"`, item ID `mlad_set_field_cd`). For each field, it distinguishes between value assignment and state tracking by inspecting the subkey parameter. The method implements a **routing/dispatch pattern** where the key determines which property group to route to, and the subkey determines whether the incoming value is stored as data or metadata (state). It plays the role of a **shared utility within the DBean**, consolidating all model data ingestion into a single entry point so that calling code does not need to know the internal property structure. The `isSetAsString` parameter is declared but not used in the current implementation.

## 2. Processing Pattern (Detailed Business Logic)

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

    START --> COND1["key == null or subkey == null"]
    COND1 -- true --> EARLY_RETURN["Return (early exit)"]
    COND1 -- false --> COMPUTE["separaterPoint = key.indexOf('/')"]

    COMPUTE --> COND2["key equals '送信先メールアドレス' (mlad)"]
    COND2 -- true --> COND3["subkey equals 'value' (ign. case)"]
    COND3 -- true --> CALL_MLAD_VAL["setMlad_value((String)in_value)"]
    COND3 -- false --> COND4["subkey equals 'state' (ign. case)"]
    COND4 -- true --> CALL_MLAD_STATE["setMlad_state((String)in_value)"]
    COND4 -- false --> END_MLAD["End branch (no action)"]

    COND2 -- false --> COND5["key equals 'メールアドレス設定フィールドコード' (mlad_set_field_cd)"]
    COND5 -- true --> COND6["subkey equals 'value' (ign. case)"]
    COND6 -- true --> CALL_MLAD_SET_VAL["setMlad_set_field_cd_value((String)in_value)"]
    COND6 -- false --> COND7["subkey equals 'state' (ign. case)"]
    COND7 -- true --> CALL_MLAD_SET_STATE["setMlad_set_field_cd_state((String)in_value)"]
    COND7 -- false --> END_SET["End branch (no action)"]

    COND5 -- false --> END_NOT_MATCH["Return (no matching key)"]

    CALL_MLAD_VAL --> END_NODE["Return / Next"]
    CALL_MLAD_STATE --> END_NODE
    END_MLAD --> END_NODE
    CALL_MLAD_SET_VAL --> END_NODE
    CALL_MLAD_SET_STATE --> END_NODE
    END_SET --> END_NODE
    END_NOT_MATCH --> END_NODE
    EARLY_RETURN --> END_NODE
```

**CRITICAL — Constant Resolution:**
This method uses literal Japanese strings rather than named constants for field identification. The resolved key values and their business meanings are:

| Constant Value | Business Meaning | Item ID |
|---------------|-----------------|---------|
| `"送信先メールアドレス"` | Destination Email Address — the recipient email for service notifications | `mlad` |
| `"メールアドレス設定フィールドコード"` | Email Address Setting Field Code — the configuration field code governing email address settings | `mlad_set_field_cd` |

The `isSetAsString` parameter is declared but **not used** in the method body, indicating this is a stub or extension point for future string-conversion logic on Long-type item Value properties (as described in the Javadoc).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business field identifier (item name) that determines which property group to route to. Must match one of the recognized Japanese field names: `"送信先メールアドレス"` (Destination Email Address) or `"メールアドレス設定フィールドコード"` (Email Address Setting Field Code). If null, the method exits early. |
| 2 | `subkey` | `String` | The sub-property selector within the identified field. Accepts `"value"` to set the actual data, or `"state"` to set tracking/metadata state. Case-insensitive comparison. If null, the method exits early. |
| 3 | `in_value` | `Object` | The data payload to store. Cast to `String` when assigned. For `subkey="value"`, this is the actual email address or field code. For `subkey="state"`, this is the state indicator string. |
| 4 | `isSetAsString` | `boolean` | Flag indicating whether to set a String-type value to a Long-type item Value property (Long型項目ValueプロパティへString型値の設定を行う場合). **Currently unused** in the method body — a declared extension point. |

**Instance fields read:** None. This method only calls setter methods on the bean itself.

## 4. CRUD Operations / Called Services

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

This method performs **internal property assignment** only. It does not invoke any external SC (Service Component) or CBS (Business Service) layers, nor does it perform database operations. All operations are Write (set) operations on the DBean's own internal state.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `setMlad_value(String)` | FUW00114SF01DBean | - | Sets the destination email address value on the DBean (item ID: `mlad`) |
| U | `setMlad_state(String)` | FUW00114SF01DBean | - | Sets the state indicator for the destination email address on the DBean (item ID: `mlad`) |
| U | `setMlad_set_field_cd_value(String)` | FUW00114SF01DBean | - | Sets the email address setting field code value on the DBean (item ID: `mlad_set_field_cd`) |
| U | `setMlad_set_field_cd_state(String)` | FUW00114SF01DBean | - | Sets the state indicator for the email address setting field code on the DBean (item ID: `mlad_set_field_cd`) |

## 5. Dependency Trace

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods.
Terminal operations from this method: `setMlad_set_field_cd_state` [-], `setMlad_set_field_cd_value` [-], `setMlad_state` [-], `setMlad_value` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW00114SF01DBean` (internal) | `storeModelData` | `setMlad_value [U] -` |
| 2 | `FUW00114SF01DBean` (internal) | `storeModelData` | `setMlad_set_field_cd_state [U] -` |

## 6. Per-Branch Detail Blocks

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

Null-check guard that prevents processing of invalid input. This is a defensive early-exit pattern.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key == null || subkey == null` — key or subkey is null |
| 2 | RETURN | `return;` // key,subkeyがnullの場合、処理を中止 (If key/subkey is null, abort processing) [L200-201] |

### Block 2 — EXEC (compute, unused) (L203)

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` // Finds the index of "/" delimiter in key. Value is computed but **never used** — potential dead code [L203] |

### Block 3 — IF-ELSE-IF (key routing) (L206)

Branches on the `key` parameter to determine which field group the data belongs to. Two recognized field types: Destination Email Address (`mlad`) and Email Address Setting Field Code (`mlad_set_field_cd`).

### Block 3.1 — IF (key = "送信先メールアドレス" / Destination Email Address) (L206)

Handles the destination email address field. This is the primary business data — the recipient email address for service notifications.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("送信先メールアドレス")` — key is "送信先メールアドレス" (Destination Email Address) [ODR_NAIYO_CD: `mlad`] [L206] |

#### Block 3.1.1 — IF (subkey = "value") (L207)

Assigns the incoming value as the destination email address.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("value")` — subkey is "value" (case-insensitive) [L207] |
| 2 | CALL | `setMlad_value((String)in_value)` — stores the destination email address into the DBean [L208] |

#### Block 3.1.2 — ELSE-IF (subkey = "state") (L209)

Assigns the incoming value as the state indicator for the destination email address. The comment says: subkeyが"state"の場合、ステータスを返す。 (If subkey is "state", return the status.)

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("state")` — subkey is "state" (case-insensitive) [L209] |
| 2 | CALL | `setMlad_state((String)in_value)` — stores the state indicator for the destination email address into the DBean [L210] |

#### Block 3.1.3 — ELSE (unmatched subkey) (implicit)

If neither "value" nor "state", no action is taken for the `mlad` field.

### Block 3.2 — ELSE-IF (key = "メールアドレス設定フィールドコード" / Email Address Setting Field Code) (L213)

Handles the email address setting field code field. This is a configuration field that determines how email addresses are structured or validated.

| # | Type | Code |
|---|------|------|
| 1 | COND | `key.equals("メールアドレス設定フィールドコード")` — key is "メールアドレス設定フィールドコード" (Email Address Setting Field Code) [ODR_NAIYO_CD: `mlad_set_field_cd`] [L213] |

#### Block 3.2.1 — IF (subkey = "value") (L214)

Assigns the incoming value as the email address setting field code.

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("value")` — subkey is "value" (case-insensitive) [L214] |
| 2 | CALL | `setMlad_set_field_cd_value((String)in_value)` — stores the field code value into the DBean [L215] |

#### Block 3.2.2 — ELSE-IF (subkey = "state") (L216)

Assigns the incoming value as the state indicator for the email address setting field code. The comment says: subkeyが"state"の場合、ステータスを返す。 (If subkey is "state", return the status.)

| # | Type | Code |
|---|------|------|
| 1 | COND | `subkey.equalsIgnoreCase("state")` — subkey is "state" (case-insensitive) [L216] |
| 2 | CALL | `setMlad_set_field_cd_state((String)in_value)` — stores the state indicator for the field code into the DBean [L217] |

#### Block 3.2.3 — ELSE (unmatched subkey) (implicit)

If neither "value" nor "state", no action is taken for the `mlad_set_field_cd` field.

### Block 4 — Implicit ELSE (unmatched key)

If the key does not match either recognized field name, the method falls through and returns without action. No explicit else branch exists — this is an implicit pass-through.

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `送信先メールアドレス` | Field (Japanese) | Destination Email Address — the recipient email address for service notifications and communications |
| `mlad` | Item ID | Internal item identifier for the Destination Email Address field |
| `メールアドレス設定フィールドコード` | Field (Japanese) | Email Address Setting Field Code — the configuration code that governs email address formatting/validation rules |
| `mlad_set_field_cd` | Item ID | Internal item identifier for the Email Address Setting Field Code field |
| `DBean` | Acronym | Data Bean — a Java object that carries screen-level input/output data between the web tier and business logic layer |
| `subkey` | Field | Sub-property selector — determines whether the value being set is data (`"value"`) or metadata/state (`"state"`) |
| `isSetAsString` | Field | Flag for String-to-Long type conversion — indicates whether a String value should be set into a Long-type property (declared but unused in this implementation) |
| `separaterPoint` | Field | Separator position index — computed via `key.indexOf("/")` but never used (unused local variable) |
| `setMlad_value` | Method | Sets the destination email address value on the DBean |
| `setMlad_state` | Method | Sets the state/status indicator for the destination email address on the DBean |
| `setMlad_set_field_cd_value` | Method | Sets the email address setting field code value on the DBean |
| `setMlad_set_field_cd_state` | Method | Sets the state/status indicator for the email address setting field code on the DBean |
