# Business Logic — FUW00110SF01DBean.storeModelData() [103 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00110SF.FUW00110SF01DBean` |
| Layer | Utility / Data Binding Bean (X33V Framework) |
| Module | `FUW00110SF` (Package: `eo.web.webview.FUW00110SF`) |

## 1. Role

### FUW00110SF01DBean.storeModelData()

This method is a **model data assignment dispatcher** within the X33V web framework's bean infrastructure. It receives a `key` that encodes both a **item type** (e.g., "item_count", "sel_index", "true_value", "label_value") and a **list index** (e.g., "item_count/0" resolves to index 0 of the item_count list), along with a data value (`in_value`) and an optional string-flag (`isSetAsString`). Based on the item type, it **routes the data to the correct typed list** and delegates to the individual bean's `storeModelData()` method for final assignment. This implements the **composite pattern**: the parent bean acts as a dispatcher that propagates model data down into a tree of child data beans (X33VDataTypeLongBean and X33VDataTypeStringBean instances), enabling batch population of dynamic UI form fields (repeating sections, dropdown lists, etc.) from a flat key-value interface.

The method handles **four array-type data categories**: (1) Item Count (items count, Long type), (2) Selection Index (selected option index, Long type), (3) Item True Value (string data value), and (4) Item Label Value (display label, String type). Each branch extracts the list index from the key string (the portion after the "/"), validates it against the target list's bounds, casts to the appropriate X33V data bean type, and recursively calls `storeModelData(subkey, in_value, [isSetAsString])` on the child bean. This allows hierarchical data binding — a screen can populate an entire list of repeating rows from a single invocation chain, with each row's fields addressed by composite keys like "item_count/0", "item_count/1", "true_value/0/field_name", etc.

## 2. Processing Pattern (Detailed Business Logic)

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

    START --> CHECK_NULL["Check if key or subkey is null"]
    CHECK_NULL -->|Yes| END_RETURN["Return early"]
    CHECK_NULL -->|No| FIND_SEP["Find first slash separator position"]

    FIND_SEP --> COND_TYPE["Check key type"]

    COND_TYPE -->|"item_count"| BRANCH1
    COND_TYPE -->|"sel_index"| BRANCH2
    COND_TYPE -->|"true_value"| BRANCH3
    COND_TYPE -->|"label_value"| BRANCH4
    COND_TYPE -->|Unknown| END_FALL

    BRANCH1["Block 1: item_count Long type"] --> P1_SUBSTR["Extract index from key after slash"]
    P1_SUBSTR --> P1_PARSE["Parse index as Integer"]
    P1_PARSE --> P1_VALID{"Index valid?"}
    P1_VALID -->|Yes| P1_BOUNDS{"Index within list_size_list?"}
    P1_VALID -->|No| P1_END1["No action invalid index"]
    P1_BOUNDS -->|Yes| P1_STORE["Cast to X33VDataTypeLongBean, call storeModelData"]
    P1_BOUNDS -->|No| P1_END2["No action out of bounds"]
    P1_STORE --> END_RETURN
    P1_END1 --> END_RETURN
    P1_END2 --> END_RETURN

    BRANCH2["Block 2: sel_index Long type"] --> P2_SUBSTR["Extract index from key after slash"]
    P2_SUBSTR --> P2_PARSE["Parse index as Integer"]
    P2_PARSE --> P2_VALID{"Index valid?"}
    P2_VALID -->|Yes| P2_BOUNDS{"Index within sel_index_list?"}
    P2_VALID -->|No| P2_END1["No action invalid index"]
    P2_BOUNDS -->|Yes| P2_STORE["Cast to X33VDataTypeLongBean, call storeModelData"]
    P2_BOUNDS -->|No| P2_END2["No action out of bounds"]
    P2_STORE --> END_RETURN
    P2_END1 --> END_RETURN
    P2_END2 --> END_RETURN

    BRANCH3["Block 3: true_value String type"] --> P3_SUBSTR["Extract index from key after slash"]
    P3_SUBSTR --> P3_PARSE["Parse index as Integer"]
    P3_PARSE --> P3_VALID{"Index valid?"}
    P3_VALID -->|Yes| P3_BOUNDS{"Index within true_value_list?"}
    P3_VALID -->|No| P3_END1["No action invalid index"]
    P3_BOUNDS -->|Yes| P3_STORE["Cast to X33VDataTypeStringBean, call storeModelData"]
    P3_BOUNDS -->|No| P3_END2["No action out of bounds"]
    P3_STORE --> END_RETURN
    P3_END1 --> END_RETURN
    P3_END2 --> END_RETURN

    BRANCH4["Block 4: label_value String type"] --> P4_SUBSTR["Extract index from key after slash"]
    P4_SUBSTR --> P4_PARSE["Parse index as Integer"]
    P4_PARSE --> P4_VALID{"Index valid?"}
    P4_VALID -->|Yes| P4_BOUNDS{"Index within label_value_list?"}
    P4_VALID -->|No| P4_END1["No action invalid index"]
    P4_BOUNDS -->|Yes| P4_STORE["Cast to X33VDataTypeStringBean, call storeModelData"]
    P4_BOUNDS -->|No| P4_END2["No action out of bounds"]
    P4_STORE --> END_RETURN
    P4_END1 --> END_RETURN
    P4_END2 --> END_RETURN
