---

# Business Logic — KKW01027SF01DBean.clearListDataInstance() [10 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA15001SF.KKW01027SF01DBean` |
| Layer | Utility (Webview Data Bean — Framework lifecycle method) |
| Module | `KKA15001SF` (Package: `eo.web.webview.KKA15001SF`) |

## 1. Role

### KKW01027SF01DBean.clearListDataInstance()

This method is a **framework lifecycle hook** within the Fujitsu Futurity X33 web framework. Its purpose is to **clear (reset) specific list data elements** belonging to this DataBean when the framework requests initialization or reset of screen-held state. The method accepts a single key parameter that identifies which list-type field on the bean should be cleared. In this implementation, it supports one display item: the "motion reason code" (`異動理由コード`, item ID: `ido_rsn_cd`), which is an internal tracking field used to capture the reason for a service detail change or movement. When the framework passes the key for this item, the method clears the `ido_rsn_cd_list` instance field, which is an `X33VDataTypeList` used to hold the available options or values for that display item on the screen.

This is a **shared utility** method — it is implemented by the base bean `KKW01027SF01DBean` and called by the X33 framework during screen data lifecycle operations (data type binding, screen reset). It also participates in a **delegation pattern**: several subclasses (e.g., `FUW00964SFBean`, `FUW00927SFBean`) override this method to add their own child clear logic, then delegate upward with `super.clearListDataInstance(key)` to ensure the parent's list is also cleared.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["clearListDataInstance(String key)"])
    CHECK_NULL{key != null?}
    CHECK_MATCH{key equals motion reason code?}
    CLEAR["ido_rsn_cd_list.clear()"]
    SKIP["No-op (return)"]
    END_NODE(["Return"])

    START --> CHECK_NULL
    CHECK_NULL --> |No| SKIP
    CHECK_NULL --> |Yes| CHECK_MATCH
    CHECK_MATCH --> |Yes| CLEAR
    CHECK_MATCH --> |No| SKIP
    CLEAR --> END_NODE
    SKIP --> END_NODE
```

**Processing flow:**

1. **Null guard** — If `key` is `null`, the method returns immediately with no effect.
2. **Key dispatch** — If `key` is non-null, compare against the literal string `"異動理由コード"` (motion reason code).
3. **Conditional clear** — If the key matches, call `clear()` on the `ido_rsn_cd_list` field to reset all list entries. This field is an `X33VDataTypeList` that holds display values for the motion reason code item on the screen.
4. **Fall-through** — If the key does not match, the method returns with no effect (the key simply identifies an item this bean does not manage).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The item name (display label) of the list-type field to clear. This is the Japanese display label of the screen item, not a technical field ID. It acts as a dispatch key — the method branches based on which item the framework requests to clear. Expected value: `"異動理由コード"` (motion reason code, item ID: `ido_rsn_cd`). |
| — | `this.ido_rsn_cd_list` | `X33VDataTypeList` | Instance field holding the list of values for the motion reason code display item. This is an X33 framework data type list that stores selectable values presented to the user on screen. Cleared to empty when the method executes. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCCcomFileSearchUtil.clear` | JCCcomFileSearch | - | Calls `clear` in `JCCcomFileSearchUtil` |
| - | `JZMAdEdit.clear` | JZMAdEdit | - | Calls `clear` in `JZMAdEdit` |
| - | `KKA17101SFLogic.clear` | KKA17101SFLogic | - | Calls `clear` in `KKA17101SFLogic` |
| - | `KKA17401SFLogic.clear` | KKA17401SFLogic | - | Calls `clear` in `KKA17401SFLogic` |
| - | `KKA17601SFLogic.clear` | KKA17601SFLogic | - | Calls `clear` in `KKA17601SFLogic` |

**Note:** This method performs a **local data reset** only — it calls `clear()` on an in-memory `X33VDataTypeList` field. It does not execute any database operations, service component calls, or CBS invocations. No CRUD operations are performed.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKA15001 | X33 framework lifecycle -> `KKW01027SF01DBean.clearListDataInstance` | `ido_rsn_cd_list.clear [U] in-memory list` |

