# Business Logic — CRW02702SF03DBean.storeModelData() [61 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW02702SF.CRW02702SF03DBean` |
| Layer | Controller / Web View Bean (Layer inferred from package: `eo.web.webview.*`) |
| Module | `CRW02702SF` (Package: `eo.web.webview.CRW02702SF`) |

## 1. Role

### CRW02702SF03DBean.storeModelData()

This method serves as a **centralized key-value routing dispatcher** for the `CRW02702SF` screen (Support History External Connection URL management). Its purpose is to store data into the appropriate typed field of the view bean based on a string-key / subkey pair, acting as a bridge between generic data-passing mechanisms (e.g., form model bindings, AJAX payloads) and the strongly-typed properties of the bean. The method handles five distinct item categories — all related to external URL connection history records — and within each category, it dispatches to either a `*_value` setter (for the data payload) or a `*_state` setter (for the field state metadata, such as visibility or enabled/disabled flags). It implements a **switch-dispatch design pattern** using hardcoded Japanese string keys as discriminators, meaning the mapping between key strings and setter methods is fixed and known at compile time. The method is a **shared utility** within the bean, called by two internal overloads of `storeModelData` (parameterless variants) to push model data into typed fields during screen initialization or postback processing. It does **not** perform any database access, SC calls, or business computation — it is purely a data-routing and type-casting layer that casts `Object in_value` to `String` before delegating to the setter.

## 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 (no-op)"]
    CHECK_NULL -->|false| FIND_SEP["Find: separaterPoint = key.indexOf('/')"]

    FIND_SEP --> KEY_CHECK["key.equals(対応履歴外部接続URL番号)"]
    KEY_CHECK -->|true| BRANCH1["Branch: URL番号"]
    KEY_CHECK -->|false| BRANCH2_CHECK["key.equals(対応履歴外部接続URL種別コード)"]

    BRANCH2_CHECK -->|true| BRANCH2["Branch: URL種別コード"]
    BRANCH2_CHECK -->|false| BRANCH3_CHECK["key.equals(対応履歴外部接続URL種別コード名)"]

    BRANCH3_CHECK -->|true| BRANCH3["Branch: URL種別コード名"]
    BRANCH3_CHECK -->|false| BRANCH4_CHECK["key.equals(対応履歴外部接続URL)"]

    BRANCH4_CHECK -->|true| BRANCH4["Branch: URL"]
    BRANCH4_CHECK -->|false| BRANCH5_CHECK["key.equals(対応履歴外部接続URL名)"]

    BRANCH5_CHECK -->|true| BRANCH5["Branch: URL名"]
    BRANCH5_CHECK -->|false| FALLTHROUGH["No match - no-op"]

    BRANCH1 --> SUB1_CHECK["subkey.equalsIgnoreCase(value)"]
    SUB1_CHECK -->|true| SET1_VALUE["setL1_taiorrk_out_url_no_value(in_value)"]
    SUB1_CHECK -->|false| SET1_STATE["setL1_taiorrk_out_url_no_state(in_value)"]

    BRANCH2 --> SUB2_CHECK["subkey.equalsIgnoreCase(value)"]
    SUB2_CHECK -->|true| SET2_VALUE["setL1_taiorrk_out_url_sbt_cd_value(in_value)"]
    SUB2_CHECK -->|false| SET2_STATE["setL1_taiorrk_out_url_sbt_cd_state(in_value)"]

    BRANCH3 --> SUB3_CHECK["subkey.equalsIgnoreCase(value)"]
    SUB3_CHECK -->|true| SET3_VALUE["setL1_taiorrk_out_url_sbt_cd_nm_value(in_value)"]
    SUB3_CHECK -->|false| SET3_STATE["setL1_taiorrk_out_url_sbt_cd_nm_state(in_value)"]

    BRANCH4 --> SUB4_CHECK["subkey.equalsIgnoreCase(value)"]
    SUB4_CHECK -->|true| SET4_VALUE["setL1_taiorrk_out_url_value(in_value)"]
    SUB4_CHECK -->|false| SET4_STATE["setL1_taiorrk_out_url_state(in_value)"]

    BRANCH5 --> SUB5_CHECK["subkey.equalsIgnoreCase(value)"]
    SUB5_CHECK -->|true| SET5_VALUE["setL1_taiorrk_out_url_nm_value(in_value)"]
    SUB5_CHECK -->|false| SET5_STATE["setL1_taiorrk_out_url_nm_state(in_value)"]

    SET1_STATE --> END_NODE(["Return"])
    SET1_VALUE --> END_NODE
    SET2_STATE --> END_NODE
    SET2_VALUE --> END_NODE
    SET3_STATE --> END_NODE
    SET3_VALUE --> END_NODE
    SET4_STATE --> END_NODE
    SET4_VALUE --> END_NODE
    SET5_STATE --> END_NODE
    SET5_VALUE --> END_NODE
    FALLTHROUGH --> END_NODE
    EARLY_RETURN --> END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The item name (項目名) that identifies which URL-related field to target. Values are fixed Japanese strings corresponding to one of five URL fields: "対応履歴外部接続URL番号" (URL Number), "対応履歴外部接続URL種別コード" (URL Category Code), "対応履歴外部接続URL種別コード名" (URL Category Code Name), "対応履歴外部接続URL" (URL), "対応履歴外部接続URL名" (URL Name). The method uses exact string matching to route to the correct branch. |
