# Business Logic — FUW00921SF01DBean.loadModelData() [39 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00921SF.FUW00921SF01DBean` |
| Layer | View / Data Bean (Controller-adjacent — inherits from `X31CBaseBean`, implements `X33VDataTypeBeanInterface`) |
| Module | `FUW00921SF` (Package: `eo.web.webview.FUW00921SF`) |

## 1. Role

### FUW00921SF01DBean.loadModelData()

This method is a **data routing/dispatch entry point** used by the K-Opticom X33 web framework to load model data for the "Personal Confirmation Document" (ご本人様確認書類) screen component. It implements a **key-based delegation pattern**: given a `key` (the business data item name) and a `subkey` (the data facet — value, enable state, or UI state), it routes the request to the appropriate bean getter and returns the result.

The method handles **two screen data item types** for the FUW00921SF service:
1. **Personal Confirmation Document Code List** (ご本人様確認書類コードリスト) — a list of document type codes used for identity verification (e.g., driver's license, health insurance card).
2. **Personal Confirmation Document Name List** (ご本人様確認書類名称リスト) — a parallel list of human-readable document names matching the code list.

For each type, the method supports three **sub-facets**: `value` (the actual data values), `enable` (whether the field is enabled/enabled for editing), and `state` (the UI/validated state of the field). This triad pattern mirrors the common JSF/PrimeFaces data-binding model where each list field exposes its value, enabled status, and validation state.

The method is called by the X33 framework's view-data loading lifecycle (via `X33VDataTypeBeanInterface`) when screens iterate over list-based components and need to resolve data attributes on demand. If no matching key-subkey combination is found, it returns `null` gracefully, allowing the framework to skip or default the field.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START["loadModelData key subkey"]

    START --> NPE_CHECK

    NPE_CHECK -->|true| RET_NULL1[return null]
    NPE_CHECK -->|false| FIND_SLASH

    FIND_SLASH --> COND1

    COND1 -->|true| SUB1
    COND1 -->|false| COND2

    SUB1 -->|value| CALL_VAL1[getConfirm_document_cd_list_value]
    SUB1 -->|enable| CALL_EN1[getConfirm_document_cd_list_enabled]
    SUB1 -->|state| CALL_ST1[getConfirm_document_cd_list_state]
    SUB1 -->|other| RET_NULL2[return null]

    COND2 -->|true| SUB2
    COND2 -->|false| RET_NULL3[return null]

    SUB2 -->|value| CALL_VAL2[getConfirm_document_nm_list_value]
    SUB2 -->|enable| CALL_EN2[getConfirm_document_nm_list_enabled]
    SUB2 -->|state| CALL_ST2[getConfirm_document_nm_list_state]
    SUB2 -->|other| RET_NULL4[return null]

    RET_NULL1 --> END_RETURN[Return Next]
    CALL_VAL1 --> END_RETURN
    CALL_EN1 --> END_RETURN
    CALL_ST1 --> END_RETURN
    RET_NULL2 --> END_RETURN
    CALL_VAL2 --> END_RETURN
    CALL_EN2 --> END_RETURN
    CALL_ST2 --> END_RETURN
    RET_NULL3 --> END_RETURN
    RET_NULL4 --> END_RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business data item name that identifies which list component the caller is querying. Acceptable values: `ご本人様確認書類コードリスト` (Personal Confirmation Document Code List) or `ご本人様確認書類名称リスト` (Personal Confirmation Document Name List). An unknown or `null` value causes the method to return `null`. |
| 2 | `subkey` | `String` | The data facet to retrieve for the given key. Case-insensitive matching is used. Acceptable values: `value` (returns the list data values), `enable` (returns the enabled/disabled state of the field), `state` (returns the UI validation status). `null` causes the method to return `null`. |

**Instance fields / external state read:**
- `confirm_document_cd_list_value` — String field holding the confirmation document code list data values.
- `confirm_document_cd_list_enabled` — Boolean field holding the enabled state for the code list.
- `confirm_document_cd_list_state` — String field holding the validation/UI state for the code list.
- `confirm_document_nm_list_value` — String field holding the confirmation document name list data values.
- `confirm_document_nm_list_enabled` — Boolean field holding the enabled state for the name list.
- `confirm_document_nm_list_state` — String field holding the validation/UI state for the name list.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `FUW00921SF01DBean.getConfirm_document_cd_list_value` | FUW00921SF01DBean | - | Returns the value of `confirm_document_cd_list_value` field (local field read, no DB access) |
| R | `FUW00921SF01DBean.getConfirm_document_cd_list_enabled` | FUW00921SF01DBean | - | Returns the value of `confirm_document_cd_list_enabled` field (local field read, no DB access) |
| R | `FUW00921SF01DBean.getConfirm_document_cd_list_state` | FUW00921SF01DBean | - | Returns the value of `confirm_document_cd_list_state` field (local field read, no DB access) |
| R | `FUW00921SF01DBean.getConfirm_document_nm_list_value` | FUW00921SF01DBean | - | Returns the value of `confirm_document_nm_list_value` field (local field read, no DB access) |
| R | `FUW00921SF01DBean.getConfirm_document_nm_list_enabled` | FUW00921SF01DBean | - | Returns the value of `confirm_document_nm_list_enabled` field (local field read, no DB access) |
| R | `FUW00921SF01DBean.getConfirm_document_nm_list_state` | FUW00921SF01DBean | - | Returns the value of `confirm_document_nm_list_state` field (local field read, no DB access) |

**Analysis:** This method performs **no Create, Update, or Delete (CUD) operations**. All six method calls are **Read (R)** operations that simply return the values of instance fields on the bean itself. This is a **pure data routing method** — it does not interact with any database, CBS (Central Business System), or SC (Service Component). The actual data population of these fields occurs elsewhere (likely in a screen's load/initialize method or a parent bean). The framework calls `loadModelData` as a getter delegation mechanism to support dynamic data binding on list components.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Framework: X33VViewBaseBean | `X33VViewBaseBean.loadModelData` (framework lifecycle) -> `FUW00921SF01DBean.loadModelData` | `getConfirm_document_cd_list_value [R] confirm_document_cd_list_value (field)`, `getConfirm_document_nm_list_value [R] confirm_document_nm_list_value (field)` |
| 2 | *No direct callers found in FUW00921SF package* | — | — |

**Note:** This method is not directly invoked by any known screen class within the `FUW00921SF` module. It is a framework-level interface implementation — the X33 view framework calls it internally when iterating over list components and resolving field values. The callers in other modules (e.g., `FUW00912SF`, `FUW00926SF`) define *their own* `loadModelData` methods (each in their respective `*SF01DBean.java` or `*SFBean.java` classes) that follow a similar key-based dispatch pattern but handle different data items.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(key == null || subkey == null)` (L146)

> Null guard: If either parameter is null, the method returns null immediately.
> (key, subkeyがnullの場合、nullを返す — When key and subkey are null, return null)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // 項目がnullの場合、nullを返す [When a key or subkey is null, return null] |

**Block 2** — [EXEC] `(key.indexOf("/") extraction)` (L149)

> Extracts the position of the first "/" character in the key. This value is computed but never used in the current code — it may have been intended for future hierarchical key support (e.g., `"parent/child"` style keys).

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // unused variable [項目ごとに処理を入れる — Insert processing per item] |

**Block 3** — [IF-ELSEIF-ELSE] `(key.equals("ご本人様確認書類コードリスト"))` (L152)

> First major branch: handles the Personal Confirmation Document Code List data item.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String confirm_doc_cd_list = "ご本人様確認書類コードリスト"` // Data type item key for the code list [データタイプがStringの項目 "ご本人様確認書類コードリスト" — Item whose data type is String "Personal Confirmation Document Code List"] |

**Block 3.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L153)

> Sub-branch: retrieves the actual document code values for the confirmation document code list.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return getConfirm_document_cd_list_value();` // Return the confirm_document_cd_list_value getter result |

**Block 3.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("enable"))` (L156)

> Sub-branch: retrieves the enabled/disabled state for the confirmation document code list field.
> (subkeyが"enable"の場合、confirm_document_cd_list_enableのgetterの戻り値を返す — When subkey is "enable", return the confirm_document_cd_list_enable getter result)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return getConfirm_document_cd_list_enabled();` // Return enabled state |

**Block 3.3** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L159)

> Sub-branch: retrieves the UI/validation state for the confirmation document code list field.
> (subkeyが"state"の場合、ステータスを返す — When subkey is "state", return the status)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return getConfirm_document_cd_list_state();` // Return state |

**Block 4** — [ELSE-IF] `(key.equals("ご本人様確認書類名称リスト"))` (L163)

> Second major branch: handles the Personal Confirmation Document Name List data item.
> (データタイプがStringの項目"ご本人様確認書類名称リスト" — Item whose data type is String "Personal Confirmation Document Name List")

| # | Type | Code |
|---|------|------|
| 1 | SET | `String confirm_doc_nm_list = "ご本人様確認書類名称リスト"` // Data type item key for the name list [データタイプがStringの項目 "ご本人様確認書類名称リスト" — Item whose data type is String "Personal Confirmation Document Name List"] |

**Block 4.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L164)

