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

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00156SF.FUW00156SF03DBean` |
| Layer | Service Component / Common Component (DD = Detail Design data bean helper) |
| Module | `FUW00156SF` (Package: `eo.web.webview.FUW00156SF`) |

## 1. Role

### FUW00156SF03DBean.storeModelData()

This method serves as a **data routing dispatcher** for storing model data into typed property slots within the `FUW00156SF03DBean` data transfer object. It implements a field-name-based routing pattern that accepts a generic `Object` value and dispatches it to strongly-typed setter methods based on a two-part key hierarchy. The key represents a **business item name** (e.g., "送信先メールアドレス" — Send Destination Email Address), and the subkey represents a **property type** within that item (either "value" for the data payload or "state" for metadata/state information). This method acts as a polymorphic storage mechanism, allowing callers to store email address data and email address configuration field codes into the bean without requiring callers to know the specific setter method names. The method handles two distinct data types: (1) Send Destination Email Address (`mlad`), which stores the actual email address value and its state, and (2) Email Address Setting Field Code (`mlad_set_field_cd`), which stores the configuration field code and its state. The `isSetAsString` parameter is present in the signature but is not utilized in the current implementation body, suggesting it was reserved for future use where Long-type item value properties may require String value setting. The method plays a foundational role in the webview data binding layer, providing a unified storage interface used by both self-calls within the bean and potential callers in screen-level components.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData(key, subkey, in_value, isSetAsString)"])
    START --> CHECK_NULL["Check: key == null || subkey == null"]
    CHECK_NULL --> |true| EARLY_RETURN(["return (early exit)"])
    CHECK_NULL --> |false| FIND_SEP["Find '/' position in key"]
    FIND_SEP --> CHECK_MLAD["key equals '送信先メールアドレス' (Send Destination Email Address)"]
    CHECK_MLAD --> |true| CHECK_MLAD_SUB["subkey.equalsIgnoreCase('value')"]
    CHECK_MLAD --> |false| CHECK_MLAD_SET["key equals 'メールアドレス設定フィールドコード' (Email Address Setting Field Code)"]
    CHECK_MLAD_SUB --> |true| SET_MLAD_VAL["setMlad_value((String)in_value)"]
    CHECK_MLAD_SUB --> |false| CHECK_MLAD_STATE["subkey.equalsIgnoreCase('state')"]
    CHECK_MLAD_STATE --> |true| SET_MLAD_ST["setMlad_state((String)in_value)"]
    CHECK_MLAD_STATE --> |false| END_STORE1(["End (no action)"])
    SET_MLAD_VAL --> END_STORE1
    SET_MLAD_ST --> END_STORE1
    CHECK_MLAD_SET --> |true| CHECK_MLAD_SET_SUB["subkey.equalsIgnoreCase('value')"]
    CHECK_MLAD_SET --> |false| END_STORE2(["End (no action)"])
    CHECK_MLAD_SET_SUB --> |true| SET_FIELD_VAL["setMlad_set_field_cd_value((String)in_value)"]
    CHECK_MLAD_SET_SUB --> |false| CHECK_MLAD_SET_STATE["subkey.equalsIgnoreCase('state')"]
    CHECK_MLAD_SET_STATE --> |true| SET_FIELD_ST["setMlad_set_field_cd_state((String)in_value)"]
    CHECK_MLAD_SET_STATE --> |false| END_STORE3(["End (no action)"])
    SET_FIELD_VAL --> END_STORE2
    SET_FIELD_ST --> END_STORE2
```

**Processing Summary:**

The method performs a three-stage dispatch:

1. **Null guard**: Returns immediately if either `key` or `subkey` is null, protecting downstream equality comparisons.
2. **Key dispatch**: Routes processing based on the `key` parameter, which maps to a specific business item type. Two key values are recognized:
   - `"送信先メールアドレス"` (Send Destination Email Address) — Item ID: `mlad`
   - `"メールアドレス設定フィールドコード"` (Email Address Setting Field Code) — Item ID: `mlad_set_field_cd`