**Framework callers (subclass delegation):**

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 2 | Screen:FUW00901 | `FUW00901SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 3 | Screen:FUW00907 | `FUW00907SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 4 | Screen:FUW00912 | `FUW00912SF01DBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 5 | Screen:FUW00917 | `FUW00917SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 6 | Screen:FUW00919 | `FUW00919SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 7 | Screen:FUW00926 | `FUW00926SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 8 | Screen:FUW00927 | `FUW00927SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 9 | Screen:FUW00931 | `FUW00931SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 10 | Screen:FUW00957 | `FUW00957SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 11 | Screen:FUW00959 | `FUW00959SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |
| 12 | Screen:FUW00964 | `FUW00964SFBean.clearListDataInstance(key)` -> `super.clearListDataInstance(key)` | `ido_rsn_cd_list.clear [U] in-memory list` |

**Note:** Several subclasses override `clearListDataInstance()` and call `super.clearListDataInstance(key)` to ensure the parent's list state is also cleared during screen reset. The primary entry point is the X33 framework's data lifecycle management for screen `KKA15001SF`.

## 6. Per-Branch Detail Blocks

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

> Null guard: prevent NullPointerException by checking if the key parameter is non-null.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `key != null` // Null guard to prevent NPE |
| 2 | EXEC | (proceed to Block 2) |

**Block 2** — [IF-ELSE] `(key.equals("異動理由コード"))` [ISDOU_RIYU_KODO="異動理由コード"] (L666)

> Dispatch: check if the requested item name matches the motion reason code display label. The literal string `"異動理由コード"` is the Japanese screen label for the item whose internal field ID is `ido_rsn_cd`.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `key.equals("異動理由コード")` // Compare key against motion reason code display label [-> "異動理由コード" = motion reason code] |
| 2 | EXEC | `ido_rsn_cd_list.clear()` // Clear all entries in the motion reason code list field |

**Block 2.1** — [IF branch: match] `key.equals("異動理由コード")` is true (L666)

> Clear the in-memory list. This resets all values held by the `ido_rsn_cd_list` field, which is an `X33VDataTypeList` used by the X33 framework to render the motion reason code dropdown/select on the screen.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `ido_rsn_cd_list.clear()` // Reset list to empty — all display options for motion reason code are cleared |

**Block 2.2** — [IF branch: no-match] `key.equals("異動理由コード")` is false (implicit L666)

> The key identifies a different screen item that this bean does not manage. No action is taken; the method continues to return.

| # | Type | Code |
|---|------|------|
| 1 | — | (no-op — method falls through to end) |

**Block 1.1** — [ELSE branch: null key] `key != null` is false (L663)

> The key is null. No operation is performed to avoid NullPointerException. The method returns immediately.

| # | Type | Code |
|---|------|------|
| 1 | — | (no-op — method falls through to end) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ido_rsn_cd` | Field | Motion reason code — the internal field ID for the reason/description of a service detail change or movement (異動理由) |
| `ido_rsn_cd_list` | Field | Motion reason code list — an `X33VDataTypeList` holding the selectable values for the motion reason code display item on screen |
| `異動理由コード` | Field (Japanese) | Motion reason code — the Japanese display label shown to users for the `ido_rsn_cd` field on the screen |
| X33VDataTypeList | Framework type | Fujitsu X33 framework data type — a typed list container used by the X33 web framework to manage screen-level list/select values |
| X33 framework | Framework | Futurity X33 — Fujitsu's enterprise web application framework for building screen-based transactional applications |
| DBean | Architecture term | DataBean — a framework-specific bean that holds screen-level display data (as opposed to SFBean which holds shared screen state) |
| KKA15001SF | Screen ID | Standard work cost split request (STEP2) — the screen/module this bean belongs to |
| clearListDataInstance | Method | Framework lifecycle method — called by the X33 framework to reset/clear list-type data items during screen initialization or reset |

---
