# Business Logic — FUW00116SF01DBean.typeModelData() [33 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00116SF.FUW00116SF01DBean` |
| Layer | Web View Data Bean (Controller / View Layer) |
| Module | `FUW00116SF` (Package: `eo.web.webview.FUW00116SF`) |

## 1. Role

### FUW00116SF01DBean.typeModelData()

This method serves as the **data-type introspection** method for the `FUW00116SF01DBean` class, which is a data-bean implementing the `X33VDataTypeBeanInterface` from the Fujitsu Futurity X33 web framework. It enables the framework to determine the Java type of individual properties (fields) on the bean at runtime, based on a string key (property name) and subkey (sub-property qualifier). The bean represents the **"送信先メールアドレス" (Recipient Email Address)** data type within the KU-MODEL web application (specifically module FUW00116SF, which handles customer-facing email delivery address management screens).

The method implements a **routing/dispatch design pattern**: it inspects the `key` parameter against known property identifiers and dispatches to the appropriate return type. It handles two property categories: the **Recipient Email Address** fields (`送信先メールアドレス`, item ID: `mlad`) — which expose `value` and `state` sub-properties — and the **Email Address Setting Field Code** fields (`メールアドレス設定フィールドコード`, item ID: `mlad_set_field_cd`), which similarly expose `value` and `state` sub-properties. All return `String.class` because the underlying bean fields (`mlad_value`, `mlad_state`, `mlad_set_field_cd_value`, `mlad_set_field_cd_state`) are all of type `String`.