```

**Processing Flow Summary:**

1. **Null Guard** (L320-322): If `key` or `subkey` is null, the method exits immediately — no processing occurs (key, subkey that null case, processing stop / null case, processing stop (null caseの場合は処理を中断)).
2. **Key Parsing** (L324): Extract the position of the first "/" separator from the key. This splits the item-type prefix from the list-index suffix.
3. **Type Dispatch** (L327-420): Four `if-else if` branches check the item type:
   - **Block 1 (L327-349)**: If key equals "item_count" (項目数), route to `list_size_list`.
   - **Block 2 (L352-374)**: If key equals "sel_index" (選択値), route to `sel_index_list`.
   - **Block 3 (L377-399)**: If key equals "true_value" (項目実値), route to `true_value_list`.
   - **Block 4 (L402-420)**: If key equals "label_value" (項目ラベル), route to `label_value_list`.

Each block follows the identical pattern: extract index from key, parse as integer, validate bounds, then delegate to the typed bean.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | Composite key encoding both an **item type category** and a **list index**, separated by "/". The item type prefix (before "/") determines which internal list the data is routed to. Valid prefixes are: "item_count" (items count for repeating rows), "sel_index" (selected option index for dropdowns), "true_value" (actual data value), and "label_value" (display label text). Example: "item_count/0" targets the 0th element of the item_count list. This enables flat-key-based population of structured UI form data. |
| 2 | `subkey` | `String` | The sub-field name within the target data bean. After the index is extracted and the child bean is selected, this becomes the field-level key for the recursive `storeModelData(subkey, in_value, ...)` call. For example, if the key is "item_count/0", the subkey identifies which property on the LongBean to set (e.g., a field like "value" or a business field name). |
| 3 | `in_value` | `Object` | The data value to be stored into the target bean's property. The actual type depends on the data category: for item_count and sel_index (Long type), this is typically a String representation of a long integer; for true_value and label_value (String type), this is the actual string data. |
| 4 | `isSetAsString` | `boolean` | When true, indicates that the value should be set as a String property on a Long-type item's Value property. This controls the type coercion behavior in the child bean's storeModelData method. Defaulted to `false` by the no-flag overload. |

**Instance Fields Read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `list_size_list` | `X33VDataTypeList` | List of item-count beans (Long type). Holds the count of items for each repeating section/row in the form. |
| `sel_index_list` | `X33VDataTypeList` | List of selection-index beans (Long type). Holds which option is selected in dropdown/radio groups per row. |
| `true_value_list` | `X33VDataTypeList` | List of data-value beans (String type). Holds the actual data values for form fields. |
| `label_value_list` | `X33VDataTypeList` | List of label beans (String type). Holds display labels for form fields. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `FUW00110SF01DBean.storeModelData` | FUW00110SF01DBean | - | Recursive call to storeModelData on child bean (X33VDataTypeLongBean or X33VDataTypeStringBean) |

**Detailed Call Analysis:**

This method performs **no database or external service operations**. It is a pure **in-memory data routing utility** within the X33V bean framework. All method calls are recursive invocations on child data beans:

| # | Called Method | Target Class | Parameters | Description |
|---|--------------|--------------|------------|-------------|
| 1 | `storeModelData(subkey, in_value, isSetAsString)` | `X33VDataTypeLongBean` (Block 1, 2) | subkey, in_value, isSetAsString | Recursive delegation: sets the subfield value on a Long-type bean. The isSetAsString flag controls type coercion. |
| 2 | `storeModelData(subkey, in_value)` | `X33VDataTypeStringBean` (Block 3, 4) | subkey, in_value | Recursive delegation: sets the subfield value on a String-type bean (no isSetAsString parameter). |

**Classification:** This method is a **data assignment/update utility**. It does not perform R/U/D on persistent storage. It updates the in-memory state of X33V data beans.

## 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: `storeModelData` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-], `storeModelData` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW00110SF01DBean.storeModelData` (self-recursive) | Parent bean `storeModelData(key, subkey, in_value, isSetAsString)` -> Cast to child bean -> Child bean `storeModelData(subkey, in_value, isSetAsString)` | `storeModelData` [U] In-memory X33VBean (list_size_list, sel_index_list) |
| 2 | `FUW00110SF01DBean.storeModelData` (self-recursive) | Parent bean `storeModelData(key, subkey, in_value)` -> Overload delegates to 4-param version -> Child bean `storeModelData(subkey, in_value)` | `storeModelData` [U] In-memory X33VBean (true_value_list, label_value_list) |
| 3 | `FUW00110SF01DBean.storeModelData` (entry point) | External screen/framework invokes `storeModelData` with composite key -> Routes to typed list -> Delegates to child bean | `storeModelData` [U] In-memory X33VBean |

