# Business Logic — FUW00110SF01DBean.clearListDataInstance() [22 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW00110SF.FUW00110SF01DBean` |
| Layer | Data Bean (Presentation/Data Binding layer — `eo.web.webview`) |
| Module | `FUW00110SF` (Package: `eo.web.webview.FUW00110SF`) |

## 1. Role

### FUW00110SF01DBean.clearListDataInstance()

This method provides a centralized, keyed-clearing mechanism for synchronized `X33VDataTypeList` collections that back dropdown (select) components in the web UI. In the Fujitsu Futurity X33 web framework, dynamic dropdown fields are modeled as parallel `X33VDataTypeList` instances — one each for item count (`list_size_list`), selected index (`sel_index_list`), actual display value (`true_value_list`), and label text (`label_value_list`). When a user action or screen event needs to reset the dropdown state (e.g., after re-querying data, canceling an operation, or switching contexts), this method clears the specific list identified by the `key` parameter. It implements a **discriminated union** pattern: the `key` string acts as a discriminator routing the call to the appropriate field's `clear()` method. The method is a shared template — it is defined in `FUW00110SF01DBean` and inherited by child bean classes (e.g., `FUW00110SFBean` calls `super.clearListDataInstance(key)`), and also overridden verbatim in sibling beans such as `FUW00110SF04DBean`. Its role in the larger system is as a **reset primitive** that screen-level logic invokes during data reinitialization cycles, ensuring UI component data stays consistent with the underlying business state.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["clearListDataInstance key"])
    CHECK_NULL["key != null ?"]
    CLEAR_LIST_SIZE["clear list_size_list"]
    CLEAR_SEL_INDEX["clear sel_index_list"]
    CLEAR_TRUE_VALUE["clear true_value_list"]
    CLEAR_LABEL_VALUE["clear label_value_list"]
    SKIP["no-op (key is null)"]
    END_NODE(["Return / Next"])

    START --> CHECK_NULL
    CHECK_NULL -->|Yes| CHECK_ITEM_COUNT["key equals \"項目数\" (item count)"]
    CHECK_NULL -->|No| SKIP
    SKIP --> END_NODE
    CHECK_ITEM_COUNT -->|Yes| CLEAR_LIST_SIZE
    CHECK_ITEM_COUNT -->|No| CHECK_SEL_VALUE["key equals \"選択値\" (selected value)"]
    CLEAR_LIST_SIZE --> END_NODE
    CHECK_SEL_VALUE -->|Yes| CLEAR_SEL_INDEX
    CHECK_SEL_VALUE -->|No| CHECK_ITEM_VALUE["key equals \"項目実値\" (item actual value)"]
    CLEAR_SEL_INDEX --> END_NODE
    CHECK_ITEM_VALUE -->|Yes| CLEAR_TRUE_VALUE
    CHECK_ITEM_VALUE -->|No| CHECK_LABEL["key equals \"項目ラベル\" (item label)"]
    CLEAR_TRUE_VALUE --> END_NODE
    CHECK_LABEL -->|Yes| CLEAR_LABEL_VALUE
    CLEAR_LABEL_VALUE --> END_NODE
    CHECK_LABEL -->|No| END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | A Japanese-language discriminator identifying which dropdown data list to clear. Valid values are: `"項目数"` (item count — clears the list of available options), `"選択値"` (selected value — clears the currently selected index), `"項目実値"` (item actual value — clears the true/display values stored in the list), or `"項目ラベル"` (item label — clears the label text entries). Each key maps to one of the four parallel `X33VDataTypeList` fields. Pass `null` to trigger a no-op (defensive against missing screen parameter injection). |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `list_size_list` | `X33VDataTypeList` | The list holding the number of available dropdown options (Long type, item ID: `list_size`). |
| `sel_index_list` | `X33VDataTypeList` | The list holding the index of the currently selected dropdown option (Long type, item ID: `sel_index`). |
| `true_value_list` | `X33VDataTypeList` | The list holding the actual display values for each dropdown option (String type, item ID: `true_value`). |
| `label_value_list` | `X33VDataTypeList` | The list holding the visible label text for each dropdown option (String type, item ID: `label_value`). |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `X33VDataTypeList.clear` | - | - (in-memory collection) | Clears all elements from one of the four `X33VDataTypeList` instances (`list_size_list`, `sel_index_list`, `true_value_list`, or `label_value_list`) based on the `key` discriminator. No database or service component interaction occurs. |

