# Business Logic — KKW00129SF03DBean.typeModelData() [195 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA17701SF.KKW00129SF03DBean` |
| Layer | Web View / Data Bean (View layer — implements X33VDataTypeBeanInterface for framework-driven type resolution) |
| Module | `KKA17701SF` (Package: `eo.web.webview.KKA17701SF`) |

## 1. Role

### KKW00129SF03DBean.typeModelData()

This method is a **data type routing and dispatch** utility used by the Futurity X33 web framework to dynamically determine the Java type of individual UI data fields within the "Service Contract <EO Optical TV> Consent Information" (サービス契約〈eo光TV〉一意向情報) screen. It implements the `X33VDataTypeBeanInterface.typeModelData(String key, String subkey)` contract: when the X33 framework needs to know what Java type a given field should be rendered as (e.g., for dynamic form binding, type-safe data loading, or HTML input generation), it calls `typeModelData` with a human-readable field label (`key`) and a property sub-key (`subkey`). The method matches the field label against **13 domain-specific telecom service fields** related to EO Optical TV subscription management, and for each field, maps the subkey to an appropriate Java type — `String.class` for value and state, `Boolean.class` for enabled/disabled flags. It follows a **routing/dispatch design pattern** using a chain of `if-else` branches — each branch handles one field label and three subkey cases. This method has **no side effects** — it is purely a read-only type introspection utility with no database access, no service calls, and no mutation of instance state. It plays the role of a **shared framework adapter**, enabling the X33 framework to generate type-safe dynamic form components without hardcoding field types in view templates.

## 2. Processing Pattern (Detailed Business Logic)

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

    START --> CN1{"key or subkey is null?"}

    CN1 -->|Yes| RN["Return null"]

    CN1 -->|No| SEP["sep = key.indexOf('/')"]

    SEP --> C1["Check key: サービス契約番号 (svc_kei_no)"]

    C1 -->|Yes| SUB1{"subkey?"}
    C1 -->|No| C2["Check key: 世代登録年月日時分秒 (gene_add_dtm)"]

    C2 -->|Yes| SUB2{"subkey?"}
    C2 -->|No| C3["Check key: 電波障害案件番号 (dmps_anken_no)"]

    C3 -->|Yes| SUB3{"subkey?"}
    C3 -->|No| C4["Check key: TV営業地区コード (tv_business_chik_cd)"]

    C4 -->|Yes| SUB4{"subkey?"}
    C4 -->|No| C5["Check key: TV営業担当者ユーザID (tv_business_tnt_user_id)"]

    C5 -->|Yes| SUB5{"subkey?"}
    C5 -->|No| C6["Check key: 外部連携契約コード (out_rnki_kei_cd)"]

    C6 -->|Yes| SUB6{"subkey?"}
    C6 -->|No| C7["Check key: バンドル情報コード (bundle_if_cd)"]

    C7 -->|Yes| SUB7{"subkey?"}
    C7 -->|No| C8["Check key: バンドル情報コード名称 (bundle_if_cd_nm)"]

    C8 -->|Yes| SUB8{"subkey?"}
    C8 -->|No| C9["Check key: 再送信提供サービス種別コード (re_send_tk_svc_sbt_cd)"]

    C9 -->|Yes| SUB9{"subkey?"}
    C9 -->|No| C10["Check key: 予約適用コード (rsv_aply_cd)"]

    C10 -->|Yes| SUB10{"subkey?"}
    C10 -->|No| C11["Check key: 予約適用コード名称 (rsv_aply_cd_nm)"]

    C11 -->|Yes| SUB11{"subkey?"}
    C11 -->|No| C12["Check key: 無効フラグ (mk_flg)"]

    C12 -->|Yes| SUB12{"subkey?"}
    C12 -->|No| C13["Check key: 無効フラグ名称 (mk_flg_nm)"]

    C13 -->|Yes| SUB13{"subkey?"}
    C13 -->|No| RN2["Return null (no matching field)"]

    SUB1 -->|value| R1["Return String.class"]
    SUB1 -->|enable| R2["Return Boolean.class"]
    SUB1 -->|state| R3["Return String.class"]

    SUB2 -->|value| R4["Return String.class"]
    SUB2 -->|enable| R5["Return Boolean.class"]
    SUB2 -->|state| R6["Return String.class"]

    SUB3 -->|value| R7["Return String.class"]
    SUB3 -->|enable| R8["Return Boolean.class"]
    SUB3 -->|state| R9["Return String.class"]

    SUB4 -->|value| R10["Return String.class"]
    SUB4 -->|enable| R11["Return Boolean.class"]
    SUB4 -->|state| R12["Return String.class"]

    SUB5 -->|value| R13["Return String.class"]
    SUB5 -->|enable| R14["Return Boolean.class"]
    SUB5 -->|state| R15["Return String.class"]

    SUB6 -->|value| R16["Return String.class"]
    SUB6 -->|enable| R17["Return Boolean.class"]
    SUB6 -->|state| R18["Return String.class"]

    SUB7 -->|value| R19["Return String.class"]
    SUB7 -->|enable| R20["Return Boolean.class"]
    SUB7 -->|state| R21["Return String.class"]

    SUB8 -->|value| R22["Return String.class"]
    SUB8 -->|enable| R23["Return Boolean.class"]
    SUB8 -->|state| R24["Return String.class"]

    SUB9 -->|value| R25["Return String.class"]
    SUB9 -->|enable| R26["Return Boolean.class"]
    SUB9 -->|state| R27["Return String.class"]

    SUB10 -->|value| R28["Return String.class"]
    SUB10 -->|enable| R29["Return Boolean.class"]
    SUB10 -->|state| R30["Return String.class"]

    SUB11 -->|value| R31["Return String.class"]
    SUB11 -->|enable| R32["Return Boolean.class"]
    SUB11 -->|state| R33["Return String.class"]

    SUB12 -->|value| R34["Return String.class"]
    SUB12 -->|enable| R35["Return Boolean.class"]
    SUB12 -->|state| R36["Return String.class"]

    SUB13 -->|value| R37["Return String.class"]
    SUB13 -->|enable| R38["Return Boolean.class"]
    SUB13 -->|state| R39["Return String.class"]

    R1 --> END(["Return / Next"])
    R2 --> END
    R3 --> END
    R4 --> END
    R5 --> END
    R6 --> END
    R7 --> END
    R8 --> END
    R9 --> END
    R10 --> END
    R11 --> END
    R12 --> END
    R13 --> END
    R14 --> END
    R15 --> END
    R16 --> END
    R17 --> END
    R18 --> END
    R19 --> END
    R20 --> END
    R21 --> END
    R22 --> END
    R23 --> END
    R24 --> END
    R25 --> END
    R26 --> END
    R27 --> END
    R28 --> END
    R29 --> END
    R30 --> END
    R31 --> END
    R32 --> END
    R33 --> END
    R34 --> END
    R35 --> END
    R36 --> END
    R37 --> END
    R38 --> END
    R39 --> END
    RN --> END
    RN2 --> END