**Caller Details:**
- The primary callers are **self-referential**: this method calls itself on child beans (X33VDataTypeLongBean, X33VDataTypeStringBean), creating a recursive delegation chain that walks down the bean tree.
- The method is likely invoked by the **X33V framework** itself during screen rendering or form initialization, where the framework populates bean properties by calling `storeModelData` with composite keys.
- The no-flag overload `storeModelData(String key, String subkey, Object in_value)` internally calls the 4-param version with `isSetAsString=false`, providing a simpler entry point for callers that don't need type coercion.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (condition: key equals "item_count" / 項目数) `(L327)`

> Routes data to the item-count list (Long type). This manages the count of repeating form sections/rows.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `int separaterPoint = key.indexOf("/")` // Find first slash position |
| 2 | SET | `key = key.substring(separaterPoint + 1)` // Extract portion after "/" (e.g., "0" from "item_count/0") |
| 3 | SET | `Integer tmpIndexInt = null` // Initialize index parser variable |
| 4 | EXEC | `tmpIndexInt = Integer.valueOf(key)` // Parse index string as Integer |
| 5 | CATCH | `catch(NumberFormatException e)` // If index is not a numeric string, keep tmpIndexInt as null |
| 6 | SET | `tmpIndexInt = null` // Explicit null on parse failure (index value is not a numeric string) |
| 7 | IF | `tmpIndexInt != null` // Index value is a numeric string (L342) |
| 8 | SET | `int tmpIndex = tmpIndexInt.intValue()` // Convert Integer to int primitive |
| 9 | IF | `tmpIndex >= 0 && tmpIndex < list_size_list.size()` // Index within list bounds (L343) |
| 10 | CALL | `((X33VDataTypeLongBean)list_size_list.get(tmpIndex)).storeModelData(subkey, in_value, isSetAsString)` // Cast to LongBean and delegate |

