# Business Logic — CRW02702SF03DBean.loadModelData() [63 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW02702SF.CRW02702SF03DBean` |
| Layer | Controller / Data Bean (View layer — part of the X33V web framework's view-data binding layer) |
| Module | `CRW02702SF` (Package: `eo.web.webview.CRW02702SF`) |

## 1. Role

### CRW02702SF03DBean.loadModelData()

This method serves as a **data access router** within the X33V view-data binding framework, implementing the `loadModelData` contract defined by the framework's data bean interface. Its business purpose is to **provide read access to correspondence history external connection (URL) fields** — specifically, URL values, URL identifiers, URL type classification codes, URL type code labels, and the URL base itself — all of which relate to linking a correspondence history record to external web resources in K-Opticom's telecom service ordering system. The method implements a **double-dispatch routing pattern**: it first resolves the `key` parameter to determine which field domain is being queried, then resolves the `subkey` parameter to determine whether the caller wants the raw field value or its state/validity indicator. It delegates to eight internal getter accessor methods (`getL1_taiorrk_out_url_no_value`, `getL1_taiorrk_out_url_no_state`, etc.) that read from the bean's internal state. If no matching property pair is found, it returns `null`. This method is **invoked by the X33V framework** during page rendering when the view layer needs to retrieve field data from the backing bean for display in the "Correspondence History External Connection URL List" section (item ID: `ecr0451b010cbsmsg1list`) of the CRW02702SF screen, which handles external connection URL configuration for service order correspondence records.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["loadModelData key, subkey"])

    START --> C1["Condition: key == null || subkey == null"]
    C1 -->|true| NULL1["Return null"]
    C1 -->|false| FIND1["key.indexOf('/') -> separaterPoint"]

    FIND1 --> K1["Condition: key equals '対応履歴外部接続URL番号'"]
    K1 -->|true| SUB1["Condition: subkey equalsIgnoreCase 'value' or 'state'"]
    SUB1 -->|value| R1["Return getL1_taiorrk_out_url_no_value"]
    SUB1 -->|state| R2["Return getL1_taiorrk_out_url_no_state"]

    K1 -->|false| K2["Condition: key equals '対応履歴外部接続URL種別コード'"]
    K2 -->|true| SUB2["Condition: subkey equalsIgnoreCase 'value' or 'state'"]
    SUB2 -->|value| R3["Return getL1_taiorrk_out_url_sbt_cd_value"]
    SUB2 -->|state| R4["Return getL1_taiorrk_out_url_sbt_cd_state"]

    K2 -->|false| K3["Condition: key equals '対応履歴外部接続URL種別コード名'"]
    K3 -->|true| SUB3["Condition: subkey equalsIgnoreCase 'value' or 'state'"]
    SUB3 -->|value| R5["Return getL1_taiorrk_out_url_sbt_cd_nm_value"]
    SUB3 -->|state| R6["Return getL1_taiorrk_out_url_sbt_cd_nm_state"]

    K3 -->|false| K4["Condition: key equals '対応履歴外部接続URL'"]
    K4 -->|true| SUB4["Condition: subkey equalsIgnoreCase 'value' or 'state'"]
    SUB4 -->|value| R7["Return getL1_taiorrk_out_url_value"]
    SUB4 -->|state| R8["Return getL1_taiorrk_out_url_state"]

    K4 -->|false| K5["Condition: key equals '対応履歴外部接続URL名'"]
    K5 -->|true| SUB5["Condition: subkey equalsIgnoreCase 'value' or 'state'"]
    SUB5 -->|value| R9["Return getL1_taiorrk_out_url_nm_value"]
    SUB5 -->|state| R10["Return getL1_taiorrk_out_url_nm_state"]

    K5 -->|false| NULL2["No matching property -> Return null"]
    R1 --> END(["Return Object"])
    R2 --> END
    R3 --> END
    R4 --> END
    R5 --> END
    R6 --> END
    R7 --> END
    R8 --> END
    R9 --> END
    R10 --> END
    NULL1 --> END
    NULL2 --> END
```

**Processing Steps:**

1. **Null guard** — If either `key` or `subkey` is `null`, return `null` immediately (no further processing).
2. **Separator detection** — Compute `separaterPoint = key.indexOf("/")`. This value is calculated but **never used** within this method (possibly a remnant of a prior design or future extension).
3. **Key dispatch (5 branches)** — The method dispatches based on the exact value of `key`, supporting five distinct field domains:
   - `key = "対応履歴外部接続URL番号"` (Correspondence History External Connection URL Number) → resolves to item ID `l1_taiorrk_out_url_no`
   - `key = "対応履歴外部接続URL種別コード"` (Correspondence History External Connection URL Type Code) → resolves to item ID `l1_taiorrk_out_url_sbt_cd`
   - `key = "対応履歴外部接続URL種別コード名"` (Correspondence History External Connection URL Type Code Name) → resolves to item ID `l1_taiorrk_out_url_sbt_cd_nm`
   - `key = "対応履歴外部接続URL"` (Correspondence History External Connection URL) → resolves to item ID `l1_taiorrk_out_url`
   - `key = "対応履歴外部接続URL名"` (Correspondence History External Connection URL Name) → resolves to item ID `l1_taiorrk_out_url_nm`
4. **Subkey resolution (2 sub-branches per key)** — Within each key branch, dispatch on `subkey` (case-insensitive):
   - `subkey = "value"` (matched via `equalsIgnoreCase("value")`) → return the raw field value from the corresponding `_value` getter
   - `subkey = "state"` (matched via `equalsIgnoreCase("state")`) → return the state/validity indicator from the corresponding `_state` getter
5. **Fallback** — If none of the key/subkey combinations match, return `null`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The item name (field domain identifier) that specifies which correspondence history external connection field to access. Determines the processing branch. Values: `"対応履歴外部接続URL番号"` (URL number), `"対応履歴外部接続URL種別コード"` (URL type code), `"対応履歴外部接続URL種別コード名"` (URL type code label), `"対応履歴外部接続URL"` (URL base), `"対応履歴外部接続URL名"` (URL name). Maps to internal item IDs like `l1_taiorrk_out_url_no`, `l1_taiorrk_out_url_sbt_cd`, etc. |
| 2 | `subkey` | `String` | The sub-identifier that determines what aspect of the field to return: `"value"` returns the raw data value, `"state"` returns the validity/state indicator. Matched case-insensitively. |

**Internal State Read:**
- The method reads internal bean state through getter accessor calls (`getL1_taiorrk_out_url_*_value`, `getL1_taiorrk_out_url_*_state`). These getters access the bean's internal fields storing the URL field values and their validation states for the correspondence history external connection section.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_no_value` | CRW02702SF03DBean | - | Returns the stored URL number value field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_no_state` | CRW02702SF03DBean | - | Returns the state/validity indicator for the URL number field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_sbt_cd_value` | CRW02702SF03DBean | - | Returns the stored URL type code value field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_sbt_cd_state` | CRW02702SF03DBean | - | Returns the state/validity indicator for the URL type code field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_sbt_cd_nm_value` | CRW02702SF03DBean | - | Returns the stored URL type code name label value field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_sbt_cd_nm_state` | CRW02702SF03DBean | - | Returns the state/validity indicator for the URL type code name field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_value` | CRW02702SF03DBean | - | Returns the stored URL base value field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_state` | CRW02702SF03DBean | - | Returns the state/validity indicator for the URL base field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_nm_value` | CRW02702SF03DBean | - | Returns the stored URL name value field |
| R | `CRW02702SF03DBean.getL1_taiorrk_out_url_nm_state` | CRW02702SF03DBean | - | Returns the state/validity indicator for the URL name field |

All 10 method calls are **Read (R)** operations — they are internal bean getter accessors that return field values or their validation state indicators. There are no external service calls, CBS invocations, or database operations performed by this method.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:CRW02702SF | `CRW02702SFBean.createItem` → instantiate `CRW02702SF03DBean` for `ecr0451b010cbsmsg1list` → X33V framework invokes `loadModelData(key, subkey)` | `getL1_taiorrk_out_url_no_value [R] -`<br>`getL1_taiorrk_out_url_no_state [R] -`<br>`getL1_taiorrk_out_url_sbt_cd_value [R] -`<br>`getL1_taiorrk_out_url_sbt_cd_state [R] -`<br>`getL1_taiorrk_out_url_sbt_cd_nm_value [R] -`<br>`getL1_taiorrk_out_url_sbt_cd_nm_state [R] -`<br>`getL1_taiorrk_out_url_value [R] -`<br>`getL1_taiorrk_out_url_state [R] -`<br>`getL1_taiorrk_out_url_nm_value [R] -`<br>`getL1_taiorrk_out_url_nm_state [R] -` |

**Caller Details:**
- The primary caller is the **CRW02702SF screen** (`CRW02702SFBean`), which instantiates `CRW02702SF03DBean` as a data-type bean within the "Correspondence History External Connection URL List Details" list section (item ID: `ecr0451b010cbsmsg1list`). The X33V view framework then calls `loadModelData` to retrieve field data during page rendering.
- `CRW02702SFBean.createItem(String key)` (line ~1284) creates a new `CRW02702SF03DBean` instance when the key is `"対応履歴外部接続URL一覧照会明细"` (Correspondence History External Connection URL List Inquiry Details) and adds it to `ecr0451b010cbsmsg1list_list`.

## 6. Per-Branch Detail Blocks

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

> Null guard: if either parameter is null, return null immediately to avoid NullPointerException on subsequent string comparisons.

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` |
| 2 | IF | `if (key == null || subkey == null)` |
| 3 | RETURN | `return null;` // key, subkey that are null — return null |

**Block 2** — IF-ELSE-IF-ELSE-IF-ELSE-IF-ELSE-IF-ELSE (key dispatch) `(key.equals("対応履歴外部接続URL番号"))` (L217)

> Key branch 1: Correspondence History External Connection URL Number. Dispatches to the URL number field getters.

| # | Type | Code |
|---|------|------|
| 1 | IF-ELSE | `if (key.equals("対応履歴外部接続URL番号"))` |
| 2 | IF | `if (subkey.equalsIgnoreCase("value"))` — subkey is "value" |
| 3 | CALL | `return getL1_taiorrk_out_url_no_value()` |
| 4 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` — subkey is "state" |
| 5 | CALL | `return getL1_taiorrk_out_url_no_state();` // if subkey is "state", return the state |
| 6 | ELSE-IF | `else if (key.equals("対応履歴外部接続URL種別コード"))` |

**Block 2.1** — nested IF-ELSE (subkey resolution for URL Number) (L218)

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (subkey.equalsIgnoreCase("value"))` |
| 2 | RETURN | `return getL1_taiorrk_out_url_no_value();` |
| 3 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` |
| 4 | RETURN | `return getL1_taiorrk_out_url_no_state();` |

**Block 2.2** — IF-ELSE-IF-ELSE (key branch 2: URL Type Code) (L229)

> Key branch 2: Correspondence History External Connection URL Type Code. Dispatches to the URL type code field getters.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (key.equals("対応履歴外部接続URL種別コード"))` |
| 2 | IF | `if (subkey.equalsIgnoreCase("value"))` |
| 3 | CALL | `return getL1_taiorrk_out_url_sbt_cd_value();` |
| 4 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` // if subkey is "state", return the state |
| 5 | CALL | `return getL1_taiorrk_out_url_sbt_cd_state();` |

**Block 2.3** — IF-ELSE-IF-ELSE (key branch 3: URL Type Code Name) (L239)

> Key branch 3: Correspondence History External Connection URL Type Code Name. Dispatches to the URL type code name field getters.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (key.equals("対応履歴外部接続URL種別コード名"))` |
| 2 | IF | `if (subkey.equalsIgnoreCase("value"))` |
| 3 | CALL | `return getL1_taiorrk_out_url_sbt_cd_nm_value();` |
| 4 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` // if subkey is "state", return the state |
| 5 | CALL | `return getL1_taiorrk_out_url_sbt_cd_nm_state();` |

**Block 2.4** — IF-ELSE-IF-ELSE (key branch 4: URL Base) (L249)

> Key branch 4: Correspondence History External Connection URL (base URL). Dispatches to the URL base field getters.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (key.equals("対応履歴外部接続URL"))` |
| 2 | IF | `if (subkey.equalsIgnoreCase("value"))` |
| 3 | CALL | `return getL1_taiorrk_out_url_value();` |
| 4 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` // if subkey is "state", return the state |
| 5 | CALL | `return getL1_taiorrk_out_url_state();` |

**Block 2.5** — IF-ELSE-IF-ELSE (key branch 5: URL Name) (L259)

> Key branch 5: Correspondence History External Connection URL Name. Dispatches to the URL name field getters.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (key.equals("対応履歴外部接続URL名"))` |
| 2 | IF | `if (subkey.equalsIgnoreCase("value"))` |
| 3 | CALL | `return getL1_taiorrk_out_url_nm_value();` |
| 4 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` // if subkey is "state", return the state |
| 5 | CALL | `return getL1_taiorrk_out_url_nm_state();` |

**Block 3** — ELSE (fallback) (L268)

> No matching property was found for the given key/subkey combination — return null.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // If there is no matching property, return null |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `対応履歴外部接続URL番号` | Field (key value) | Correspondence History External Connection URL Number — the identifier for an external URL linked to a correspondence history record |
| `対応履歴外部接続URL種別コード` | Field (key value) | Correspondence History External Connection URL Type Code — classification code for the type of external connection URL |
| `対応履歴外部接続URL種別コード名` | Field (key value) | Correspondence History External Connection URL Type Code Name — human-readable label for the URL type code |
| `対応履歴外部接続URL` | Field (key value) | Correspondence History External Connection URL — the base URL itself |
| `対応履歴外部接続URL名` | Field (key value) | Correspondence History External Connection URL Name — the name/label of the URL |
| `l1_taiorrk_out_url_no` | Item ID | Internal item identifier for the URL number field |
| `l1_taiorrk_out_url_sbt_cd` | Item ID | Internal item identifier for the URL type code field |
| `l1_taiorrk_out_url_sbt_cd_nm` | Item ID | Internal item identifier for the URL type code name field |
| `l1_taiorrk_out_url` | Item ID | Internal item identifier for the URL base field |
| `l1_taiorrk_out_url_nm` | Item ID | Internal item identifier for the URL name field |
| `ecr0451b010cbsmsg1list` | Item ID | The list item ID for the "Correspondence History External Connection URL List Details" data-type bean collection within CRW02702SFBean |
| CRW02702SF | Module | Screen module for correspondence history external connection URL management in K-Opticom's telecom service ordering system |
| X33V | Framework | Fujitsu Futurity X33V web framework — the MVC-based web application framework providing data-type bean, view, and data binding capabilities |
| data-type bean | Pattern | A framework-managed bean that stores and exposes field values and state for individual items in a list, implementing `X33VDataTypeBeanInterface` |
| value | Subkey | Request for the raw field data value |
| state | Subkey | Request for the validation/availability state indicator of a field |
