# Business Logic — FUW00928SF02DBean.typeModelData() [153 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00928SF.FUW00928SF02DBean` |
| Layer | View / DataBean (Data Type Bean — part of the X33V data type bean framework) |
| Module | `FUW00928SF` (Package: `eo.web.webview.FUW00928SF`) |

## 1. Role

### FUW00928SF02DBean.typeModelData()

This method serves as the **data type resolver** for the Number Portability List (番号ポータビリティリスト) screen in the K-Opticom fiber optic service ordering system. It implements the `X33VDataTypeBeanInterface.typeModelData(String key, String subkey)` contract, which the X33V view framework invokes to determine the Java runtime type of each editable field on the page at render time. The method performs a **routing/dispatch pattern**: given a field name (the `key` — a Japanese display label such as "電話番号" for phone number) and a sub-property name (the `subkey` — such as `"value"`, `"enable"`, or `"state"`), it returns the corresponding `Class<?>` that the framework will use for binding, validation, and UI rendering.

The method handles **ten distinct item types** specific to the Number Portability List screen, covering data collected during phone number portability requests: the subscriber's current phone number, current service provider, postal code, address, contractor name, whether the contractor name matches, NTT number portability procedure choice, current installation place address, and current contractor name. Each item type supports sub-properties (`value`, `enable`, `state`) to drive UI binding, field enable/disable state, and visual rendering state respectively. The method is a **shared utility** — it is instantiated by the parent `FUW00928SFBean` whenever the screen needs to resolve field metadata for any item in the Number Portability List data type, enabling the framework to render the correct input controls (text fields, checkboxes, etc.) for each field.

If either `key` or `subkey` is null, or if the `key` does not match any of the ten supported fields, the method returns `null` to signal the framework to skip that field. This is a pure read operation with no side effects, no external calls, and no database interaction.

## 2. Processing Pattern (Detailed Business Logic)

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

    START --> COND_NULL["key or subkey is null?"]
    COND_NULL -->|Yes| RET_NULL1["return null"]
    COND_NULL -->|No| COND_DSP["Display detail control flag"]

    COND_DSP -->|Yes| SUBKEY_VALUE1["subkey equals value?"]
    SUBKEY_VALUE1 -->|Yes| RET_BOOL1["return Boolean"]
    SUBKEY_VALUE1 -->|No| SUBKEY_STATE1["subkey equals state?"]
    SUBKEY_STATE1 -->|Yes| RET_STR1["return String"]
    SUBKEY_STATE1 -->|No| RET_NULL2["return null"]

    COND_DSP -->|No| COND_NTELNO["N number title"]
    COND_NTELNO -->|Yes| SUBKEY_VALUE2["subkey equals value?"]
    SUBKEY_VALUE2 -->|Yes| RET_STR2["return String"]
    SUBKEY_VALUE2 -->|No| SUBKEY_ENABLE2["subkey equals enable?"]
    SUBKEY_ENABLE2 -->|Yes| RET_BOOL2["return Boolean"]
    SUBKEY_ENABLE2 -->|No| SUBKEY_STATE2["subkey equals state?"]
    SUBKEY_STATE2 -->|Yes| RET_STR2B["return String"]
    SUBKEY_STATE2 -->|No| RET_NULL3["return null"]

    COND_NTELNO -->|No| COND_BMP["BMP phone number"]
    COND_BMP -->|Yes| BMP_SUBKEY["check subkey"]
    BMP_SUBKEY --> RET_STR_BMP["return String"]

    COND_BMP -->|No| COND_PROVIDER["Service provider"]
    COND_PROVIDER -->|Yes| PROVIDER_SUBKEY["check subkey"]
    PROVIDER_SUBKEY --> RET_STR_PROVIDER["return String"]

    COND_PROVIDER -->|No| COND_PCD["Postal code"]
    COND_PCD -->|Yes| PCD_SUBKEY["check subkey"]
    PCD_SUBKEY --> RET_STR_PCD["return String"]

    COND_PCD -->|No| COND_ADRS["Address"]
    COND_ADRS -->|Yes| ADRS_SUBKEY["check subkey"]
    ADRS_SUBKEY --> RET_STR_ADRS["return String"]

    COND_ADRS -->|No| COND_KSHNM["Contractor name"]
    COND_KSHNM -->|Yes| KSHNM_SUBKEY["check subkey"]
    KSHNM_SUBKEY --> RET_STR_KSHNM["return String"]

    COND_KSHNM -->|No| COND_KSHKN["Is contractor name?"]
    COND_KSHKN -->|Yes| KSHKN_SUBKEY["check subkey"]
    KSHKN_SUBKEY --> RET_STR_KSHKN["return String"]

    COND_KSHKN -->|No| COND_NTT["NTT number portability"]
    COND_NTT -->|Yes| NTT_SUBKEY["check subkey"]
    NTT_SUBKEY --> RET_STR_NTT["return String"]

    COND_NTT -->|No| COND_PLACE["Installation place address"]
    COND_PLACE -->|Yes| PLACE_SUBKEY["check subkey"]
    PLACE_SUBKEY --> RET_STR_PLACE["return String"]

    COND_PLACE -->|No| COND_BMP_KSHNM["Current contractor name"]
    COND_BMP_KSHNM -->|Yes| BMP_KSHNM_SUBKEY["check subkey"]
    BMP_KSHNM_SUBKEY --> RET_STR_BMP_KSHNM["return String"]

    COND_BMP_KSHNM -->|No| RET_NULL4["return null"]

    RET_NULL1 --> END(["Return"])
    RET_BOOL1 --> END
    RET_STR1 --> END
    RET_NULL2 --> END
    RET_STR2 --> END
    RET_BOOL2 --> END
    RET_STR2B --> END
    RET_NULL3 --> END
    RET_STR_BMP --> END
    RET_STR_PROVIDER --> END
    RET_STR_PCD --> END
    RET_STR_ADRS --> END
    RET_STR_KSHNM --> END
    RET_STR_KSHKN --> END
    RET_STR_NTT --> END
    RET_STR_PLACE --> END
    RET_STR_BMP_KSHNM --> END
    RET_NULL4 --> END
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The Japanese display label of a field on the Number Portability List screen. It identifies one of ten item types such as "電話番号を利用する電話番号" (Phone number to use number portability), "現在ご利用中の電話サービス提供事業者" (Current telephone service provider), or "契約者名義" (Contractor name). Values are hardcoded Japanese strings; an unrecognized `key` results in a `null` return. |
| 2 | `subkey` | `String` | The sub-property name within a field, specifying which aspect of the field's type is being queried. Accepted values are `"value"` (the data value type — String or Boolean), `"enable"` (the enabled/disabled state type — Boolean), or `"state"` (the UI rendering state type — String). Comparisons are case-insensitive via `equalsIgnoreCase`. |