> Sub-branch: retrieves the actual document name values for the confirmation document name list.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return getConfirm_document_nm_list_value();` // Return the confirm_document_nm_list_value getter result |

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

> Sub-branch: retrieves the enabled/disabled state for the confirmation document name list field.
> (subkeyが"enable"の場合、confirm_document_nm_list_enableのgetterの戻り値を返す — When subkey is "enable", return the confirm_document_nm_list_enable getter result)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return getConfirm_document_nm_list_enabled();` // Return enabled state |

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

> Sub-branch: retrieves the UI/validation state for the confirmation document name list field.
> (subkeyが"state"の場合、ステータスを返す — When subkey is "state", return the status)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `return getConfirm_document_nm_list_state();` // Return state |

**Block 5** — [ELSE] `(no matching key)` (L175)

> Fallback: No matching key was found in the properties. Return null.
> (条件に一致するプロパティが存在しない場合は、nullを返す — When no matching property exists, return null)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // No matching property found |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ご本人様確認書類コードリスト` | Field/Key | Personal Confirmation Document Code List — the list of coded document types (e.g., "01" = Driver's License, "02" = Health Insurance Card) used for identity verification during service contract |
| `ご本人様確認書類名称リスト` | Field/Key | Personal Confirmation Document Name List — human-readable names corresponding to the document codes (e.g., "運転免許証" = Driver's License, "健康保険証" = Health Insurance Card) |
| `value` | Subkey | Data facet requesting the actual list data values for a screen field |
| `enable` | Subkey | Data facet requesting the enabled/disabled (editable) state of a screen field |
| `state` | Subkey | Data facet requesting the UI validation status of a screen field (e.g., "", "error", "warning") |
| `confirm_document_cd_list` | Field | Internal bean field prefix for confirmation document code list data, state, and enabled fields |
| `confirm_document_nm_list` | Field | Internal bean field prefix for confirmation document name list data, state, and enabled fields |
| X33 | Acronym | K-Opticom's proprietary web framework (Fujitsu Futurity X33) used for building JSF-based screen applications |
| DBean | Acronym | Data Bean — a JavaBean that holds screen data and implements framework interfaces for data binding and lifecycle management |
| `X33VDataTypeBeanInterface` | Interface | X33 framework interface that requires `loadModelData(String key, String subkey)` implementation for dynamic data resolution |
| `X31CBaseBean` | Class | Base bean class providing common utilities and properties shared across all X31/X33 screen beans |
| FUW | Acronym | Function / Form Unit Web — K-Opticom's screen module naming convention (FUW = Web screen module) |
| 項目 (koumoku) | Japanese term | Item / field — a screen data element that holds input or display values |
| サブキー (sabukii) | Japanese term | Sub-key — the facet or dimension of a data item being queried |
| ステータス (suteetasu) | Japanese term | Status — the current validation or display state of a screen field |
| データタイプ (deeta taipu) | Japanese term | Data type — the type classification of a screen item (e.g., String, Boolean, List) |
| プロパティ (puropeguti) | Japanese term | Property — a configurable screen element defined in XML or annotation |
