# Business Logic — FUW07101SF03DBean.typeModelData() [23 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW07101SF.FUW07101SF03DBean` |
| Layer | Web View / Data Type Bean (UI binding layer) |
| Module | `FUW07101SF` (Package: `eo.web.webview.FUW07101SF`) |

## 1. Role

### FUW07101SF03DBean.typeModelData()

This method is the data-type resolution callback of the `X33VDataTypeBeanInterface` implementation for the **Recipient List** (`送信先リスト`) UI component in the FUW07101SF service screen. Its business purpose is to return the Java class type (`Class<?>`) corresponding to a given field name (`key`) and sub-key (`subkey`) combination, enabling the X33V framework's data-type binding mechanism to correctly render and validate model data on the web view.

The method implements a **routing/dispatch pattern**: it matches the `key` parameter against a specific business field ("送信先メールアドレス" — Recipient Email Address), then dispatches to a type lookup based on the `subkey` parameter ("value" or "state"). This allows the framework to distinguish between the raw email address value and a status/state indicator derived from the same logical field.

As a shared utility within the X33V bean architecture, this method does not perform any data access, CRUD operations, or service calls. Instead, it acts as a declarative type mapper that the X33V framework invokes during view model initialization and data-binding phases. If the provided key does not match a recognized field, or if the subkey is unrecognized, the method returns `null`, signaling to the framework that no explicit type mapping is available.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData key, subkey"])
    COND_NULL["key == null<br/>||<br/>subkey == null"]
    RETURN_NULL(["return null"])
    SEPARATOR["int separaterPoint = key.indexOf('/')"]
    COND_KEY["key.equals('送信先メールアドレス')"]
    COND_SUBKEY["subkey.equalsIgnoreCase('value')"]
    RETURN_STRING_VALUE(["return String.class"])
    COND_STATE["subkey.equalsIgnoreCase('state')"]
    RETURN_STRING_STATE(["return String.class"])
    RETURN_FALLBACK(["return null"])

    START --> COND_NULL
    COND_NULL -->|true| RETURN_NULL
    COND_NULL -->|false| SEPARATOR
    SEPARATOR --> COND_KEY
    COND_KEY -->|true| COND_SUBKEY
    COND_KEY -->|false| RETURN_FALLBACK
    COND_SUBKEY -->|true| RETURN_STRING_VALUE
    COND_SUBKEY -->|false| COND_STATE
    COND_STATE -->|true| RETURN_STRING_STATE
    COND_STATE -->|false| RETURN_FALLBACK
```

**CRITICAL — Constant Resolution:**

No framework constants are used in this method. All string comparisons use literal values directly:

- The `key` condition checks against the literal Japanese string `"送信先メールアドレス"` (Recipient Email Address) — no constant reference.
- The `subkey` conditions check against the literal strings `"value"` and `"state"` — no constant reference.

The variable `separaterPoint` is computed but never used in any subsequent conditional branch, representing a likely dead code artifact.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The field name (項目名) identifying which UI data field to resolve the type for. In this method, it is matched against the Japanese literal `"送信先メールアドレス"` (Recipient Email Address), which represents the email address of the message recipient in the service screen's data model. |
| 2 | `subkey` | `String` | The sub-key identifying a sub-property within the field. The method supports two values: `"value"` (the actual email address string) and `"state"` (a status indicator describing the delivery or validation state of the recipient address). |

**No instance fields or external state** are read by this method. It is a pure function — its return value depends entirely on the two input parameters.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and **calls no services**. It is a pure type-resolution utility with no side effects, database access, or inter-component communication. It exists solely to serve the X33V framework's data binding mechanism.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (none) | — | — | — | This method contains no service calls, database queries, or data mutations. |

## 5. Dependency Trace

This method is invoked through the `X33VDataTypeBeanInterface.typeModelData()` contract. The X33V framework calls it during view model initialization to determine the Java types for binding fields. The instantiation context is managed by the parent bean `FUW07101SFBean`.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:FUW07101SF | `FUW07101SFBean` -> (X33V framework) -> `typeModelData(key, subkey)` | N/A — no CRUD endpoints |

**Call Chain Detail:**

The parent bean `FUW07101SFBean` manages a list of data-type beans via the field `mlad_list_list` (Recipient List, item ID: `mlad_list`). When the key equals `"送信先リスト"` (Recipient List), the framework creates `FUW07101SF03DBean` instances and adds them to this list. The X33V framework then invokes `typeModelData()` on these instances during view rendering, passing field names like `"送信先メールアドレス"` and sub-keys like `"value"` or `"state"`.

```
FUW07101SFBean (screen controller)
  |-- mlad_list_list.add(new FUW07101SF03DBean())
  |    (when key == "送信先リスト")
  |
  +-- X33V framework invokes typeModelData(mlad, subkey)
       on each FUW07101SF03DBean instance
