# Business Logic — FUW00943SF01DBean.typeModelData() [26 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00943SF.FUW00943SF01DBean` |
| Layer | Utility / View Bean (Web framework data-type metadata provider) |
| Module | `FUW00943SF` (Package: `eo.web.webview.FUW00943SF`) |

## 1. Role

### FUW00943SF01DBean.typeModelData()

This method implements the `X33VDataTypeList` interface contract defined by the Fujitsu Futurity Web 3.3 framework. It serves as a **data-type metadata router** — mapping business field names and their sub-properties to their corresponding Java `Class` types, enabling the framework's dynamic data binding engine to perform type-safe view rendering at runtime.

Specifically, the method dispatches on the **enquete_no (survey/account) data type**. The field `アカウント番号` (account number, internal field ID: `enquete_no`) exposes three sub-properties — `value` (the account number string itself), `enable` (whether the field is editable), and `state` (the current visual/interaction state of the field). Each sub-property maps to a specific Java type: `String` for `value` and `state`, and `Boolean` for `enable`.

The method follows a **routing/dispatch pattern** — it inspects incoming `key` and `subkey` values against a lookup table and returns the appropriate `Class<?>` object. If no matching property is found, it safely returns `null`, which the framework treats as "not managed" (i.e., the field is handled by a default or untyped mechanism).

This is a **shared utility** invoked by the web framework's data type binder infrastructure. Across the codebase, `typeModelData` is implemented in dozens of `*DBean` classes throughout `FUW00912SF`, `FUW00926SF`, `FUW00959SF`, `FUW00964SF`, and other screen modules, each specializing in different field domains (pricing, campaign info, service details, speed tiers, etc.). This particular implementation handles only the survey/account number domain.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["typeModelData params"])
    NULL_CHECK["key == null or subkey == null"]
    NULL_RETURN["Return null"]
    SEPARATOR["Find separator position in key"]
    ANKE_KEY["key equals アンケー番"]
    SUBVALUE["subkey.equalsIgnoreCase value"]
    SUBENABLE["subkey.equalsIgnoreCase enable"]
    SUBSTATE["subkey.equalsIgnoreCase state"]
    STRING_RETURN["Return String.class"]
    BOOL_RETURN["Return Boolean.class"]
    DEFAULT_RETURN["Return null"]
    END_NODE(["End"])

    START --> NULL_CHECK
    NULL_CHECK -->|Yes| NULL_RETURN
    NULL_RETURN --> END_NODE
    NULL_CHECK -->|No| SEPARATOR
    SEPARATOR --> ANKE_KEY
    ANKE_KEY -->|No| DEFAULT_RETURN
    DEFAULT_RETURN --> END_NODE
    ANKE_KEY -->|Yes| SUBVALUE
    SUBVALUE -->|Yes| STRING_RETURN
    SUBVALUE -->|No| SUBENABLE
    SUBENABLE -->|Yes| BOOL_RETURN
    SUBENABLE -->|No| SUBSTATE
    SUBSTATE -->|Yes| STRING_RETURN
    SUBSTATE -->|No| DEFAULT_RETURN
    STRING_RETURN --> END_NODE
    BOOL_RETURN --> END_NODE
```

**Processing Summary:**

1. **Null guard** — If either `key` or `subkey` is null, return null immediately (no type information available).
2. **Separator scan** — Compute the position of the `/` separator character in `key`. (Note: this variable `separaterPoint` is computed but not used in the current implementation — a vestigial line from a prior generalized routing design.)
3. **Domain filter** — If `key` equals `アカウント番号` (Account Number / Survey ID: `enquete_no`), dispatch into the sub-property lookup.
4. **Sub-property mapping** — Within the matching domain, inspect `subkey` (case-insensitive):
   - `value` -> `String.class` (the account number string value)
   - `enable` -> `Boolean.class` (editability flag)
   - `state` -> `String.class` (field status/state string)
5. **Default** — If no match is found, return null (field not managed by this type model).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The business field name used as a lookup key. Specifically identifies which data field's type information is requested. For this implementation, the only recognized value is `アカウント番号` (Account Number), which corresponds to the internal field ID `enquete_no` — the survey/account identifier in the web form. |
| 2 | `subkey` | `String` | The sub-property within the identified field whose type is being queried. Valid values (case-insensitive) are: `value` (the primary field data), `enable` (whether the field is editable), and `state` (the current display/interaction state). Determines which Java class type to return. |

**No instance fields or external state** are read by this method. It is fully stateless and deterministic — given the same inputs, it always returns the same output.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations**. It is a pure metadata lookup — a type-dispatch function that returns a Java `Class` object based on string comparison. There are no service component (SC) calls, database accesses, entity operations, or CBS invocations.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| *(none)* | — | — | — | This method is a metadata router only. No data access occurs. |

## 5. Dependency Trace

This method is part of a cross-module interface pattern. The `typeModelData(String key, String subkey)` signature is inherited from the `X33VListedBeanInterface` (or implemented by `X33VDataTypeList`-based beans) within the **Fujitsu Futurity Web 3.3 framework**.

The method is **called indirectly by the framework's data type binder** — when the framework iterates over listed/complex beans to build view metadata, it calls `typeModelData()` on each bean in the list.

Additionally, the method is **delegated from wrapper classes** in several screen modules. These wrappers have a three-parameter overload that dispatches to the base two-parameter version:

| # | Caller (Screen/Bean) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW00912SFBean` (Screen: Survey/Form) | `typeModelData(gamenId, key, subkey)` -> `typeModelData(key, subkey)` | *(metadata lookup only)* |
| 2 | `FUW00926SFBean` (Screen: Service/TV Config) | `typeModelData(gamenId, key, subkey)` -> `typeModelData(key, subkey)` | *(metadata lookup only)* |
| 3 | `FUW00959SFBean` (Screen: Campaign) | `typeModelData(gamenId, key, subkey)` -> `typeModelData(key, subkey)` | *(metadata lookup only)* |
| 4 | `FUW00964SFBean` (Screen: Speed/VDSL Pricing) | `typeModelData(gamenId, key, subkey)` -> `typeModelData(key, subkey)` | *(metadata lookup only)* |
| 5 | Framework binder | `X33VListedBeanInterface.typeModelData(key, subkey)` called during view rendering | *(metadata lookup only)* |