**Instance fields read by the method:** None. The method is entirely stateless — it performs string comparisons against `key` and `subkey` with no access to instance fields or external state.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no external services**. It is a pure type-dispatch function that returns a `Class<?>` reference based on string comparison. There are no method calls beyond standard Java `String` methods (`equals`, `equalsIgnoreCase`, `indexOf`).

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| N/A | (none) | — | — | No service calls, database access, or data mutations. Pure in-memory type routing. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen: FUW00928SF (Number Portability List) | `FUW00928SFBean.addListDataInstance("番号ポータビリティリスト")` -> instantiates `FUW00928SF02DBean` -> X33V framework calls `typeModelData(key, subkey)` | N/A — no terminal calls |

**Caller Context:** `FUW00928SFBean` is the main data bean for the Number Portability List screen. When the screen needs to add a new list item for the "番号ポータビリティリスト" (Number Portability List) data type, it instantiates `FUW00928SF02DBean`. The X33V view framework then calls `typeModelData()` on each instance to determine the type of each field (value, enable, state) for UI rendering and data binding. This is an indirect call — the framework invokes the method during the screen's data type initialization phase, not directly from application code.

## 6. Per-Branch Detail Blocks

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

> Null-guard: if either parameter is null, return null immediately. This prevents NPE when the framework passes incomplete field metadata.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null;` // key, subkey that are null => return null (key,subkeyがnullの場合、nullを返す) |

**Block 2** — [EXEC] Compute separator position (L828)

| # | Type | Code |
|---|------|------|
| 1 | SET | `separaterPoint = key.indexOf("/")` // Find first "/" separator position (itemごとの処理を入れる — per-field processing entry) |

Note: `separaterPoint` is computed but never used in this method — it appears to be dead code, likely a remnant from an earlier version that planned to handle "/"-prefixed common information beans.

**Block 3** — [ELSE-IF] `key.equals("表示明細制御フラグ")` — Display Detail Control Flag (L832)

> The Display Detail Control Flag field (item ID: `dsp_bampo_dtl_flg`). This is a Boolean toggle that controls whether display detail flags are shown. Only supports `"value"` and `"state"` subkeys.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return Boolean.class;` // Data type for the value is Boolean |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("state")` // subkey is "state" => return state type (subkeyが"state"の場合、ステータスを返す) |
| 4 | RETURN | `return String.class;` // State status type is String |
| 5 | RETURN | `return null;` // No matching subkey |

**Block 4** — [ELSE-IF] `key.equals("N番号目タイトル")` — N Number Title (L845)

> The N Number Title field (item ID: `no_title`). Used for displaying the title of the N-number (national ID) field. Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | Type | Code |
|---|------|------|
| 1 | IF | `subkey.equalsIgnoreCase("value")` |
| 2 | RETURN | `return String.class;` // Value type is String |
| 3 | ELSE-IF | `subkey.equalsIgnoreCase("enable")` |
| 4 | RETURN | `return Boolean.class;` // Enabled/disabled flag is Boolean |
| 5 | ELSE-IF | `subkey.equalsIgnoreCase("state")` // subkey is "state" => return state type |
| 6 | RETURN | `return String.class;` // State type is String |
| 7 | RETURN | `return null;` // No matching subkey |