In the larger system, this method is called by the X33 framework's data-type introspection mechanism during form binding and validation, allowing the view layer to render and process email address input fields with proper type handling. It also appears to be invoked directly by the parent screen bean (`FUW00116SFBean`) when constructing dynamic lists of email address items and when generating property identifiers for data-type binding. The method has no side effects, performs no CRUD operations, and does not interact with services, databases, or external systems — it is a pure utility method.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData key, subkey"])
    START --> CHECK_NULL["Check if key or subkey is null"]
    CHECK_NULL --> IS_NULL{key == null
 or subkey == null}
    IS_NULL -->|Yes| RETURN_NULL["Return null"]
    IS_NULL -->|No| FIND_SLASH["Search for '/' separator in key"]
    FIND_SLASH --> CHECK_MAIL["key equals '送信先メールアドレス'"]
    CHECK_MAIL --> IS_MAIL{key matches
Recipient Email}
    IS_MAIL -->|Yes| CHECK_MAIL_SUB{subkey.equalsIgnoreCase
('value' or 'state')}
    CHECK_MAIL_SUB -->|'value'| RETURN_STR_1["Return String.class"]
    CHECK_MAIL_SUB -->|'state'| RETURN_STR_2["Return String.class"]
    IS_MAIL -->|No| CHECK_SET_FIELD["key equals 'メールアドレス設定フィールドコード'"]
    CHECK_SET_FIELD --> IS_SET{key matches
Email Setting Field}
    IS_SET -->|Yes| CHECK_SET_SUB{subkey.equalsIgnoreCase
('value' or 'state')}
    CHECK_SET_SUB -->|'value'| RETURN_STR_3["Return String.class"]
    CHECK_SET_SUB -->|'state'| RETURN_STR_4["Return String.class"]
    IS_SET -->|No| RETURN_NULL_2["Return null
(no matching property)"]
    RETURN_NULL --> END(["End"])
    RETURN_STR_1 --> END
    RETURN_STR_2 --> END
    RETURN_STR_3 --> END
    RETURN_STR_4 --> END
    RETURN_NULL_2 --> END
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business property name used to identify which bean field to introspect. Valid values are the Japanese property identifiers `"送信先メールアドレス"` (Recipient Email Address — item ID: `mlad`) and `"メールアドレス設定フィールドコード"` (Email Address Setting Field Code — item ID: `mlad_set_field_cd`). The method also searches for a `'/'` separator within the key for potential compound identifiers (though none are currently processed). The key determines which branch of the routing logic is taken. |
| 2 | `subkey` | `String` | The sub-property qualifier that narrows down the type to a specific sub-field. Valid values are `"value"` (the actual data value of the property) and `"state"` (the UI state indicator, e.g., enabled/disabled). The comparison is case-insensitive via `equalsIgnoreCase()`. |

**No instance fields or external state are read by this method.** It is a pure function of its two parameters.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no external services, SC components, or CBS components**. It is a pure routing/introspection method with zero side effects. The method does not access any database tables, entity objects, or service endpoints.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| (N/A) | — | — | — | No CRUD or service calls. This method is a pure data-type resolution utility. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Bean: FUW00116SF01DBean (self / framework) | X33V Framework introspection → `typeModelData(key, subkey)` | — (no external calls) |
| 2 | Screen: FUW00116SFBean (parent bean) | `FUW00116SFBean` (runtime bean introspection for dynamic field list construction) → `new FUW00116SF01DBean()` → `typeModelData(key, subkey)` | — (no external calls) |
| 3 | Screen: FUW00901SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation via `typeModelData` delegation in `FUW00901SFBean` | — (no external calls) |
| 4 | Screen: FUW00912SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for customer address list fields | — (no external calls) |
| 5 | Screen: FUW00919SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for fee/charge field type resolution | — (no external calls) |
| 6 | Screen: FUW00926SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for equipment/billing info fields | — (no external calls) |
| 7 | Screen: FUW00927SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for item code/value fields | — (no external calls) |
| 8 | Screen: FUW00931SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for service list fields | — (no external calls) |
| 9 | Screen: FUW00959SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for campaign fields | — (no external calls) |
| 10 | Screen: FUW00964SF | `X33VDataTypeBeanInterface.typeModelData(key, subkey)` — framework-level invocation for pricing/gateway fields | — (no external calls) |

**Note:** The `typeModelData()` method is a standardized interface method from the X33V framework (`X33VDataTypeBeanInterface`). While many screens across the application override or invoke this method through their own bean implementations, the specific implementation in `FUW00116SF01DBean` only recognizes email address–related property keys. Other screen beans override this method with their own property routing logic for their respective domains (pricing, campaigns, billing, etc.).

## 6. Per-Branch Detail Blocks

**Block 1** — IF `(null guard)` (L246)

> Guard clause: If either parameter is null, return null immediately. This prevents NullPointerException and signals "no matching property" to the caller.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (key == null || subkey == null)` // Guard: return null if either parameter is missing [-> No constant] |
| 2 | RETURN | `return null;` // Return null — property not found |

**Block 2** — IF / EXEC `(separator detection)` (L251)

> Compute the index of the '/' character in the key string. This appears to be for future-proofing — the separator may be used in compound key formats, though the current implementation does not branch on its result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // Find separator position [-> "/" separator character] |

**Block 3** — IF / ELSE-IF / ELSE `(main routing logic)` (L254–L271)

> Core routing: branches on the `key` parameter value to determine which property group is being queried. Each group has two sub-branches for the `subkey` values. All return types are `String.class`.

**Block 3.1** — IF `(Recipient Email Address property)` (L254)

> The key matches the Japanese string `"送信先メールアドレス"` (Recipient Email Address), which corresponds to the bean fields `mlad_value` and `mlad_state`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `key.equals("送信先メールアドレス")` // Match: Recipient Email Address [-> key == "送信先メールアドレス"] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` // Subkey is the data value [-> subkey == "value", case-insensitive] |
| 3 | RETURN | `return String.class;` // Field: mlad_value is String type |

**Block 3.1.1** — ELSE-IF (`state` sub-property) (L258)

> When the subkey is "state", the method returns String.class. The comment explains: `subkeyが"state"の場合、ステータスを返す。` — When subkey is "state", return the status.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` // Subkey is the UI state indicator [-> subkey == "state", case-insensitive] |
| 2 | RETURN | `return String.class;` // Field: mlad_state is String type — status indicator (e.g., editability) |

**Block 3.2** — ELSE-IF (`Email Address Setting Field Code property`) (L263)

> The key matches the Japanese string `"メールアドレス設定フィールドコード"` (Email Address Setting Field Code), which corresponds to the bean fields `mlad_set_field_cd_value` and `mlad_set_field_cd_state`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (key.equals("メールアドレス設定フィールドコード"))` // Match: Email Address Setting Field Code [-> key == "メールアドレス設定フィールドコード"] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` // Subkey is the data value [-> subkey == "value", case-insensitive] |
| 3 | RETURN | `return String.class;` // Field: mlad_set_field_cd_value is String type |

**Block 3.2.1** — ELSE-IF (`state` sub-property for field code) (L267)

> When the subkey is "state" for the field code property. The comment explains: `subkeyが"state"の場合、ステータスを返す。` — When subkey is "state", return the status.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `else if (subkey.equalsIgnoreCase("state"))` // Subkey is the UI state indicator [-> subkey == "state", case-insensitive] |
| 2 | RETURN | `return String.class;` // Field: mlad_set_field_cd_state is String type — status indicator |

**Block 4** — ELSE `(no match fallback)` (L271)

> When neither key matches any known property, return null. The comment states: `条件に合致するプロパティが存在しない場合は、nullを返す。` — If no property matches the condition, return null.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // No matching property found — not a recognized field for this data type |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `送信先メールアドレス` | Japanese Field Name | Recipient Email Address — the primary email address field for customer email delivery target. Item ID: `mlad`. Represents the email address to which notifications or communications are sent. |
| `メールアドレス設定フィールドコード` | Japanese Field Name | Email Address Setting Field Code — a configuration code that identifies which UI form field is used for the email address input. Item ID: `mlad_set_field_cd`. Used for dynamic form field mapping. |
| `mlad` | Field Abbreviation | Mail List Address Data — the item ID prefix for the recipient email address property group. Corresponds to fields `mlad_value` (the actual email address) and `mlad_state` (its UI state). |
| `mlad_set_field_cd` | Field Abbreviation | Mail List Address Data Setting Field Code — the item ID prefix for the email address field configuration property group. Corresponds to fields `mlad_set_field_cd_value` and `mlad_set_field_cd_state`. |
| `X33VDataTypeBeanInterface` | Technical Interface | Fujitsu Futurity X33 framework interface that requires beans to implement data-type introspection via `typeModelData()`. Enables the framework to dynamically determine Java types of bean properties. |
| `X33VListedBeanInterface` | Technical Interface | Fujitsu Futurity X33 framework interface for beans that represent list items in tabular data binding. |
| `value` | Subkey | The data value sub-property — refers to the actual content of the field (e.g., the email address string). |
| `state` | Subkey | The UI state sub-property — refers to the field's interface state such as enabled/disabled, visible/hidden, or valid/invalid. |
| KU-MODEL | Business Term | K-Opticom's unified web customer management system (Ku-model web application). The module FUW00116SF is part of this system. |
| `mlad_value` | Field | Internal bean field storing the recipient email address value. Type: `String`, default: `""`. |
| `mlad_state` | Field | Internal bean field storing the UI state of the recipient email address field. Type: `String`, default: `""`. |
| `mlad_set_field_cd_value` | Field | Internal bean field storing the email address setting field code value. Type: `String`, default: `""`. |
| `mlad_set_field_cd_state` | Field | Internal bean field storing the UI state of the email address setting field code. Type: `String`, default: `""`. |