| 2 | `subkey` | `String` | The sub-key that selects whether to set the field's **data value** or its **state metadata**. Takes values "value" (stores the actual data) or "state" (stores field state such as display enable/disable flags). Comparison is case-insensitive. |
| 3 | `in_value` | `Object` | The data to store. Always cast to `String` at the call site of the setter. Carries the actual business data — either the URL value (number, URL string, category code, category code name, or name) or the state flag string. |
| 4 | `isSetAsString` | `boolean` | A flag indicating whether the data should be treated as a String type when setting Long-type item properties. Per the Javadoc: "Long型項目ValueプロパティへString型値の設定を行う場合true" (true when setting a String-type value to a Long-type item Value property). **Note: this parameter is accepted but never used within the method body** — the entire method casts to `(String)` regardless. |

**Instance fields / external state read:** None. The method does not read any instance fields or external state. It is a pure dispatch method that delegates entirely to setter methods.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_no_value` | - | - | Sets the URL number value field (対応履歴外部接続URL番号) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_no_state` | - | - | Sets the URL number state field (対応履歴外部接続URL番号ステータス) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_sbt_cd_value` | - | - | Sets the URL category code value field (対応履歴外部接続URL種別コード) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_sbt_cd_state` | - | - | Sets the URL category code state field (対応履歴外部接続URL種別コードステータス) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_sbt_cd_nm_value` | - | - | Sets the URL category code name value field (対応履歴外部接続URL種別コード名) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_sbt_cd_nm_state` | - | - | Sets the URL category code name state field (対応履歴外部接続URL種別コード名ステータス) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_value` | - | - | Sets the URL value field (対応履歴外部接続URL) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_state` | - | - | Sets the URL state field (対応履歴外部接続URLステータス) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_nm_value` | - | - | Sets the URL name value field (対応履歴外部接続URL名) |
| U | `CRW02702SF03DBean.setL1_taiorrk_out_url_nm_state` | - | - | Sets the URL name state field (対応履歴外部接続URL名ステータス) |

**Analysis:** This method performs **no Create, Read, or Delete** operations. All 10 called methods are setter operations (`set*`) on the view bean's own fields, classifying them as **Update (U)** operations on in-memory view state. No SC (Service Component), CBS (Business Service), Entity, or DB table is accessed. This method is purely a bean-level data-routing utility.

## 5. Dependency Trace

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `CRW02702SF03DBean.storeModelData()` (overload) | Caller overload → `CRW02702SF03DBean.storeModelData(String, String, Object, boolean)` | `setL1_taiorrk_out_url_no_value [U] bean field` |
| 2 | `CRW02702SF03DBean.storeModelData()` (overload) | Caller overload → `CRW02702SF03DBean.storeModelData(String, String, Object, boolean)` | `setL1_taiorrk_out_url_nm_state [U] bean field` |

**Terminal operations from this method:** `setL1_taiorrk_out_url_no_state [-]`, `setL1_taiorrk_out_url_no_value [-]`, `setL1_taiorrk_out_url_sbt_cd_state [-]`, `setL1_taiorrk_out_url_sbt_cd_value [-]`, `setL1_taiorrk_out_url_sbt_cd_nm_state [-]`, `setL1_taiorrk_out_url_sbt_cd_nm_value [-]`, `setL1_taiorrk_out_url_state [-]`, `setL1_taiorrk_out_url_value [-]`, `setL1_taiorrk_out_url_nm_state [-]`, `setL1_taiorrk_out_url_nm_value [-]`.

Note: The terminal operations are all bean field setters — there is no downstream SC/CBS/DB chain from this method.

## 6. Per-Branch Detail Blocks

### Block 1 — IF `(key == null || subkey == null)` (L310)

> Early-exit guard: if either the item name key or the subkey is null, the method terminates immediately without processing. This prevents `NullPointerException` in subsequent operations.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return;` // key, subkey がnullの場合、処理を中止 (If key/subkey is null, abort processing) |

### Block 2 — SET `(key.indexOf("/") detection)` (L313)

> Extracts the position of the first "/" separator in the key string. Note: this value is computed but **never used** in the method body — likely leftover/dead code from a prior implementation that parsed hierarchical keys.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // Unused variable — dead code |

### Block 3 — ELSE-IF `[key.equals("対応履歴外部接続URL番号")]` (L317)

> First branch: handles the **URL Number** item (item ID: `l1_taiorrk_out_url_no`). Dispatches to either the value setter or the state setter based on whether subkey is "value" (case-insensitive).