```

**Branch summary (13 key fields x 3 subkey types = 39 type-return paths):**

| # | Key (Japanese Label) | Item ID (Field) | Subkey "value" | Subkey "enable" | Subkey "state" |
|---|----------------------|-----------------|----------------|-----------------|----------------|
| 1 | サービス契約番号 | `svc_kei_no` | `String.class` | `Boolean.class` | `String.class` |
| 2 | 世代登録年月日時分秒 | `gene_add_dtm` | `String.class` | `Boolean.class` | `String.class` |
| 3 | 電波障害案件番号 | `dmps_anken_no` | `String.class` | `Boolean.class` | `String.class` |
| 4 | TV営業地区コード | `tv_business_chik_cd` | `String.class` | `Boolean.class` | `String.class` |
| 5 | TV営業担当者ユーザID | `tv_business_tnt_user_id` | `String.class` | `Boolean.class` | `String.class` |
| 6 | 外部連携契約コード | `out_rnki_kei_cd` | `String.class` | `Boolean.class` | `String.class` |
| 7 | バンドル情報コード | `bundle_if_cd` | `String.class` | `Boolean.class` | `String.class` |
| 8 | バンドル情報コード名称 | `bundle_if_cd_nm` | `String.class` | `Boolean.class` | `String.class` |
| 9 | 再送信提供サービス種別コード | `re_send_tk_svc_sbt_cd` | `String.class` | `Boolean.class` | `String.class` |
| 10 | 予約適用コード | `rsv_aply_cd` | `String.class` | `Boolean.class` | `String.class` |
| 11 | 予約適用コード名称 | `rsv_aply_cd_nm` | `String.class` | `Boolean.class` | `String.class` |
| 12 | 無効フラグ | `mk_flg` | `String.class` | `Boolean.class` | `String.class` |
| 13 | 無効フラグ名称 | `mk_flg_nm` | `String.class` | `Boolean.class` | `String.class` |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The human-readable Japanese field label identifying which data field's type is being queried. Maps to internal item IDs (e.g., `svc_kei_no` for service contract number, `gene_add_dtm` for generation registration datetime). Each value corresponds to a specific UI-bound field on the EO Optical TV consent information screen. |
| 2 | `subkey` | `String` | A property sub-key within the field that determines which aspect's type to return. Three valid values: `"value"` (the data value of the field), `"enable"` (whether the field is enabled/disabled for editing), and `"state"` (the current state status of the field). Comparisons are case-insensitive (`equalsIgnoreCase`). |

**Instance fields read:** None — this method is stateless. It does not access any protected instance fields of `KKW00129SF03DBean`.

**Local variables:**
| Variable | Type | Business Description |
|----------|------|---------------------|
| `separaterPoint` | `int` | Holds the result of `key.indexOf("/")` — the index of the first forward slash in the key. This value is computed but never used in any conditional logic, suggesting it may be a leftover from a planned future enhancement (e.g., slash-delimited multi-key routing). |

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no services or data-access methods**. It is a pure type-introspection router with zero side effects. No database queries, no entity manipulation, no service component invocations.

## 5. Dependency Trace

This method is an interface implementation of `X33VDataTypeBeanInterface.typeModelData()`. It is called indirectly by the X33 framework when the framework needs to determine the Java type of a dynamic form field. The method is also instantiated and registered in the parent bean `KKW00129SFBean` (see the constructor section where a new `KKW00129SF03DBean` instance is added to the `ekk0101a010cbsmsg1list_list` collection).

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00129SF | `KKW00129SFBean` constructor adds `KKW00129SF03DBean` to `ekk0101a010cbsmsg1list_list` → X33 framework invokes `typeModelData` | N/A (pure type routing, no data access) |
| 2 | Screen:KKW00129SF | `KKW00129SFBean` constructor (koptWebB) adds `KKW00129SF03DBean` to `ekk0101a010cbsmsg1list_list` → X33 framework invokes `typeModelData` | N/A (pure type routing, no data access) |

**Note:** The X33 framework calls `typeModelData` during the `loadModelData` / `saveModelData` lifecycle of `X33VDataTypeBeanInterface`-implementing beans. The framework passes the human-readable field label as `key` and the property sub-key as `subkey` to resolve the appropriate Java type at runtime.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (null guard) (L1032)

> Guard clause: if either parameter is null, return null immediately.
> (key, subkeyがnullの場合、nullを返す — "If key and subkey are null, return null")

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key == null || subkey == null)` |
| 2 | RETURN | `return null;` |

