# Business Logic — KKW00129SF01DBean.clearListDataInstance() [18 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA17701SF.KKW00129SF01DBean` |
| Layer | UI/View (Data Bean — X33 framework view-tier component) |
| Module | `KKA17701SF` (Package: `eo.web.webview.KKA17701SF`) |

## 1. Role

### KKW00129SF01DBean.clearListDataInstance()

This method is the **list-data lifecycle manager** for the KKA17701SF screen's dropdown/select list components. It implements the X33 framework's standard `X33VListedBeanInterface` contract by providing keyed clearing of `X33VDataTypeList` instances that drive JSF `<selectOneListbox>` and `<selectManyListbox>` UI controls. When invoked — typically during screen initialization, reset, or data refresh cycles — the method dispatches on the string `key` parameter to identify which specific list should be cleared. It handles **three distinct business list categories**: initial setup code lists (初期設定コードリスト), code classification lists (コードリスト), and code name lists (コード名リスト). This is a **pure view-state reset utility** with no data access, no CRUD, and no side effects beyond clearing in-memory `X33VDataTypeList` collections. The method is a shared lifecycle callback, part of a standard interface inherited across dozens of DBean classes throughout the application (30+ classes across `FUW009*SF` modules call `super.clearListDataInstance(key)`), enabling consistent list-data cleanup across the entire web application.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["clearListDataInstance params"])
    CHECK_NULL["key is not null"]
    CHECK_INIT["key equals Initial setup code list"]
    CLEAR_INIT["default_cd_list_list.clear"]
    CHECK_CODE["key equals Code list"]
    CLEAR_CODE["cd_div_cd_list_list.clear"]
    CHECK_NAM["key equals Code name list"]
    CLEAR_NAM["cd_div_nm_list_list.clear"]
    SKIP["No match skip"]
    END_RETURN(["Return"])

    START --> CHECK_NULL
    CHECK_NULL --> Yes1
    CHECK_NULL --> No1["false"]
    Yes1["true"] --> CHECK_INIT
    CHECK_INIT --> Yes2
    CHECK_INIT --> No2["false"]
    Yes2["true"] --> CLEAR_INIT
    CHECK_CODE --> Yes3
    CHECK_CODE --> No3["false"]
    Yes3["true"] --> CLEAR_CODE
    CHECK_NAM --> Yes4["true"]
    CHECK_NAM --> No4["false"]
    Yes4 --> CLEAR_NAM
    No4 --> SKIP
    CLEAR_INIT --> END_RETURN
    CLEAR_CODE --> END_RETURN
    CLEAR_NAM --> END_RETURN
    SKIP --> END_RETURN
    No1 --> END_RETURN
    No2 --> CHECK_CODE
    No3 --> CHECK_NAM
```

**Processing flow:**

1. **Null guard** — The method first verifies the `key` parameter is not `null`. If `key` is `null`, the method returns immediately without performing any action. This prevents `NullPointerException` when downstream screens or framework code pass an uninitialized key.

2. **Branch on key string** — Three `if` / `else-if` branches match the `key` against hardcoded Japanese string literals. Each branch calls `.clear()` on a specific `X33VDataTypeList` field, effectively resetting the dropdown data for that UI component.

3. **No-match passthrough** — If the key does not match any of the three known strings, the method silently returns, which allows the caller to check multiple list types without side effects from unrecognized keys.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | List identifier — a Japanese string literal that selects which `X33VDataTypeList` instance to clear. Valid values are: "初期設定コードリスト" (Initial setup code list — resets default code dropdown data), "コードリスト" (Code list — resets code classification dropdown data), "コード名リスト" (Code name list — resets code name dropdown data). |
| — | `default_cd_list_list` | `X33VDataTypeList` | Internal field — the X33 framework data type list holding the initial setup code values. Emptied when `key` matches "初期設定コードリスト". |
| — | `cd_div_cd_list_list` | `X33VDataTypeList` | Internal field — the X33 framework data type list holding the code classification values. Emptied when `key` matches "コードリスト". |
| — | `cd_div_nm_list_list` | `X33VDataTypeList` | Internal field — the X33 framework data type list holding the code name values. Emptied when `key` matches "コード名リスト". |

## 4. CRUD Operations / Called Services

This method performs **no database operations, no SC/CBS calls, and no file I/O**. It manipulates only in-memory view-state lists via `X33VDataTypeList.clear()`.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `X33VDataTypeList.clear` | N/A | N/A | Calls `clear()` on an `X33VDataTypeList` instance, removing all SelectItem elements from the list backing a JSF dropdown control. |

There are no external service component calls, no CBS invocations, and no entity-level database access. The operation is entirely a **view-state reset** within the UI tier.

## 5. Dependency Trace

This method is part of the X33 framework's `X33VListedBeanInterface` contract. It is invoked by the framework itself during screen lifecycle events (e.g., data refresh, view reset) and is also called via `super.clearListDataInstance(key)` from subclasses in multiple downstream screens. No direct callers were found within this specific module.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Frame: X33VListedBeanInterface | Framework lifecycle callback | `X33VDataTypeList.clear()` |
| 2 | Screen: FUW00901SF | `FUW00901SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 3 | Screen: FUW00907SF | `FUW00907SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 4 | Screen: FUW00914SF | `FUW00914SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 5 | Screen: FUW00916SF | `FUW00916SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 6 | Screen: FUW00917SF | `FUW00917SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 7 | Screen: FUW00919SF | `FUW00919SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 8 | Screen: FUW00926SF | `FUW00926SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 9 | Screen: FUW00927SF | `FUW00927SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 10 | Screen: FUW00931SF | `FUW00931SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 11 | Screen: FUW00946SF | `FUW00946SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 12 | Screen: FUW00947SF | `FUW00947SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 13 | Screen: FUW00957SF | `FUW00957SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 14 | Screen: FUW00959SF | `FUW00959SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |
| 15 | Screen: FUW00961SF | `FUW00961SFBean.clearListDataInstance(key)` → `super.clearListDataInstance(key)` | `X33VDataTypeList.clear()` |