#### Block 3.1 — IF `(subkey.equalsIgnoreCase("value"))` (L318)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_no_value((String)in_value);` // subkey が"value"の場合、データを設定 (If subkey is "value", set the data) |

#### Block 3.2 — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L321)

> Subkey is "state" — stores field state metadata (display enable/disable status) rather than data value.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_no_state((String)in_value);` // subkey が"state"の場合、ステータスを返す (If subkey is "state", return/set the status) |

### Block 4 — ELSE-IF `[key.equals("対応履歴外部接続URL種別コード")]` (L326)

> Second branch: handles the **URL Category Code** item (item ID: `l1_taiorrk_out_url_sbt_cd`). Dispatches to value or state setter.

#### Block 4.1 — IF `(subkey.equalsIgnoreCase("value"))` (L327)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_sbt_cd_value((String)in_value);` // subkey が"value"の場合、データを設定 (If subkey is "value", set the data) |

#### Block 4.2 — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L330)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_sbt_cd_state((String)in_value);` // subkey が"state"の場合、ステータスを返す (If subkey is "state", return/set the status) |

### Block 5 — ELSE-IF `[key.equals("対応履歴外部接続URL種別コード名")]` (L335)

> Third branch: handles the **URL Category Code Name** item (item ID: `l1_taiorrk_out_url_sbt_cd_nm`). Dispatches to value or state setter.

#### Block 5.1 — IF `(subkey.equalsIgnoreCase("value"))` (L336)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_sbt_cd_nm_value((String)in_value);` // subkey が"value"の場合、データを設定 (If subkey is "value", set the data) |

#### Block 5.2 — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L339)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_sbt_cd_nm_state((String)in_value);` // subkey が"state"の場合、ステータスを返す (If subkey is "state", return/set the status) |

### Block 6 — ELSE-IF `[key.equals("対応履歴外部接続URL")]` (L344)

> Fourth branch: handles the **URL** item (item ID: `l1_taiorrk_out_url`). Dispatches to value or state setter.

#### Block 6.1 — IF `(subkey.equalsIgnoreCase("value"))` (L345)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_value((String)in_value);` // subkey が"value"の場合、データを設定 (If subkey is "value", set the data) |

#### Block 6.2 — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L348)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_state((String)in_value);` // subkey が"state"の場合、ステータスを返す (If subkey is "state", return/set the status) |

### Block 7 — ELSE-IF `[key.equals("対応履歴外部接続URL名")]` (L353)

> Fifth (final) branch: handles the **URL Name** item (item ID: `l1_taiorrk_out_url_nm`). Dispatches to value or state setter.

#### Block 7.1 — IF `(subkey.equalsIgnoreCase("value"))` (L354)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_nm_value((String)in_value);` // subkey が"value"の場合、データを設定 (If subkey is "value", set the data) |

#### Block 7.2 — ELSE-IF `(subkey.equalsIgnoreCase("state"))` (L357)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `setL1_taiorrk_out_url_nm_state((String)in_value);` // subkey が"state"の場合、ステータスを返す (If subkey is "state", return/set the status) |

### Block 8 — IMPLICIT FALLTHROUGH (L360)

> If `key` does not match any of the five known Japanese item names, the method simply falls through to the end without action. No exception is thrown.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `}` // Method end — no action for unrecognized key (処理なし) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `対応履歴外部接続URL番号` | Field | URL Number (Support History External Connection) — the URL number field ID: `l1_taiorrk_out_url_no` |
| `対応履歴外部接続URL種別コード` | Field | URL Category Code — classifies the type/category of external URL connection: `l1_taiorrk_out_url_sbt_cd` |
| `対応履歴外部接続URL種別コード名` | Field | URL Category Code Name — the human-readable name for a URL category: `l1_taiorrk_out_url_sbt_cd_nm` |
| `対応履歴外部接続URL` | Field | External Connection URL — the raw URL string for external service connection: `l1_taiorrk_out_url` |
| `対応履歴外部接続URL名` | Field | External Connection URL Name — the display name of the URL: `l1_taiorrk_out_url_nm` |
| `l1_taiorrk_out_url` | Field | Screen field ID for external connection URL (line 1, support history, out-bound URL) |
| `l1_taiorrk_out_url_no` | Field | Screen field ID for external connection URL number |
| `l1_taiorrk_out_url_sbt_cd` | Field | Screen field ID for external connection URL subcategory code (種別 = type/category) |
| `l1_taiorrk_out_url_sbt_cd_nm` | Field | Screen field ID for external connection URL subcategory code name |
| `l1_taiorrk_out_url_nm` | Field | Screen field ID for external connection URL name |
| `CRW02702SF` | Module | Screen module for managing Support History External Connection URL settings |
| DBean | Abbreviation | Display Bean — a view-scoped bean holding form data for a single screen |
| value | Subkey | Stores the actual business data payload into the target field |
| state | Subkey | Stores field-level metadata (visibility, enabled/disabled status) for UI rendering |
| key | Parameter | The item name (項目名) discriminator — maps to one of five URL-related bean fields |