**Note:** This method is a pure in-memory data manipulation routine. It does not invoke any Service Component (SC), Component Business Service (CBS), DAO, or database operations. It directly calls the `clear()` method on `X33VDataTypeList` instances managed by the X33 framework's bean infrastructure.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `list_size_list.clear()` | - | `list_size_list` (in-memory `X33VDataTypeList`) | Clears all `X33VDataTypeLongBean` entries representing dropdown option counts. |
| - | `sel_index_list.clear()` | - | `sel_index_list` (in-memory `X33VDataTypeList`) | Clears all `X33VDataTypeLongBean` entries representing the selected index. |
| - | `true_value_list.clear()` | - | `true_value_list` (in-memory `X33VDataTypeList`) | Clears all `X33VDataTypeStringBean` entries representing actual dropdown values. |
| - | `label_value_list.clear()` | - | `label_value_list` (in-memory `X33VDataTypeList`) | Clears all `X33VDataTypeStringBean` entries representing dropdown label text. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | In-module: `FUW00110SFBean` | `FUW00110SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 2 | In-module: `FUW00110SF04DBean` | `FUW00110SF04DBean.clearListDataInstance(key)` -> direct override (identical implementation) | `clear()` on `X33VDataTypeList` |
| 3 | Cross-module: `FUW00121SFBean` | `FUW00121SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 4 | Cross-module: `FUW00123SFBean` | `FUW00123SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 5 | Cross-module: `FUW00125SFBean` | `FUW00125SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 6 | Cross-module: `FUW00129SFBean` | `FUW00129SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 7 | Cross-module: `FUW00131SFBean` | `FUW00131SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 8 | Cross-module: `FUW00133SFBean` | `FUW00133SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 9 | Cross-module: `FUW00134SFBean` | `FUW00134SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 10 | Cross-module: `FUW00164SFBean` | `FUW00164SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 11 | Cross-module: `FUW00166SFBean` | `FUW00166SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 12 | Cross-module: `FUW00117SFBean` | `FUW00117SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 13 | Cross-module: `FUW002201SFBean` | `FUW002201SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 14 | Cross-module: `FUW004901SFBean` | `FUW004901SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |
| 15 | Cross-module: `FUW006401SFBean` | `FUW006401SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` -> `FUW00110SF01DBean.clearListDataInstance` | `clear()` on `X33VDataTypeList` |

**Key observations:**
- `FUW00110SF01DBean.clearListDataInstance()` is the **parent implementation** that serves as the base class for a shared inheritance chain across multiple screen modules.
- Over 30+ bean classes (across `koptWebF` and `koptWebR`) override or extend this method by calling `super.clearListDataInstance(key)`.
- No callers were found in the `FUW00110SFLogic.java` or `FUW00110SFBean.java` (other than the overriding declaration itself), meaning this method is invoked indirectly — called from screen-level event handlers or from inherited beans during data reset flows.
- The method is a **shared utility** defined in the base DBean that cascades down through the inheritance hierarchy to all derived DBeans.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(key != null)` (L692)

> Defensive null-check. The X33 framework may inject `null` when the key parameter is missing from the screen's request parameters. If `key` is `null`, the method performs a no-op and returns immediately.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `// null-check branch` | Guard against `null` key parameter (L692) |
| 2 | EXEC | `// proceed to switch logic` | `key` is not `null`, continue to key-based routing (L693) |

**Block 1.1** — [IF-ELSE-IF] `(key.equals("項目数")) [項目数="item count"]` (L695)

> Clears the list holding the number of available dropdown options. The `list_size_list` field is an `X33VDataTypeList` containing `X33VDataTypeLongBean` elements, each representing the count of available items for a dynamic dropdown field. The Japanese key `"項目数"` translates to "item count" or "number of items."

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `list_size_list.clear();` | Removes all elements from the item count list (L696) |

**Block 1.2** — [ELSE-IF] `(key.equals("選択値")) [選択値="selected value"]` (L699)