**Block 5** — [ELSE-IF] `key.equals("番号ポータビリティを利用する電話番号")` — Phone Number for Number Portability (L859)

> The phone number field used when applying for number portability (item ID: `bmp_telno`). BMP = Backup/Phone Number Portability. Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 6** — [ELSE-IF] `key.equals("現在ご利用中の電話サービス提供事業者")` — Current Service Provider (L872)

> The current telephone service provider the customer is with (item ID: `bmp_tel_svctk_jgs`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 7** — [ELSE-IF] `key.equals("現在ご利用中の電話サービスの郵便番号")` — Current Service Postal Code (L885)

> The postal code of the current service address (item ID: `bmp_pcd`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 8** — [ELSE-IF] `key.equals("現在ご利用中の電話サービスの住所")` — Current Service Address (L898)

> The address of the current telephone service (item ID: `bmp_adrs`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 9** — [ELSE-IF] `key.equals("契約者名義")` — Contractor Name (L911)

> The contractor's registered name (item ID: `kshnm`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 10** — [ELSE-IF] `key.equals("契約者名義か")` — Is Contractor Name (L924)

> A flag field indicating whether the contractor name is set/provided (item ID: `kshkn`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 11** — [ELSE-IF] `key.equals(".NTT番号移転手続き")` — NTT Number Portability Procedure (L937)

> The NTT number portability procedure choice field (item ID: `ntt_no_iten_ttdk_choice`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 12** — [ELSE-IF] `key.equals("現在利用中設置場所住所")` — Current Installation Place Address (L950)

> The address of the currently installed location (item ID: `bmp_stc_place_ad_choice_nm`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 13** — [ELSE-IF] `key.equals("現在利用中契約者名義")` — Current Contractor Name (L963)

> The contractor name at the currently used location (item ID: `bmp_kshnm_choice_nm`). Supports `"value"`, `"enable"`, and `"state"` subkeys.

| # | 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;` |
| 7 | RETURN | `return null;` |

**Block 14** — [RETURN] No matching key (L973)

> No matching property exists. Return null.

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

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `dsp_bampo_dtl_flg` | Field | Display detail null flag — controls visibility of display detail flags (displayed on screen as "表示明細制御フラグ") |
| `no_title` | Field | N-number title — label displayed for the national ID (N-number) field (displayed as "N番号目タイトル") |
| `bmp_telno` | Field | BMP phone number — the phone number to be ported (Number Portability = BMP, displayed as "番号ポータビリティを利用する電話番号") |
| `bmp_tel_svctk_jgs` | Field | BMP telephone service provider — the current carrier the customer is switching from (displayed as "現在ご利用中の電話サービス提供事業者") |
| `bmp_pcd` | Field | BMP postal code — postal code of the current service address (displayed as "現在ご利用中の電話サービスの郵便番号") |
| `bmp_adrs` | Field | BMP address — current service address (displayed as "現在ご利用中の電話サービスの住所") |
| `kshnm` | Field | Contractor name — registered name of the service contract holder (displayed as "契約者名義") |
| `kshkn` | Field | Is contractor name — flag indicating whether the contractor name is set/provided (displayed as "契約者名義か") |
| `ntt_no_iten_ttdk_choice` | Field | NTT number portability procedure choice — customer's selection for NTT number transfer procedure (displayed as ".NTT番号移転手続き") |
| `bmp_stc_place_ad_choice_nm` | Field | BMP installation place address choice — address of the current installation location (displayed as "現在利用中設置場所住所") |
| `bmp_kshnm_choice_nm` | Field | BMP contractor name choice — contractor name at the currently used location (displayed as "現在利用中契約者名義") |
| X33V | Acronym | Fujitsu Futurity X33V — the web application framework providing the data type bean interface (X33VDataTypeBeanInterface) for screen field type resolution |
| X33VDataTypeBeanInterface | Interface | Framework interface that defines `typeModelData(key, subkey)` and `listKoumokuIds()` contracts for data type beans. This class implements it. |
| 番号ポータビリティ | Business term | Number Portability (MNP — Mobile Number Portability applied to fixed-line) — allows customers to keep their phone number when switching providers |
| BMP | Acronym | Backup/Number Portability — refers to the number portability feature in the telecom system |
| NTT | Business term | Nippon Telegraph and Telephone — Japan's primary telecommunications carrier, referenced in the number portability procedure field |
| K-Opticom | Business term | K-Opticom — the fiber optic ISP (Internet Service Provider) service brand for which this application is built |
| 項目 (koumoku) | Japanese term | Item/field — a named data field on a web form or screen |
| サブキー (subkey) | Japanese term | Sub-key — the secondary identifier within an item that specifies which sub-property (value, enable, state) of that item is being queried |
| フラグ (flag) | Japanese term | Flag — a Boolean indicator that controls UI behavior (visibility, enablement, rendering state) |