**Block 2** — SET (L1035)

> Compute separator position (unused variable — likely reserved for future use).

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

**Block 3** — IF-ELSE CHAIN (key matching) (L1038)

> For each key branch: the code first checks the key (field label), then checks the subkey ("value", "enable", "state").
> (項目ごとに処理を入れる — "Insert processing per field item")

### Block 3.1 — IF `key.equals("サービス契約番号")` (svc_kei_no) (L1039)

| # | Type | Code |
|---|------|------|
| 1 | IF | `key.equals("サービス契約番号")` [Field ID: `svc_kei_no`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` [subkeyが"state"の場合、ステータスを返す — "If subkey is 'state', return status"] |
| 7 | RETURN | `return String.class;` |

### Block 3.2 — IF-ELSE `key.equals("世代登録年月日時分秒")` (gene_add_dtm) (L1053)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("世代登録年月日時分秒")` [Field ID: `gene_add_dtm`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.3 — IF-ELSE `key.equals("電波障害案件番号")` (dmps_anken_no) (L1067)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("電波障害案件番号")` [Field ID: `dmps_anken_no`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.4 — IF-ELSE `key.equals("TV営業地区コード")` (tv_business_chik_cd) (L1081)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("TV営業地区コード")` [Field ID: `tv_business_chik_cd`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.5 — IF-ELSE `key.equals("TV営業担当者ユーザID")` (tv_business_tnt_user_id) (L1095)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("TV営業担当者ユーザID")` [Field ID: `tv_business_tnt_user_id`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.6 — IF-ELSE `key.equals("外部連携契約コード")` (out_rnki_kei_cd) (L1109)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("外部連携契約コード")` [Field ID: `out_rnki_kei_cd`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.7 — IF-ELSE `key.equals("バンドル情報コード")` (bundle_if_cd) (L1123)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("バンドル情報コード")` [Field ID: `bundle_if_cd`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.8 — IF-ELSE `key.equals("バンドル情報コード名称")` (bundle_if_cd_nm) (L1137)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("バンドル情報コード名称")` [Field ID: `bundle_if_cd_nm`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.9 — IF-ELSE `key.equals("再送信提供サービス種別コード")` (re_send_tk_svc_sbt_cd) (L1151)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("再送信提供サービス種別コード")` [Field ID: `re_send_tk_svc_sbt_cd`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.10 — IF-ELSE `key.equals("予約適用コード")` (rsv_aply_cd) (L1165)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("予約適用コード")` [Field ID: `rsv_aply_cd`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.11 — IF-ELSE `key.equals("予約適用コード名称")` (rsv_aply_cd_nm) (L1179)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("予約適用コード名称")` [Field ID: `rsv_aply_cd_nm`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.12 — IF-ELSE `key.equals("無効フラグ")` (mk_flg) (L1193)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("無効フラグ")` [Field ID: `mk_flg`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.13 — IF-ELSE `key.equals("無効フラグ名称")` (mk_flg_nm) (L1207)

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("無効フラグ名称")` [Field ID: `mk_flg_nm`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

### Block 3.14 — IF-ELSE `key.equals("最終更新年月日時分秒")` (last_upd_dtm) (L1221)

> Note: This is the 14th key branch — the comment says "最終更新年月日時分秒" (last update datetime), with field ID `last_upd_dtm`. It follows the exact same value/enable/state pattern as all other branches.

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `key.equals("最終更新年月日時分秒")` [Field ID: `last_upd_dtm`] |
| 2 | IF | `subkey.equalsIgnoreCase("value")` |
| 3 | RETURN | `return String.class;` |
| 4 | ELSE IF | `subkey.equalsIgnoreCase("enable")` |
| 5 | RETURN | `return Boolean.class;` |
| 6 | ELSE IF | `subkey.equalsIgnoreCase("state")` |
| 7 | RETURN | `return String.class;` |

**Block 4** — RETURN (L1220)

> (条件に合致するプロパティが存在しない場合は、nullを返す。 — "If no matching property exists, return null")

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a service contract line item in the EO Optical TV system |
| `gene_add_dtm` | Field | Generation registration datetime — timestamp when a service record was first registered/generated in the system |
| `dmps_anken_no` | Field | Radio wave disaster case number — internal case/tracking number for radio wave interference disaster reports |
| `tv_business_chik_cd` | Field | TV business area code — geographic region code for TV service operations territory |
| `tv_business_tnt_user_id` | Field | TV business operator user ID — user identifier assigned to the TV service operations staff member responsible for the account |
| `out_rnki_kei_cd` | Field | External collaboration contract code — code identifying agreements with external partner systems/services |
| `bundle_if_cd` | Field | Bundle information code — code for bundled service packages (multiple services offered together) |
| `bundle_if_cd_nm` | Field | Bundle information code name — human-readable name for the bundle information code |
| `re_send_tk_svc_sbt_cd` | Field | Resending provision service type code — classification code for retransmission/re-provisioning service types |
| `rsv_aply_cd` | Field | Reservation application code — code indicating reservation application status or type |
| `rsv_aply_cd_nm` | Field | Reservation application code name — human-readable name for the reservation application code |
| `mk_flg` | Field | Invalid flag — a flag indicating whether a record/service is marked as invalid/cancelled |
| `mk_flg_nm` | Field | Invalid flag name — human-readable name for the invalid flag status |
| `last_upd_dtm` | Field | Last update datetime — timestamp of the most recent modification to a record |
| X33 | Technical | Fujitsu Futurity X33 — enterprise web application framework for building JavaServer Faces-based CRUD screen applications |
| X33VDataTypeBeanInterface | Technical | X33 interface contract for data type providers — enables dynamic type resolution for UI field bindings |
| X33VListedBeanInterface | Technical | X33 interface contract for listable beans — enables a bean to participate in list/table data binding |
| EO Optical TV | Business term | EO Optical TV — NTT East's fiber-to-the-home broadband and television service brand (eoヒカルティ / eo光TV) |
| サービス契約〈eo光TV〉一意向情報 | Business term | Service Contract <EO Optical TV> Consent Information — the screen/module that manages customer consent records for EO Optical TV subscription services |