3. **Subkey dispatch**: Within each key branch, routes based on `subkey` (case-insensitive):
   - `"value"` — Stores the data payload via the `setMlad_*_value()` setter
   - `"state"` — Stores the state/metadata via the `setMlad_*_state()` setter

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business item name that identifies which typed property slot to store data into. Accepts predefined Japanese item names: `"送信先メールアドレス"` (Send Destination Email Address) or `"メールアドレス設定フィールドコード"` (Email Address Setting Field Code). Case-sensitive comparison. Acts as the primary routing key that determines which domain of data is being stored. |
| 2 | `subkey` | `String` | The property type within the item, specifying whether the data is a value payload or a state indicator. Accepts `"value"` (case-insensitive) to store the actual data, or `"state"` (case-insensitive) to store metadata/state. This enables a dual-slot pattern where each item has both a value and a state property. |
| 3 | `in_value` | `Object` | The data to be stored. Cast to `String` at the call site of the setter method. Contains the actual email address (when key is "送信先メールアドレス") or the field configuration code (when key is "メールアドレス設定フィールドコード"). |
| 4 | `isSetAsString` | `boolean` | Reserved parameter indicating whether String-type value setting should be performed for Long-type item value properties. Currently unused in the implementation body — no code path references this parameter. Likely intended for future use where numeric values may need string representation. |

**Instance fields / external state accessed:**
- `mlad_value` — Set via `setMlad_value()`; stores the send destination email address
- `mlad_state` — Set via `setMlad_state()`; stores the state of the email address field
- `mlad_set_field_cd_value` — Set via `setMlad_set_field_cd_value()`; stores the email address setting field code value
- `mlad_set_field_cd_state` — Set via `setMlad_set_field_cd_state()`; stores the state of the field code

## 4. CRUD Operations / Called Services

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

No external service or database operations are performed by this method. All calls are internal setter delegation methods within the same bean class.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `FUW00156SF03DBean.setMlad_value` | - | - (in-memory bean property) | Delegates to `setMlad_value()` setter to store the send destination email address value into the bean |
| - | `FUW00156SF03DBean.setMlad_state` | - | - (in-memory bean property) | Delegates to `setMlad_state()` setter to store the send destination email address state into the bean |
| - | `FUW00156SF03DBean.setMlad_set_field_cd_value` | - | - (in-memory bean property) | Delegates to `setMlad_set_field_cd_value()` setter to store the email address setting field code value into the bean |
| - | `FUW00156SF03DBean.setMlad_set_field_cd_state` | - | - (in-memory bean property) | Delegates to `setMlad_set_field_cd_state()` setter to store the email address setting field code state into the bean |

**Classification note:** All four method calls are **setter delegations** (U — Update pattern for in-memory bean properties). No database, entity, or SC-level CRUD operations are performed. This method is purely a data routing layer within the DTO/bean hierarchy.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods (both are self-calls within `FUW00156SF03DBean`).
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 | FUW00156SF03DBean (self-call) | `FUW00156SF03DBean.storeModelData` | `setMlad_value`, `setMlad_state` [-] |
| 2 | FUW00156SF03DBean (self-call) | `FUW00156SF03DBean.storeModelData` | `setMlad_set_field_cd_value`, `setMlad_set_field_cd_state` [-] |

**Caller analysis:**
- Both callers are self-referential calls within `FUW00156SF03DBean` itself. This suggests the method is used internally by other methods in the same class as a shared storage utility, avoiding repetition of the routing logic across multiple setter calls.
- No screen entry points (KKSV*) or CBS-level callers were identified within 8 hops of the call graph.
- Terminal operations: All four calls end at in-memory bean property setters with no downstream database or service component interaction.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null guard) `(key == null || subkey == null)` (L197)

> Guard clause: returns immediately if either key or subkey is null, preventing NPE on downstream string comparisons.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // Finds position of '/' separator in key [Unused variable — possibly for future hierarchical key support] |
| 2 | RETURN | `return;` // Early exit when key or subkey is null |