## 6. Per-Branch Detail Blocks

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

> Null guard: verify the key parameter is not null before proceeding. If null, skip all processing and return.

| # | Type | Code |
|---|------|------|
| 1 | SET | `// No assignment — guard clause` |
| 2 | CALL | `default_cd_list_list_list.clear()` — Branch on L773 [-> `key = "初期設定コードリスト" (Initial setup code list)`] |
| 3 | CALL | `cd_div_cd_list_list.clear()` — Branch on L778 [-> `key = "コードリスト" (Code list)`] |
| 4 | CALL | `cd_div_nm_list_list.clear()` — Branch on L783 [-> `key = "コード名リスト" (Code name list)`] |

**Block 1.1** — [IF] `(key.equals("初期設定コードリスト"))` [初期設定コードリスト="初期設定コードリスト" = Initial setup code list] (L773)

> Clears the `default_cd_list_list` X33VDataTypeList instance. This list drives the JSF dropdown for initial setup codes (初期設定コード).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `default_cd_list_list.clear()` — Clear all SelectItem entries from the initial setup code list |

**Block 1.2** — [ELSE-IF] `(key.equals("コードリスト"))` [コードリスト="コードリスト" = Code list] (L778)

> Clears the `cd_div_cd_list_list` X33VDataTypeList instance. This list drives the JSF dropdown for code classifications (コード分類).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_div_cd_list_list.clear()` — Clear all SelectItem entries from the code classification list |

**Block 1.3** — [ELSE-IF] `(key.equals("コード名リスト"))` [コード名リスト="コード名リスト" = Code name list] (L783)

> Clears the `cd_div_nm_list_list` X33VDataTypeList instance. This list drives the JSF dropdown for code names (コード名).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_div_nm_list_list.clear()` — Clear all SelectItem entries from the code name list |

**Block 2** — [ELSE / implicit] `(key does not match any known key)` (L786)

> No matching key found. The method returns without performing any action. This allows callers to invoke `clearListDataInstance` with arbitrary keys without side effects.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return;` — Implicit void return, no data modification occurred |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `初期設定コードリスト` | Field / Key | Initial setup code list — the Japanese string literal used as the key identifier for clearing the default/initial setup code dropdown values |
| `コードリスト` | Field / Key | Code list — the Japanese string literal used as the key identifier for clearing the code classification dropdown values |
| `コード名リスト` | Field / Key | Code name list — the Japanese string literal used as the key identifier for clearing the code name dropdown values |
| `default_cd_list_list` | Field | Default code list — an `X33VDataTypeList` instance holding the `SelectItem` options for the initial setup code JSF dropdown control |
| `cd_div_cd_list_list` | Field | Code classification list — an `X33VDataTypeList` instance holding the `SelectItem` options for the code classification JSF dropdown control |
| `cd_div_nm_list_list` | Field | Code name list — an `X33VDataTypeList` instance holding the `SelectItem` options for the code name JSF dropdown control |
| X33VListedBeanInterface | Interface | Fujitsu X33 framework interface that requires `clearListDataInstance(String)` implementation for view-list data lifecycle management |
| X33VDataTypeList | Framework class | X33 framework wrapper around `java.util.List<SelectItem>` that provides type-safe data binding for JSF list-based UI components |
| KKA17701SF | Module | Application module identifier — the service screen module containing this data bean |
| DBean | Component | Data Bean — a presentation-tier class in the X33 framework that holds and manipulates view-state data for a JSF screen |
| SelectItem | JSF class | JavaServer Faces class representing an option in a dropdown/listbox component (label-value pair) |