**Note:** Direct callers that invoke `FUW00943SF01DBean.typeModelData()` specifically were not found in the codebase search. This method is part of a standard interface pattern — the framework invokes it on the appropriate bean class based on the list item's runtime type. The surrounding screen beans (`FUW00912SF`, `FUW00926SF`, `FUW00959SF`, `FUW00964SF`) each have their own `typeModelData` implementations that dispatch to their respective `*DBean` subclasses.

## 6. Per-Branch Detail Blocks

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

> Null guard: if either parameter is null, return null immediately. The method cannot resolve type information without both a field name and a sub-property name.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (key == null || subkey == null)` // Returns null if either parameter is absent [-> Early exit] |
| 2 | RETURN | `return null;` // No type info available for null input |

**Block 2** — [SET] `(separator scan)` (L218)

> Scans for a `/` separator character in the key. The result is stored in `separaterPoint` but is **not used** elsewhere in this method — a vestigial computation from a prior generalized routing design where the key might have contained a slash-delimited path.

| # | Type | Code |
|---|------|------|
| 1 | SET | `int separaterPoint = key.indexOf("/");` // Position of separator in key — unused [-> Vestigial] |

**Block 3** — [IF-ELSEIF-ELSEIF] `(key equals アンケー番)` (L222)

> Domain filter: only processes when the key matches the account number/survey field. The comment notes that this field's internal ID is `enquete_no`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (key.equals("アカウント番号"))` // Matches the account number survey field [enquete_no] |
| 2 | SET | `separaterPoint` already computed [L218, unused] |

**Block 3.1** — [ELSEIF] `(subkey.equalsIgnoreCase("value"))` (L223)

> Returns `String.class` when querying the `value` sub-property. The `value` represents the actual account number string held by the survey field.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (subkey.equalsIgnoreCase("value"))` // Case-insensitive check for value sub-property |
| 2 | RETURN | `return String.class;` // Account number is a string type |

**Block 3.2** — [ELSEIF] `(subkey.equalsIgnoreCase("enable"))` (L226)

> Returns `Boolean.class` when querying the `enable` sub-property. The `enable` flag controls whether the account number field is editable by the end user.

| # | Type | Code |
|---|------|------|
| 1 | ELSEIF | `else if (subkey.equalsIgnoreCase("enable"))` // Case-insensitive check for enable sub-property |
| 2 | RETURN | `return Boolean.class;` // Editability is a boolean flag |

**Block 3.3** — [ELSEIF] `(subkey.equalsIgnoreCase("state"))` (L229)

> Returns `String.class` when querying the `state` sub-property. The `state` represents the current display or interaction state of the field (e.g., "normal", "disabled", "readonly").

| # | Type | Code |
|---|------|------|
| 1 | ELSEIF | `else if (subkey.equalsIgnoreCase("state"))` // Case-insensitive check for state sub-property |
| 2 | RETURN | `return String.class;` // Field state is a string representation |

**Block 4** — [ELSE / FALL-THROUGH] `(no matching property)` (L232)

> If the key matched `アカウント番号` but none of the sub-properties matched, or if the key itself didn't match any known field, fall through to the final return null. The comment explains: no matching property exists, so return null.

| # | Type | Code |
|---|------|------|
| 1 | ELSE | `return null;` // No matching property found — framework will use default handling |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `アカウント番号` | Field | Account Number — the survey/account identifier in the web form. Internal field ID: `enquete_no`. |
| `enquete_no` | Field | Survey Number — the internal Japanese field name mapping to the account number display field. |
| `value` | Sub-property | The primary data value of the field — in this case, the account number string. |
| `enable` | Sub-property | Editability flag — a Boolean indicating whether the user can modify the field. |
| `state` | Sub-property | Display/interaction state — a string describing the current visual state (e.g., normal, disabled, readonly). |
| `X33VListedBeanInterface` | Framework | Fujitsu Futurity Web 3.3 framework interface for beans that support dynamic data type resolution in listed/complex fields. |
| `X33VDataTypeList` | Framework | Framework interface that beans implement to provide per-field type information for the data binding engine. |
| `typeModelData` | Framework method | Framework callback that returns the Java `Class` type for a given field/subfield combination, enabling type-safe view rendering. |
| `gamenId` | Parameter | Screen area identifier — used in wrapper `typeModelData` overloads to distinguish which screen area's data is being queried. |
| `X33VDataTypeStringBean` | Framework class | Framework bean class for String-typed data fields; used by many screen modules for sub-list data binding. |
| `X33VDataTypeBooleanBean` | Framework class | Framework bean class for Boolean-typed data fields. |
| `X33VDataTypeBeanInterface` | Framework interface | Interface for complex data type beans that hold nested objects. |