**Block 2** — IF/ELSE-IF `(key dispatch)` (L202-L220)

> Primary routing block: dispatches processing based on the key parameter.

**Block 2.1** — IF `(key equals "送信先メールアドレス" (Send Destination Email Address))` (L203)

> Handles storage of the send destination email address value and state into the `mlad` typed properties.

**Block 2.1.1** — IF `(subkey.equalsIgnoreCase("value"))` (L204)

> Stores the actual email address string into the `mlad_value` property.

| # | Type | Code |
|---|------|------|
| 1 | SET | `setMlad_value((String)in_value);` // Stores email address value into Mlad bean property |

**Block 2.1.2** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` [subkey is "state"の場合一、ステータスを返す。] (L207)

> Stores the state/metadata string into the `mlad_state` property. (Translation: If subkey is "state", returns the state.)

| # | Type | Code |
|---|------|------|
| 1 | SET | `setMlad_state((String)in_value);` // Stores email address state into Mlad bean property |

**Block 2.2** — ELSE-IF `(key equals "メールアドレス設定フィールドコード" (Email Address Setting Field Code))` (L212)

> Handles storage of the email address setting field code value and state into the `mlad_set_field_cd` typed properties.

**Block 2.2.1** — IF `(subkey.equalsIgnoreCase("value"))` (L213)

> Stores the actual field code string into the `mlad_set_field_cd_value` property.

| # | Type | Code |
|---|------|------|
| 1 | SET | `setMlad_set_field_cd_value((String)in_value);` // Stores email address setting field code value into bean property |

**Block 2.2.2** — ELSE-IF `(subkey.equalsIgnoreCase("state"))` [subkeyが"state"の場合、ステータスを返す。] (L216)

> Stores the state/metadata string into the `mlad_set_field_cd_state` property. (Translation: If subkey is "state", returns the state.)

| # | Type | Code |
|---|------|------|
| 1 | SET | `setMlad_set_field_cd_state((String)in_value);` // Stores email address setting field code state into bean property |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mlad` | Field ID | Mlad — Internal item identifier for "Send Destination Email Address" (送信先メールアドレス). Maps to bean properties `mlad_value` and `mlad_state`. |
| `mlad_set_field_cd` | Field ID | Mlad Set Field Code — Internal item identifier for "Email Address Setting Field Code" (メールアドレス設定フィールドコード). Maps to bean properties `mlad_set_field_cd_value` and `mlad_set_field_cd_state`. |
| `送信先メールアドレス` | Field (Japanese) | Send Destination Email Address — The actual email address to which communications are sent. Stored in `mlad_value`. |
| `メールアドレス設定フィールドコード` | Field (Japanese) | Email Address Setting Field Code — A configuration code that defines how the email address field is set up (e.g., which form field or data source the email address is bound to). Stored in `mlad_set_field_cd_value`. |
| `key` | Parameter | Item name — The business identifier for which typed property slot to write to. Case-sensitive exact match. |
| `subkey` | Parameter | Sub-property identifier — Specifies whether the data is a value ("value") or state/metadata ("state") within the keyed item. Case-insensitive match. |
| `in_value` | Parameter | Input data — The actual value being stored, cast to String at the setter call site. |
| `isSetAsString` | Parameter | Reserved boolean flag — Intended to indicate whether String-type value setting should be performed for Long-type item value properties. Not used in current implementation. |
| `setMlad_value` | Method | Setter for the send destination email address value property on the bean. |
| `setMlad_state` | Method | Setter for the send destination email address state property on the bean. |
| `setMlad_set_field_cd_value` | Method | Setter for the email address setting field code value property on the bean. |
| `setMlad_set_field_cd_state` | Method | Setter for the email address setting field code state property on the bean. |
| FUW00156SF | Module | Webview screen module — A FUJITSU enterprise module code (likely related to web-based service configuration or data entry for FTTH/telecom services). |
| DD Bean | Pattern | Detail Design data bean — A data transfer object in the enterprise architecture that holds screen-level data between the webview layer and service components. |
