---

# Business Logic — KKW22101SF03DBean.typeModelData() [117 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW22101SF.KKW22101SF03DBean` |
| Layer | Controller / View Bean (Web Client presentation layer) |
| Module | `KKW22101SF` (Package: `eo.web.webview.KKW22101SF`) |

## 1. Role

### KKW22101SF03DBean.typeModelData()

This method implements the **data type resolution** routing/dispatch pattern within the EO Smartlink contract information screen module. It receives a **field name** (`key`) and a **sub-key** (`subkey`) and returns the corresponding Java data type (`Class<?>`) that the frontend framework should use when rendering or validating the UI component bound to that field.

The method handles **8 Smartlink-related UI fields**, each of which supports three sub-keys: `value` (the data content type), `enable` (the editability flag type), and `state` (the UI state type). For every field, `value` and `state` resolve to `String.class`, while `enable` resolves to `Boolean.class` -- reflecting the uniform pattern used across Smartlink form controls.

The fields it serves cover the full scope of the Smartlink detail display: **contract number**, **terminal model**, **installment start month**, **terminal purchase method**, **settlement total amount**, **settlement monthly amount**, **settlement remaining amount**, and **installment sales form code**. This is a **shared utility** consumed by the parent screen bean (`KKW22101SFBean`) to support dynamic data-type binding for list-item rendering, ensuring the Fujitsu Futurity X33 view framework can correctly instantiate typed form components.

The method has no side effects, no database access, and no business logic beyond type dispatching -- it is a pure data contract between the view bean hierarchy and the presentation framework.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData key, subkey"])
    NULL_CHECK{key or subkey is null}
    KEY_SMARTLINK_SVC_KEY_NO{key equals EO Smartlink - Contract No}
    KEY_SMARTLINK_MODEL{key equals EO Smartlink - Model}
    KEY_SMARTLINK_KAP_KISAN{key equals EO Smartlink - Installment Start Month}
    KEY_SMARTLINK_TNM_BUY_WAY{key equals EO Smartlink - Terminal Purchase Method}
    KEY_SMARTLINK_SSN_KIN_ALL{key equals EO Smartlink - Settlement Amount Total}
    KEY_SMARTLINK_SSN_KIN_GTGK{key equals EO Smartlink - Settlement Amount Monthly}
    KEY_SMARTLINK_SSN_KIN_ZAN{key equals EO Smartlink - Settlement Amount Remaining}
    KEY_SMARTLINK_KAP_HANBAI{key equals EO Smartlink - Installment Sales Form Code}
    NO_MATCH(["return null"])

    SUBKEY_VALUE{subkey equals value}
    SUBKEY_ENABLE{subkey equals enable}
    SUBKEY_STATE{subkey equals state}

    RETURN_STRING(["return String.class"])
    RETURN_BOOLEAN(["return Boolean.class"])

    START --> NULL_CHECK
    NULL_CHECK -->|Yes| NO_MATCH
    NULL_CHECK -->|No| KEY_SMARTLINK_SVC_KEY_NO
    KEY_SMARTLINK_SVC_KEY_NO -->|No| KEY_SMARTLINK_MODEL
    KEY_SMARTLINK_MODEL -->|No| KEY_SMARTLINK_KAP_KISAN
    KEY_SMARTLINK_KAP_KISAN -->|No| KEY_SMARTLINK_TNM_BUY_WAY
    KEY_SMARTLINK_TNM_BUY_WAY -->|No| KEY_SMARTLINK_SSN_KIN_ALL
    KEY_SMARTLINK_SSN_KIN_ALL -->|No| KEY_SMARTLINK_SSN_KIN_GTGK
    KEY_SMARTLINK_SSN_KIN_GTGK -->|No| KEY_SMARTLINK_SSN_KIN_ZAN
    KEY_SMARTLINK_SSN_KIN_ZAN -->|No| KEY_SMARTLINK_KAP_HANBAI
    KEY_SMARTLINK_KAP_HANBAI -->|No| NO_MATCH

    KEY_SMARTLINK_SVC_KEY_NO -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_MODEL -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_KAP_KISAN -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_TNM_BUY_WAY -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_SSN_KIN_ALL -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_SSN_KIN_GTGK -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_SSN_KIN_ZAN -->|Yes| SUBKEY_VALUE
    KEY_SMARTLINK_KAP_HANBAI -->|Yes| SUBKEY_VALUE

    SUBKEY_VALUE -->|Yes| RETURN_STRING
    SUBKEY_VALUE -->|No| SUBKEY_ENABLE
    SUBKEY_ENABLE -->|Yes| RETURN_BOOLEAN
    SUBKEY_ENABLE -->|No| SUBKEY_STATE
    SUBKEY_STATE -->|Yes| RETURN_STRING
    SUBKEY_STATE -->|No| END_BRANCH(["return String.class"])