> Clears the list holding the index of the currently selected dropdown option. The `sel_index_list` field is an `X33VDataTypeList` containing `X33VDataTypeLongBean` elements. The Japanese key `"選択値"` translates to "selected value" or "selection."

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `sel_index_list.clear();` | Removes all elements from the selected index list (L700) |

**Block 1.3** — [ELSE-IF] `(key.equals("項目実値")) [項目実値="item actual value"]` (L703)

> Clears the list holding the actual values for each dropdown option. The `true_value_list` field is an `X33VDataTypeList` containing `X33VDataTypeStringBean` elements. The Japanese key `"項目実値"` translates to "item actual value" — the real data value bound to each dropdown option (as opposed to its display label).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `true_value_list.clear();` | Removes all elements from the actual value list (L704) |

**Block 1.4** — [ELSE-IF] `(key.equals("項目ラベル")) [項目ラベル="item label"]` (L707)

> Clears the list holding the visible label text for each dropdown option. The `label_value_list` field is an `X33VDataTypeList` containing `X33VDataTypeStringBean` elements. The Japanese key `"項目ラベル"` translates to "item label" — the human-readable text displayed in the dropdown.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `label_value_list.clear();` | Removes all elements from the label list (L708) |

**Block 2** — [implicit else / fallthrough] `(key does not match any known value)` (L709)

> If `key` is non-null but does not match any of the four known Japanese keys, the method performs no action and returns. This is an implicit no-op — the method is designed to be robust against unexpected keys rather than throwing an exception.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | (implicit) | Returns void; no-op for unrecognized key (L709) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `list_size_list` | Field | Dropdown option count list — an `X33VDataTypeList` of `X33VDataTypeLongBean` entries holding the number of available items for dynamic dropdown fields. |
| `sel_index_list` | Field | Selected index list — an `X33VDataTypeList` of `X33VDataTypeLongBean` entries tracking the currently selected option's index within each dropdown. |
| `true_value_list` | Field | Actual value list — an `X33VDataTypeList` of `X33VDataTypeStringBean` entries holding the real data values bound to each dropdown option. |
| `label_value_list` | Field | Label text list — an `X33VDataTypeList` of `X33VDataTypeStringBean` entries containing the human-readable labels displayed in dropdown menus. |
| `X33VDataTypeList` | Technical | Fujitsu X33 framework's dynamic typed data list — a generic list container that holds `X33VDataTypeBeanInterface` objects, used to model dynamic UI form fields. |
| `X33VDataTypeLongBean` | Technical | A typed wrapper for `Long` data in the X33 framework, used within `X33VDataTypeList` for numeric UI field values. |
| `X33VDataTypeStringBean` | Technical | A typed wrapper for `String` data in the X33 framework, used within `X33VDataTypeList` for text UI field values. |
| `X33VDataTypeBeanInterface` | Technical | The X33 framework interface that all typed data beans must implement, providing getValue/setValue semantics. |
| `X33VListedBeanInterface` | Technical | The X33 framework interface marking a bean as containing list-type fields that can be iterated over. |
| `X33SException` | Technical | The X33 framework's checked exception class for screen-level errors. |
| `"項目数"` (Kōmoku-sū) | Japanese field | "Number of items" — the discriminator key that selects `list_size_list` for clearing. |
| `"選択値"` (Sentaku-chi) | Japanese field | "Selected value" — the discriminator key that selects `sel_index_list` for clearing. |
| `"項目実値"` (Kōmoku-jitsu-chi) | Japanese field | "Item actual value" — the discriminator key that selects `true_value_list` for clearing. |
| `"項目ラベル"` (Kōmoku raberu) | Japanese field | "Item label" — the discriminator key that selects `label_value_list` for clearing. |
| DBean | Acronym | Data Bean — a Java class in the X33 web framework that models the data state and binding properties of a single screen's UI fields. |
| DBean01 / DBean04 | Acronym | Sibling DBean variants within the `FUW00110SF` module (`01` = detail/data entry view, `04` = alternative view). They inherit or override the same base methods. |
| X33 Framework | Technical | Fujitsu's Futurity X33 web application framework — an enterprise MVC framework for building JavaServer Faces (JSF)–based business applications. |
