---
# Business Logic -- CRW03407SF02DBean.loadModelData() [52 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW03407SF.CRW03407SF02DBean` |
| Layer | Data Bean / View Component (Controller layer -- X33 framework DataBean) |
| Module | `CRW03407SF` (Package: `eo.web.webview.CRW03407SF`) |

## 1. Role

### CRW03407SF02DBean.loadModelData()

`loadModelData` is a **model data routing (dispatch) method** that implements the `X33VDataTypeBeanInterface` contract for the K-Opticom web framework. It serves as a **property-based data accessor** that returns business values for configurable UI form fields by key-subkey lookup. Specifically, it supports three **data item types**: Tab Code (タブコード, the unique identifier for a tab panel), Tab Name (タブ名称, the display label of a tab panel), and Screen ID (画面ID, the internal page identifier). For each item type, it supports three **sub-property accesses**: `value` (the current data value), `enable` (whether the field is enabled for user interaction), and `state` (the component's validation/error state). This method acts as a **delegation layer** between the X33 framework's typed-data-bean infrastructure and the bean's internal fields, enabling the framework to dynamically bind tab metadata to form components without compile-time field references. It is called by the parent screen bean `CRW03407SFBean` during tab-repeat list initialization (itemID `ecr0301b010cbsmsg1list`) to populate per-tab metadata for the "Business-Specific Settings by Organization Tab Overview Meeting Details" screen (業務個別設定組織別タブ一覧照会詳細).

## 2. Processing Pattern (Detailed Business Logic)

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

    START --> CHECK_NULL["Check: key == null || subkey == null"]
    CHECK_NULL -->|Yes| RETURN_NULL_1["Return null"]
    CHECK_NULL -->|No| FIND_SLASH["Find '/' in key"]

    FIND_SLASH --> TAB_CD["key equals 'タブコード'"]
    TAB_CD -->|Yes| SUBKEY_CHECK_1{"subkey equals"}
    TAB_CD -->|No| TAB_NM["key equals 'タブ名称'"]

    SUBKEY_CHECK_1 -->|value (case-insensitive)| GET_TAB_CD_VAL["getL1_tab_cd_value"]
    SUBKEY_CHECK_1 -->|enable (case-insensitive)| GET_TAB_CD_EN["getL1_tab_cd_enabled"]
    SUBKEY_CHECK_1 -->|state (case-insensitive)| GET_TAB_CD_ST["getL1_tab_cd_state"]

    GET_TAB_CD_VAL --> END_RETURN["Return / Next"]
    GET_TAB_CD_EN --> END_RETURN
    GET_TAB_CD_ST --> END_RETURN

    TAB_NM -->|Yes| SUBKEY_CHECK_2{"subkey equals"}
    TAB_NM -->|No| PG_ID["key equals '画面ID'"]

    SUBKEY_CHECK_2 -->|value (case-insensitive)| GET_TAB_NM_VAL["getL1_tab_nm_value"]
    SUBKEY_CHECK_2 -->|enable (case-insensitive)| GET_TAB_NM_EN["getL1_tab_nm_enabled"]
    SUBKEY_CHECK_2 -->|state (case-insensitive)| GET_TAB_NM_ST["getL1_tab_nm_state"]

    GET_TAB_NM_VAL --> END_RETURN
    GET_TAB_NM_EN --> END_RETURN
    GET_TAB_NM_ST --> END_RETURN

    PG_ID -->|Yes| SUBKEY_CHECK_3{"subkey equals"}
    PG_ID -->|No| RETURN_NULL_2["Return null"]

    SUBKEY_CHECK_3 -->|value (case-insensitive)| GET_PG_ID_VAL["getL1_pg_id_value"]
    SUBKEY_CHECK_3 -->|enable (case-insensitive)| GET_PG_ID_EN["getL1_pg_id_enabled"]
    SUBKEY_CHECK_3 -->|state (case-insensitive)| GET_PG_ID_ST["getL1_pg_id_state"]

    GET_PG_ID_VAL --> END_RETURN
    GET_PG_ID_EN --> END_RETURN
    GET_PG_ID_ST --> END_RETURN
```

**Block descriptions:**

- **Null Guard (L183):** If either `key` or `subkey` is `null`, the method returns `null` immediately. This prevents `NullPointerException` on subsequent string operations and is the standard null-safety contract for X33 framework data beans.
- **Separator Scan (L187):** `key.indexOf("/")` is computed but **never used** in this method. The variable `separaterPoint` is unused -- likely leftover scaffolding from a future feature that was intended to split a compound key (e.g., `"type/subkey"`).
- **Three Data Item Type Dispatches:** Each top-level branch checks `key` against a Japanese string literal, then dispatches to the appropriate getter based on `subkey` (case-insensitive comparison).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The **item type identifier** -- a human-readable Japanese string that selects which tab metadata property to resolve. Valid values: `"タブコード"` (Tab Code), `"タブ名称"` (Tab Name), `"画面ID"` (Screen ID). The key determines which of the three metadata groups (tab code, tab name, screen ID) the method will access. |
| 2 | `subkey` | `String` | The **sub-property selector** within the matched item type. Case-insensitive. Valid values: `"value"` (returns the current data value), `"enable"` (returns whether the field is enabled for editing), `"state"` (returns the component validation state string). |

**Internal fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `l1_tab_cd_value` | `String` | Current tab code value (initializes to empty string `""`) |
| `l1_tab_cd_enabled` | `Boolean` | Tab code field enabled/disabled flag (defaults to `false`) |
| `l1_tab_cd_state` | `String` | Tab code field validation/state message (initializes to `""`) |
| `l1_tab_nm_value` | `String` | Current tab name display label (initializes to `""`) |
| `l1_tab_nm_enabled` | `Boolean` | Tab name field enabled/disabled flag (defaults to `false`) |
| `l1_tab_nm_state` | `String` | Tab name field validation/state message (initializes to `""`) |
| `l1_pg_id_value` | `String` | Screen ID value (initializes to `""`) |
| `l1_pg_id_enabled` | `Boolean` | Screen ID field enabled/disabled flag (defaults to `false`) |
| `l1_pg_id_state` | `String` | Screen ID field validation/state message (initializes to `""`) |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `CRW03407SF02DBean.getL1_pg_id_enabled` | CRW03407SF02DBean | - | Returns `l1_pg_id_enabled` field -- Screen ID enable status |
| R | `CRW03407SF02DBean.getL1_pg_id_state` | CRW03407SF02DBean | - | Returns `l1_pg_id_state` field -- Screen ID validation state |
| R | `CRW03407SF02DBean.getL1_pg_id_value` | CRW03407SF02DBean | - | Returns `l1_pg_id_value` field -- Screen ID data value |
| R | `CRW03407SF02DBean.getL1_tab_cd_enabled` | CRW03407SF02DBean | - | Returns `l1_tab_cd_enabled` field -- Tab code enable status |
| R | `CRW03407SF02DBean.getL1_tab_cd_state` | CRW03407SF02DBean | - | Returns `l1_tab_cd_state` field -- Tab code validation state |
| R | `CRW03407SF02DBean.getL1_tab_cd_value` | CRW03407SF02DBean | - | Returns `l1_tab_cd_value` field -- Tab code data value |
| R | `CRW03407SF02DBean.getL1_tab_nm_enabled` | CRW03407SF02DBean | - | Returns `l1_tab_nm_enabled` field -- Tab name enable status |
| R | `CRW03407SF02DBean.getL1_tab_nm_state` | CRW03407SF02DBean | - | Returns `l1_tab_nm_state` field -- Tab name validation state |
| R | `CRW03407SF02DBean.getL1_tab_nm_value` | CRW03407SF02DBean | - | Returns `l1_tab_nm_value` field -- Tab name data value |

**CRUD Classification:** All 9 method calls are **Read (R)** operations. This method performs **zero writes** (no Create, Update, or Delete). It exclusively delegates to internal getter methods that return fields already populated by earlier processing steps in the screen lifecycle (typically by CBS calls in the parent `CRW03407SFBean`).

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:CRW03407SF | `CRW03407SFBean.addRepeatItem` ("業務個別設定組織別タブ一覧照会詳細") -> `new CRW03407SF02DBean` -> `X33 framework invokes loadModelData` | `getL1_tab_cd_value [R] in-memory field`, `getL1_tab_nm_value [R] in-memory field`, `getL1_pg_id_value [R] in-memory field` |

**Caller context:** The method is instantiated as a **data-repeat child bean** within the parent screen bean `CRW03407SFBean`. The parent creates a `CRW03407SF02DBean` instance and adds it to the `ecr0301b010cbsmsg1list_list` repeat list. The X33 framework then calls `loadModelData` on each instance to populate form field values during screen rendering. There are **no direct programmatic callers** from application code -- access is entirely through the X33 framework's typed-data-bean mechanism.

## 6. Per-Branch Detail Blocks

**Block 1** -- [IF] `(key == null || subkey == null)` (L183)

> Null guard: if either parameter is null, return null immediately to prevent NullPointerException.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // key or subkey is null -- early exit |

**Block 2** -- [EXEC] `key.indexOf("/")` (L187)

> Computes the position of "/" in key. The result is stored in `separaterPoint` but never used -- likely scaffolding for a future compound-key format.

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/");` // separator position -- UNUSED |

**Block 3** -- [IF-ELSE-IF] key dispatch: `"タブコード"` (Tab Code) (L191)
> `[タブコード = "タブコード"]` (Japanese: Tab Code -- the item ID `l1_tab_cd`)

| # | Type | Code |
|---|------|------|
| 1 | IF | `key.equals("タブコード")` // Check if item type is Tab Code |

**Block 3.1** -- [IF] `subkey.equalsIgnoreCase("value")` (L192)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_tab_cd_value();` // Returns tab code display value |

**Block 3.2** -- [ELSE-IF] `subkey.equalsIgnoreCase("enable")` (L195)
> // subkeyが"enable"の場合、l1_tab_cd_enableのgetterの戻り値を返す。 (English: When subkey is "enable", return the value of l1_tab_cd_enable getter.)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_tab_cd_enabled();` // Returns tab code enabled flag |

**Block 3.3** -- [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L198)
> // subkeyが"state"の場合、ステータスを返す。 (English: When subkey is "state", return the status.)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_tab_cd_state();` // Returns tab code validation state |

**Block 4** -- [ELSE-IF] key dispatch: `"タブ名称"` (Tab Name) (L204)
> `[タブ名称 = "タブ名称"]` (Japanese: Tab Name -- the item ID `l1_tab_nm`)

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("タブ名称")` // Check if item type is Tab Name |

**Block 4.1** -- [IF] `subkey.equalsIgnoreCase("value")` (L205)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_tab_nm_value();` // Returns tab name display label |

**Block 4.2** -- [ELSE-IF] `subkey.equalsIgnoreCase("enable")` (L208)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_tab_nm_enabled();` // Returns tab name enabled flag |

**Block 4.3** -- [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L211)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_tab_nm_state();` // Returns tab name validation state |

**Block 5** -- [ELSE-IF] key dispatch: `"画面ID"` (Screen ID) (L217)
> `[画面ID = "画面ID"]` (Japanese: Screen ID -- the item ID `l1_pg_id`)

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `key.equals("画面ID")` // Check if item type is Screen ID |

**Block 5.1** -- [IF] `subkey.equalsIgnoreCase("value")` (L218)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_pg_id_value();` // Returns screen ID value |

**Block 5.2** -- [ELSE-IF] `subkey.equalsIgnoreCase("enable")` (L221)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_pg_id_enabled();` // Returns screen ID enabled flag |

**Block 5.3** -- [ELSE-IF] `subkey.equalsIgnoreCase("state")` (L224)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return getL1_pg_id_state();` // Returns screen ID validation state |

**Block 6** -- [ELSE] No match (L230)
> // 条件に一致するプロパティが存在しない場合は、nullを返す。 (English: If no matching property exists, return null.)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // No key matched any known item type |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `l1_tab_cd_value` | Field | Tab Code value -- the unique identifier string for a tab panel in the screen layout |
| `l1_tab_cd_enabled` | Field | Tab Code enabled flag -- `true` if the tab code field is editable, `false` if read-only |
| `l1_tab_cd_state` | Field | Tab Code validation state -- a string indicating validation status (e.g., error message or empty string) |
| `l1_tab_nm_value` | Field | Tab Name value -- the human-readable display label for a tab panel |
| `l1_tab_nm_enabled` | Field | Tab Name enabled flag -- `true` if the tab name field is editable, `false` if read-only |
| `l1_tab_nm_state` | Field | Tab Name validation state -- validation/error message string for the tab name field |
| `l1_pg_id_value` | Field | Screen ID value -- the internal page identifier for the current screen |
| `l1_pg_id_enabled` | Field | Screen ID enabled flag -- `true` if the screen ID field is editable, `false` if read-only |
| `l1_pg_id_state` | Field | Screen ID validation state -- validation/error message string for the screen ID field |
| タブコード (`tab_koodo`) | Field | Tab Code -- a Japanese term for the tab identifier. The unique key identifying a tab panel within the screen's tabbed interface |
| タブ名称 (`tab_meishou`) | Field | Tab Name -- a Japanese term for the tab display label. The human-readable title shown on a tab button |
| 画面ID (`gamen_aaidee`) | Field | Screen ID -- a Japanese term for the screen identifier. The internal page reference used by the framework to track navigation state |
| loadModelData | Method | Framework entry point -- the X33 framework calls this method to populate form field values from the bean's model during screen rendering. Implements `X33VDataTypeBeanInterface.loadModelData` |
| subkey | Parameter | Case-insensitive property selector. `"value"` returns data, `"enable"` returns editability, `"state"` returns validation info |
| CRW03407SF | Module | K-Opticom screen module for "Business-Specific Settings by Organization Tab Overview" (業務個別設定組織別タブ一覧照会). A telecom operations management screen for viewing and editing organization-specific tab configurations |
| X33 framework | Technical | Fujitsu Futurity X33 web application framework -- the enterprise Java web framework providing the typed-data-bean lifecycle, repeat-list pattern, and automatic form binding |
| X33VDataTypeBeanInterface | Technical | Interface from the X33 framework that defines `loadModelData(String key, String subkey)` for dynamic property-based data access in typed-data-beans |
| X33VListedBeanInterface | Technical | Interface from the X33 framework that enables a bean to participate in repeat-list structures (multiple instances of the same bean within a parent data list) |
| ecr0301b010cbsmsg1list | Constant/ID | Item ID for the "Business-Specific Settings by Organization Tab Overview Meeting Details" data-repeat list. This is the key used in the parent bean's `addRepeatItem` method to instantiate `CRW03407SF02DBean` |
| X31CBaseBean | Technical | Base class from the X31 framework providing common screen-component functionality including exception creation (`createExceptionForX31Method`) |