```

**Processing breakdown:**

1. **Null guard** -- If either `key` or `subkey` is `null`, the method returns `null` immediately (early exit).
2. **Field name resolution** -- The method compares `key` (case-sensitive) against 8 hardcoded Japanese-labeled field names. Each match identifies a Smartlink screen field.
3. **Sub-key dispatch** -- For a matched field, the method compares `subkey` (case-insensitive) against `value`, `enable`, and `state`:
   - `value` -> `String.class`
   - `enable` -> `Boolean.class`
   - `state` -> `String.class`
4. **Fallback** -- If the field name does not match any known field, the method returns `null`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The display field name of a Smartlink UI component. It identifies which Smartlink field the caller is querying for its data type. Valid values are 8 hardcoded Japanese strings: "EO Smartlink - Contract No" (`smtlnk_kktk_svc_kei_no`), "EO Smartlink - Model" (`smtlnk_kiki_model`), "EO Smartlink - Installment Start Month" (`smtlnk_kap_kisan_ym`), "EO Smartlink - Terminal Purchase Method" (`smtlnk_tnmt_buy_way`), "EO Smartlink - Settlement Amount (Total)" (`smtlnk_ssn_kin_all_amnt`), "EO Smartlink - Settlement Amount (Monthly)" (`smtlnk_ssn_kin_gtgk`), "EO Smartlink - Settlement Amount (Remaining)" (`smtlnk_ssn_kin_zan_getu`), "EO Smartlink - Installment Sales Form Code" (`smtlnk_kap_hambai_form_cd`). The comparison is case-sensitive. |
| 2 | `subkey` | `String` | The sub-property of the field being queried. It specifies whether the caller wants the data type of the field's value (`"value"`), its enable/edit flag (`"enable"`), or its state indicator (`"state"`). The comparison is case-insensitive. |

**External state:** This method reads no instance fields or external state. It is fully stateless and deterministic -- given the same inputs, it always returns the same result.

## 4. CRUD Operations / Called Services

This method performs **no database operations**, **no service component calls**, and **no CRUD operations**. It is a pure type-dispatch utility.

No entry rows.

## 5. Dependency Trace

This method is a subordinate dispatch method in a hierarchical bean structure. The primary caller is the parent screen bean `KKW22101SFBean`, which delegates to it through its own overloaded `typeModelData` method when the `key` matches a Smartlink detail list sub-field.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW22101SF | `KKW22101SFBean.typeModelData(gamenId, key, subkey)` -> `KKW22101SFBean.typeModelData(key, subkey)` -> `KKW22101SF03DBean.typeModelData(key, subkey)` | None (pure type dispatch) |

**Call context (KKW22101SFBean):** The parent bean's `typeModelData(String gamenId, String key, String subkey)` dispatches based on `gamenId` (screen area). When the key matches "EO Smartlink - Detail List" (`smtlnk_info_list`), it creates an instance of `KKW22101SF03DBean` and delegates the `typeModelData(keyElement, subkey)` call. For indexed list access (e.g., `"0/smtlnk_kktk_svc_kei_no/value"`), it also delegates to `KKW22101SF03DBean.typeModelData`.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(null guard: key == null || subkey == null)` (L651)

> Early-exit guard. If either parameter is null, return null immediately.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // Returns null if key or subkey is null [項目名とサブキーがnullの場合、nullを返す] |

**Block 2** — [EXEC] `(extract separator position)` (L654)

> Computes the position of the "/" separator in `key` (unused in this method, appears to be vestigial code).

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` // Extracts the index of "/" in key |

**Block 3** — [IF-ELSE IF CHAIN] `(key field name matching, 8 branches)` (L657–L760)

> The main dispatch logic. Each branch handles one Smartlink UI field with its internal sub-key dispatch.

**Block 3.1** — [IF] `key.equals("EO Smartlink - Contract No")` (L658) [EO Smartlink - 契約番号 = "EO Smartlink - Contract No"]

**Block 3.1.1** — [IF-ELSE IF CHAIN] `(subkey dispatch: value, enable, state)` (L659–L668)

> For the Smartlink contract number field. All sub-keys return a type.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` // Returns String.class for data value |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` // Returns Boolean.class for edit flag |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` // Returns String.class for UI state [stateの場合、ステータスを返す] |
| 6 | RETURN | `return String.class;` |

**Block 3.2** — [ELSE IF] `key.equals("EO Smartlink - Model")` (L671) [EO Smartlink - 型番 = "EO Smartlink - Model"]

**Block 3.2.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L672–L681)

> Identical structure to Block 3.1 -- value/String, enable/Boolean, state/String.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 3.3** — [ELSE IF] `key.equals("EO Smartlink - Installment Start Month")` (L684) [EO Smartlink - 割賦起算月 = "EO Smartlink - Installment Start Month"]

