# Business Logic — KKW00130SF01DBean.clearListDataInstance() [14 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00130SF.KKW00130SF01DBean` |
| Layer | Web UI Data Bean (view-level data holder for the KKSVxxxx screen) |
| Module | `KKW00130SF` (Package: `eo.web.webview.KKW00130SF`) |

## 1. Role

### KKW00130SF01DBean.clearListDataInstance()

This method is a UI data bean utility that clears specific list-based selection data held within the KKW00130SF screen's data bean. The KKW00130SF module handles code list display functionality, where users interact with code values (コードリスト) and code names (コード名リスト) presented as dropdown or selectable lists. The method implements a simple dispatch pattern: given a key identifying which list to clear, it clears either the code value list (`cd_list_list`) or the code name list (`cd_nm_list_list`). It plays the role of a data reset mechanism in the web presentation layer, typically invoked during screen initialization, data re-search operations, or before repopulating lists with fresh data. The method is a pure side-effect operation — it mutates bean state and returns void, acting as a shared UI cleanup utility called from the screen's action handlers or page lifecycle methods.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["clearListDataInstance(String key)"])
    CHECK_NULL{"key != null"}
    CHECK_CODELIST{"key equals \"Code List\""}
    CLEAR_CD["cd_list_list.clear()"]
    CHECK_CDNM{"key equals \"Code Name List\""}
    CLEAR_CD_NM["cd_nm_list_list.clear()"]
    END_NODE(["Return"])

    START --> CHECK_NULL
    CHECK_NULL -->|false| END_NODE
    CHECK_NULL -->|true| CHECK_CODELIST
    CHECK_CODELIST -->|true| CLEAR_CD
    CHECK_CODELIST -->|false| CHECK_CDNM
    CLEAR_CD --> END_NODE
    CHECK_CDNM -->|true| CLEAR_CD_NM
    CHECK_CDNM -->|false| END_NODE
    CLEAR_CD_NM --> END_NODE
```

**CRITICAL — Constant Resolution:**
No constants are used in this method. All comparisons use hardcoded Japanese string literals:
- `"コードリスト"` (Code List) — item ID `cd_list` — the code value dropdown list
- `"コード名リスト"` (Code Name List) — item ID `cd_nm_list` — the code name dropdown list

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The identifier of the list element to clear. Valid values are `"コードリスト"` (Code List, item ID: `cd_list`) which clears the code values display list, and `"コード名リスト"` (Code Name List, item ID: `cd_nm_list`) which clears the code names display list. If the value does not match either, or is `null`, no action is taken. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `cd_list_list` | `X33VDataTypeList` | The code value list — holds selectable code value entries displayed in UI dropdowns |
| `cd_nm_list_list` | `X33VDataTypeList` | The code name list — holds selectable code name entries displayed in UI dropdowns |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCCcomFileSearchUtil.clear` | JCCcomFileSearch | - | Calls `clear` in `JCCcomFileSearchUtil` — **Not called in this method** |
| - | `JZMAdEdit.clear` | JZMAdEdit | - | Calls `clear` in `JZMAdEdit` — **Not called in this method** |
| - | `KKA17101SFLogic.clear` | KKA17101SFLogic | - | Calls `clear` in `KKA17101SFLogic` — **Not called in this method** |
| - | `KKA17401SFLogic.clear` | KKA17401SFLogic | - | Calls `clear` in `KKA17401SFLogic` — **Not called in this method** |
| - | `KKA17601SFLogic.clear` | KKA17601SFLogic | - | Calls `clear` in `KKA17601SFLogic` — **Not called in this method** |

This method does not invoke any external service components, CBS, or database operations. It performs pure in-memory clearing of the bean's internal list fields by calling `clear()` on the `X33VDataTypeList` instances.

## 5. Dependency Trace

No callers of `clearListDataInstance()` were found in the codebase (searched 59,002 Java files). This suggests the method is either invoked dynamically via reflection by the X33 Web Client framework (which calls data bean methods by method name from JSP/page definitions), or it is intended for use by screen classes that are not present in this search scope.

**No callers found.**

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | *(No callers found — likely invoked by X33 framework reflection or screen classes outside search scope)* | — | — |

## 6. Per-Branch Detail Blocks

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

> Verifies that the provided key is non-null before attempting any comparison. Prevents NullPointerException when accessing `key.equals()`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `key.equals("コードリスト")` — Check if key identifies the Code List element (item ID: `cd_list`) [-> `true` if matches, `false` if not] |

**Block 1.1** — [IF / ELSE-IF / ELSE] `(key.equals("コードリスト") / key.equals("コード名リスト"))` (L485)

> Dispatches to the appropriate list-clearing operation based on which named element the key identifies. The two hardcoded string literals correspond to the two code list display fields in the KKW00130SF screen.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if(key.equals("コードリスト"))` — Key matches "Code List" (item ID: `cd_list`) |

**Block 1.1.1** — [IF body] `"コードリスト"` matched (L486)

> Clears the code values list. The `cd_list_list` field holds `X33VDataTypeList` instances where each element is a `X33VDataTypeStringBean` representing a selectable code value shown in the UI dropdown.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_list_list.clear()` — Clear the code values display list |

**Block 1.2** — [ELSE-IF] `"コード名リスト"` matched (L490)

> Clears the code names list. The `cd_nm_list_list` field holds `X33VDataTypeList` instances where each element is a `X33VDataTypeStringBean` representing a selectable code name shown in the UI dropdown.

| # | Type | Code |
|---|------|------|
| 1 | IF | `else if(key.equals("コード名リスト"))` — Key matches "Code Name List" (item ID: `cd_nm_list`) |

**Block 1.2.1** — [ELSE-IF body] `"コード名リスト"` matched (L491)

> Clears the code names display list.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_nm_list_list.clear()` — Clear the code names display list |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `コードリスト` | Japanese Field | Code List — the code value entries displayed in UI dropdown/select controls |
| `コード名リスト` | Japanese Field | Code Name List — the code name (description) entries displayed in UI dropdown/select controls |
| `cd_list` | Field ID | Item ID for the code values list element — maps to `cd_list_list` bean field |
| `cd_nm_list` | Field ID | Item ID for the code names list element — maps to `cd_nm_list_list` bean field |
| `cd_list_list` | Bean Field | Code values display list — holds `X33VDataTypeList` of `X33VDataTypeStringBean` entries for code values |
| `cd_nm_list_list` | Bean Field | Code names display list — holds `X33VDataTypeList` of `X33VDataTypeStringBean` entries for code names |
| X33 | Technical | Fujitsu Futurity X33 Web Application Framework — the enterprise web framework used to build the UI beans |
| X33VDataTypeList | Technical | Framework type for typed dynamic lists — a list container that holds strongly-typed data bean elements |
| X33VDataTypeStringBean | Technical | Framework wrapper for String-typed data — each list element is wrapped in this type for type safety |
| KKW00130SF | Module | Code List display screen module — handles code value/code name selection functionality in the web UI |
| DBean | Technical | Data Bean — view-layer data holder class that stores screen state and provides getter/setter methods for JSP binding |
| `key` | Parameter | Element identifier — specifies which list element (`cd_list` or `cd_nm_list`) to clear |