**Block 1.1** — IF (nested: tmpIndexInt != null) `(L342)`

> Guard: only proceed if index parsing succeeded.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` // int conversion |
| 2 | IF | `tmpIndex >= 0 && tmpIndex < list_size_list.size()` // Bounds check |

**Block 1.2** — IF (nested: within list_size_list bounds) `(L343)`

> Delegate to the Long-type child bean at the extracted index.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `((X33VDataTypeLongBean)list_size_list.get(tmpIndex)).storeModelData(subkey, in_value, isSetAsString)` // Cast and delegate to child bean |

---

**Block 2** — ELSE-IF (condition: key equals "sel_index" / 選択値) `(L352)`

> Routes data to the selection-index list (Long type). This manages which option is selected in dropdowns/radio groups per row.

| # | Type | Code |
|---|------|------|
| 1 | SET | `key = key.substring(separaterPoint + 1)` // Extract index from key after "/" |
| 2 | SET | `Integer tmpIndexInt = null` // Initialize index parser |
| 3 | EXEC | `tmpIndexInt = Integer.valueOf(key)` // Parse index string as Integer |
| 4 | CATCH | `catch(NumberFormatException e)` // Keep null on parse failure |
| 5 | SET | `tmpIndexInt = null` // Explicit null on parse failure |
| 6 | IF | `tmpIndexInt != null` // Index parsing succeeded (L367) |
| 7 | SET | `int tmpIndex = tmpIndexInt.intValue()` // int conversion |
| 8 | IF | `tmpIndex >= 0 && tmpIndex < sel_index_list.size()` // Index within sel_index_list bounds (L368) |
| 9 | CALL | `((X33VDataTypeLongBean)sel_index_list.get(tmpIndex)).storeModelData(subkey, in_value, isSetAsString)` // Cast and delegate |

**Block 2.1** — IF (nested: tmpIndexInt != null) `(L367)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` |
| 2 | IF | `tmpIndex >= 0 && tmpIndex < sel_index_list.size()` // Bounds check against sel_index_list |

**Block 2.2** — IF (nested: within sel_index_list bounds) `(L368)`

| # | Type | Code |
|---|------|------|
| 1 | CALL | `((X33VDataTypeLongBean)sel_index_list.get(tmpIndex)).storeModelData(subkey, in_value, isSetAsString)` // Delegate to LongBean |

---

**Block 3** — ELSE-IF (condition: key equals "true_value" / 項目実値) `(L377)`

> Routes data to the true-value list (String type). This manages the actual data values for form fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `key = key.substring(separaterPoint + 1)` // Extract index from key after "/" |
| 2 | SET | `Integer tmpIndexInt = null` // Initialize index parser |
| 3 | EXEC | `tmpIndexInt = Integer.valueOf(key)` // Parse index string as Integer |
| 4 | CATCH | `catch(NumberFormatException e)` // Keep null on parse failure |
| 5 | SET | `tmpIndexInt = null` // Explicit null on parse failure |
| 6 | IF | `tmpIndexInt != null` // Index parsing succeeded (L402) |
| 7 | SET | `int tmpIndex = tmpIndexInt.intValue()` // int conversion |
| 8 | IF | `tmpIndex >= 0 && tmpIndex < true_value_list.size()` // Index within true_value_list bounds (L403) |
| 9 | CALL | `((X33VDataTypeStringBean)true_value_list.get(tmpIndex)).storeModelData(subkey, in_value)` // Cast to StringBean, delegate (no isSetAsString) |

**Block 3.1** — IF (nested: tmpIndexInt != null) `(L402)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` |
| 2 | IF | `tmpIndex >= 0 && tmpIndex < true_value_list.size()` // Bounds check against true_value_list |

**Block 3.2** — IF (nested: within true_value_list bounds) `(L403)`

| # | Type | Code |
|---|------|------|
| 1 | CALL | `((X33VDataTypeStringBean)true_value_list.get(tmpIndex)).storeModelData(subkey, in_value)` // Delegate to StringBean |

---

**Block 4** — ELSE-IF (condition: key equals "label_value" / 項目ラベル) `(L408)`

> Routes data to the label-value list (String type). This manages display labels for form fields.

| # | Type | Code |
|---|------|------|
| 1 | SET | `key = key.substring(separaterPoint + 1)` // Extract index from key after "/" |
| 2 | SET | `Integer tmpIndexInt = null` // Initialize index parser |
| 3 | EXEC | `tmpIndexInt = Integer.valueOf(key)` // Parse index string as Integer |
| 4 | CATCH | `catch(NumberFormatException e)` // Keep null on parse failure |
| 5 | SET | `tmpIndexInt = null` // Explicit null on parse failure |
| 6 | IF | `tmpIndexInt != null` // Index parsing succeeded (L433) |
| 7 | SET | `int tmpIndex = tmpIndexInt.intValue()` // int conversion |
| 8 | IF | `tmpIndex >= 0 && tmpIndex < label_value_list.size()` // Index within label_value_list bounds (L434) |
| 9 | CALL | `((X33VDataTypeStringBean)label_value_list.get(tmpIndex)).storeModelData(subkey, in_value)` // Cast to StringBean, delegate (no isSetAsString) |

**Block 4.1** — IF (nested: tmpIndexInt != null) `(L433)`

| # | Type | Code |
|---|------|------|
| 1 | SET | `int tmpIndex = tmpIndexInt.intValue()` |
| 2 | IF | `tmpIndex >= 0 && tmpIndex < label_value_list.size()` // Bounds check against label_value_list |

**Block 4.2** — IF (nested: within label_value_list bounds) `(L434)`

| # | Type | Code |
|---|------|------|
| 1 | CALL | `((X33VDataTypeStringBean)label_value_list.get(tmpIndex)).storeModelData(subkey, in_value)` // Delegate to StringBean |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| 項目数 (item_count) | Japanese Field | Item Count — the number of rows/items in a repeating form section. Stored as Long type, managed via `list_size_list`. |
| 選択値 (sel_index) | Japanese Field | Selection Value — the index of the currently selected option in a dropdown or radio group. Stored as Long type, managed via `sel_index_list`. |
| 項目実値 (true_value) | Japanese Field | Item True Value — the actual data value stored in a form field. Stored as String type, managed via `true_value_list`. |
| 項目ラベル (label_value) | Japanese Field | Item Label Value — the display label text for a form field (what the user sees). Stored as String type, managed via `label_value_list`. |
| X33V | Framework | Fujitsu Futurity X33V Web Application Framework — the enterprise web framework used to build the screen layer. |
| X33VDataTypeList | Type | A framework list container that holds typed data beans (Long, String, Boolean) for UI data binding. |
| X33VDataTypeLongBean | Type | A Long-type data bean in the X33V framework. Holds numeric values and provides `storeModelData` for property assignment. |
| X33VDataTypeStringBean | Type | A String-type data bean in the X33V framework. Holds string values and provides `storeModelData` for property assignment. |
| X33VDataTypeBeanInterface | Interface | Framework interface that defines the contract for all X33V data type beans, including `storeModelData`. |
| X33VListedBeanInterface | Interface | Framework interface for beans that contain list-type data properties. |
| subkey | Parameter | Sub-key — the field name within a child data bean. After the parent routes to the correct list and index, the subkey identifies which property to set on the child bean. |
| isSetAsString | Parameter | String-set flag — when true, forces String-type assignment on a Long-type bean's Value property. Used for type coercion scenarios. |
| key | Parameter | Composite key — a "/"-delimited string encoding an item type (e.g., "item_count") and a list index (e.g., "0"). Used to address a specific element in a typed list. |
| FUW00110SF | Module | Form/UI Module code — the screen module this bean belongs to. The "FUW" prefix denotes a web form screen. |
| DBean | Suffix | Data Bean — the naming convention for X33V framework data-binding classes that manage screen state. |