```

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null check) `(key == null || subkey == null)` (L199)

> Guard clause: if either input is null, return null immediately. This prevents NullPointerException on subsequent operations.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // key or subkey is null — no type mapping available |

**Block 2** — SET (separator computation) (L202)

> Computes the index of "/" in `key`. This value is never used in any subsequent logic, indicating dead code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/")` // dead code — value never used |

**Block 3** — IF (key match) `key.equals("送信先メールアドレス")` (L205)

> Main dispatch: checks if the field name matches the Recipient Email Address field. This is the only recognized key in this method.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key.equals("送信先メールアドレス"))` // [JAPANESE_LITERAL: "送信先メールアドレス" = Recipient Email Address] (L205) |

**Block 3.1** — IF-ELSE-IF (subkey: value) `(subkey.equalsIgnoreCase("value"))` (L206)

> When subkey is "value", return `String.class` — the raw email address is a string type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(subkey.equalsIgnoreCase("value"))` (L206) |
| 2 | RETURN | `return String.class;` // email address value is a String type (L207) |

**Block 3.2** — ELSE-IF (subkey: state) `(subkey.equalsIgnoreCase("state"))` (L209)

> When subkey is "state", return `String.class` — the delivery/status indicator is also a string type. The comment notes: state is returned when subkey is "state" (`subkeyが"state"の場合、ステータスを返す`).

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if(subkey.equalsIgnoreCase("state"))` (L209) |
| 2 | RETURN | `return String.class;` // [JAPANESE_COMMENT: subkeyが"state"の場合、ステータスを返す = returns status when subkey is "state"] (L210) |

**Block 4** — ELSE (fallback) — default case (L213)

> No matching key or subkey was found. Return null to indicate no type mapping is available for the requested field/subkey combination. The comment explains: when no matching property exists, return null (`条件に合致するプロパティが存在しない場合は、nullを返す`).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // [JAPANESE_COMMENT: 条件に合致するプロパティが存在しない場合は、nullを返す = return null when no matching property exists] (L213) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `typeModelData` | Method | Data-type resolution callback — part of the X33V framework's bean interface contract for runtime type discovery |
| `key` | Parameter | Field name (項目名) — identifies the UI data field to resolve |
| `subkey` | Parameter | Sub-key (サブキー) — identifies a sub-property of the field (e.g., "value" for raw data, "state" for status) |
| `X33VDataTypeBeanInterface` | Interface | X33V framework interface that data-type beans implement to provide runtime type information for UI data binding |
| `X33VListedBeanInterface` | Interface | X33V framework interface for list-type beans that support item management operations |
| `mlad` | Field ID | Internal item identifier for "送信先リスト" (Recipient List) — likely derived from Mail Address List |
| `mlad_list_list` | Instance Field | List of `FUW07101SF03DBean` instances representing rows in the Recipient List |
| "送信先メールアドレス" | Japanese Literal | Recipient Email Address — the email address field of a message recipient in the service screen |
| "送信先リスト" | Japanese Literal | Recipient List — the screen UI component that manages a list of email recipients |
| X33V | Framework | Fujitsu's web view framework (internal naming convention) providing data binding, validation, and screen management |
| DBean | Pattern suffix | Data Bean — a model layer class that holds view-specific data and implements framework interfaces |