**Block 3.3.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L685–L694)

> For the installment start month field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 3.4** — [ELSE IF] `key.equals("EO Smartlink - Terminal Purchase Method")` (L697) [EO Smartlink - 端末購入方法 = "EO Smartlink - Terminal Purchase Method"]

**Block 3.4.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L698–L707)

> For the terminal purchase method field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 3.5** — [ELSE IF] `key.equals("EO Smartlink - Settlement Amount (Total)")` (L710) [EO Smartlink - 精算金（総額） = "EO Smartlink - Settlement Amount (Total)"]

**Block 3.5.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L711–L720)

> For the total settlement amount field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 3.6** — [ELSE IF] `key.equals("EO Smartlink - Settlement Amount (Monthly)")` (L723) [EO Smartlink - 精算金（月額） = "EO Smartlink - Settlement Amount (Monthly)"]

**Block 3.6.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L724–L733)

> For the monthly settlement amount field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 3.7** — [ELSE IF] `key.equals("EO Smartlink - Settlement Amount (Remaining)")` (L736) [EO Smartlink - 精算金（残月） = "EO Smartlink - Settlement Amount (Remaining)"]

**Block 3.7.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L737–L746)

> For the remaining settlement amount field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 3.8** — [ELSE IF] `key.equals("EO Smartlink - Installment Sales Form Code")` (L749) [EO Smartlink - 割賦販売形態コード = "EO Smartlink - Installment Sales Form Code"]

**Block 3.8.1** — [IF-ELSE IF CHAIN] `(subkey dispatch)` (L750–L759)

> For the installment sales form code field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` |
| 3 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` |
| 5 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 6 | RETURN | `return String.class;` |

**Block 4** — [RETURN] `(fallback: no matching field)` (L762)

> Returns null when no key matches any registered Smartlink field.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // No matching property found [条件に一致するプロパティが存在しない場合は、nullを返す] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `smtlnk_kktk_svc_kei_no` | Field | Smartlink Contract Line Item Number -- the contract number for a Smartlink service contract line item (項目ID: smtlnk_kktk_svc_kei_no) |
| `smtlnk_kiki_model` | Field | Smartlink Terminal Model -- the model identifier of the terminal device (項目ID: smtlnk_kiki_model) |
| `smtlnk_kap_kisan_ym` | Field | Smartlink Installment Start Month -- the month from which installment billing begins (項目ID: smtlnk_kap_kisan_ym) |
| `smtlnk_tnmt_buy_way` | Field | Smartlink Terminal Purchase Method -- how the terminal was acquired (purchased, leased, bundled) (項目ID: smtlnk_tnmt_buy_way) |
| `smtlnk_ssn_kin_all_amnt` | Field | Smartlink Settlement Amount Total -- total settlement/clearing amount in yen (項目ID: smtlnk_ssn_kin_all_amnt) |
| `smtlnk_ssn_kin_gtgk` | Field | Smartlink Settlement Amount Monthly -- monthly recurring settlement amount in yen (項目ID: smtlnk_ssn_kin_gtgk) |
| `smtlnk_ssn_kin_zan_getu` | Field | Smartlink Settlement Amount Remaining -- remaining balance of settlement after partial payments (項目ID: smtlnk_ssn_kin_zan_getu) |
| `smtlnk_kap_hambai_form_cd` | Field | Smartlink Installment Sales Form Code -- code identifying the installment sales arrangement type (項目ID: smtlnk_kap_hambai_form_cd) |
| smtlnk_info_list | Field | Smartlink Detail List -- the list item container for Smartlink detail entries (項目ID: smtlnk_info_list) |
| EO Smartlink | Business term | K-Opticom's managed Smartlink service -- a telecommunications service combining fiber broadband with mobile phone service under a bundled contract |
| X33VDataTypeBeanInterface | Technical | Fujitsu Futurity X33 view framework interface for typed data binding -- enables the framework to instantiate correctly-typed form components |
| X33VDataTypeList | Technical | Collection container for typed data beans within the X33 view framework |
| KKW22101SF | Module | Smartlink Contract Information screen module -- the screen that displays and manages Smartlink service contract details |
| 割賦 (kakifuki) | Japanese term | Installment payment -- a payment method where the total amount is split into periodic payments |
| 精算金 (seisankin) | Japanese term | Settlement amount -- the cleared/adjusted billing amount after prorations and adjustments |
| 契約番号 (keiyaku-bangou) | Japanese term | Contract number -- the unique identifier for a service contract |
| 型番 (kataban) | Japanese term | Model number -- the product model identifier |
| 端末 (tanmatsu) | Japanese term | Terminal -- the customer premise equipment (CPE) / device provided with the service |

---
