---

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

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00127SF.KKW00127SF01DBean` |
| Layer | Web View Bean (Controller/View Component) |
| Module | `KKW00127SF` (Package: `eo.web.webview.KKW00127SF`) |

## 1. Role

### KKW00127SF01DBean.clearListDataInstance()

This method serves as a targeted list-clearing utility within the X33 web view bean framework. Its business purpose is to selectively clear (empty) specific list-based data fields on a screen state object, enabling the UI to reset and rebuild dropdown or selection lists during page lifecycle operations such as screen transitions, form resets, or re-initialization. The method implements a dispatch/routing pattern: it inspects the provided `key` parameter against known list identifiers and routes to the appropriate list field for clearing. It acts as a shared utility method on the view bean, callable by any screen processing class (CBS, logic, or controller) that needs to reset list data without knowing internal field names directly. The two supported list categories are the code list (`コードリスト`, used for dropdown code values) and the code name list (`コード名リスト`, used for human-readable code labels). No database or service-layer interaction occurs — this is a pure in-memory view state operation.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["clearListDataInstance(String key)"])

    START --> COND1{"key != null?"}

    COND1 -->|Yes| COND2{"key equals code list?"}
    COND1 -->|No| END_NODE(["Return"])

    COND2 -->|Yes: コードリスト| CLEAR1["cd_div_list_list.clear()"]
    COND2 -->|No: other value| COND3{"key equals code name list?"}

    COND3 -->|Yes: コード名リスト| CLEAR2["cd_div_nm_list_list.clear()"]
    COND3 -->|No: other value| END_NODE

    CLEAR1 --> CLEAR2
    CLEAR2 --> END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The identifier of the list field to clear. Acts as a discriminator for which view bean list should be reset. Valid values are: `コードリスト` (Code List — used to clear code value entries for dropdown/combo boxes), `コード名リスト` (Code Name List — used to clear human-readable label entries paired with the code list). If null or an unrecognized value is passed, the method returns without action. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `cd_div_list_list` | `X33VDataTypeList` | The code list data store — holds the code values (e.g., service type codes, status codes) displayed in screen dropdowns and comboboxes |
| `cd_div_nm_list_list` | `X33VDataTypeList` | The code name list data store — holds the human-readable label text corresponding to each code value in `cd_div_list_list` |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `X33VDataTypeList.clear` | (view bean) | (in-memory list) | Calls `clear()` on `cd_div_list_list` to remove all code value entries from the code list |
| - | `X33VDataTypeList.clear` | (view bean) | (in-memory list) | Calls `clear()` on `cd_div_nm_list_list` to remove all code name entries from the code name list |

**Note:** This method performs no database or service component (SC/CBS) operations. It is a pure in-memory view bean state mutation.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen utilities | Various screen CBS/logic beans call `clearListDataInstance(key)` to reset view state | `cd_div_list_list.clear()` (view) |

**Note:** No direct callers of `KKW00127SF01DBean.clearListDataInstance()` were found in the codebase scan. This method is inherited by subclass beans (e.g., `FUW009xxSFBean` classes call `super.clearListDataInstance(key)`), meaning the calling screens are likely defined in the FUW009xxSF module hierarchy. The method functions as a view bean lifecycle utility called during screen initialization, reset, or transition processing.

## 6. Per-Branch Detail Blocks

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

> Guard against null key. If the caller passes null, the method returns without performing any action, preventing a NullPointerException.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_div_list_list.clear()` |

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

> Clear the code list (code value entries) used by screen dropdowns and comboboxes. The Japanese string "コードリスト" translates to "Code List" — this is the list of raw code values displayed in selection widgets.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_div_list_list.clear()` // Clear the code list (リスト項目 "コードリスト") [-> コードリスト="コードリスト"] |

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

> Clear the code name list (human-readable label entries). The Japanese string "コード名リスト" translates to "Code Name List" — this is the list of display labels paired with the code values.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `cd_div_nm_list_list.clear()` // Clear the code name list (リスト項目 "コード名リスト") [-> コード名リスト="コード名リスト"] |

**Block 1.3** — [ELSE / No match] (implicit)

> If the key does not match either known list identifier, the method proceeds to return without clearing any list. No action is taken.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | (implicit return from void method) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `cd_div_list_list` | Field | Code division list — an `X33VDataTypeList` holding code value entries (e.g., numeric or alpha codes for service types, statuses) displayed in screen dropdown/combo boxes |
| `cd_div_nm_list_list` | Field | Code division name list — an `X33VDataTypeList` holding human-readable label text corresponding to each code value in `cd_div_list_list` |
| `key` | Parameter | List identifier — the discriminator used to select which list field to clear. Valid values are Japanese strings identifying the target list type |
| コードリスト | Field/Value | "Code List" — Japanese identifier for the code value list; clearing this removes the raw code entries from screen selection widgets |
| コード名リスト | Field/Value | "Code Name List" — Japanese identifier for the code label list; clearing this removes the display names paired with the code values |
| X33VDataTypeList | Type | A view framework data structure from the Fujitsu X33 framework that wraps typed list data for binding to JSF UI components |
| X33VViewBaseBean | Type | Base class for X33 web view beans; provides common view-state management capabilities |
| X33VListedBeanInterface | Interface | X33 interface marking a bean as capable of holding listed/iterated data for UI rendering |
| KKW00127SF | Module | Screen/feature module code — a web screen module within the K-Opticom billing/provisioning system |

---