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

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW03407SF.CRW03407SF01DBean` |
| Layer | DBean (Data Bean / View Model — Web presentation layer) |
| Module | `CRW03407SF` (Package: `eo.web.webview.CRW03407SF`) |

## 1. Role

### CRW03407SF01DBean.clearListDataInstance()

This method provides a centralized mechanism to clear (empty) specific list-based data fields within the `CRW03407SF01DBean` view model. It implements a **key-based dispatch pattern**, where a single string parameter identifies which of several associated lists should be cleared. The method is used to reset UI-bound list data for **Response History External Connection** screen elements — specifically URL number lists, URL lists, and URL name lists. As a DBean utility method, it serves as a **shared reset utility** called during screen lifecycle events (e.g., screen transitions, form resets, or re-display after errors) to ensure stale list data is not carried over to a fresh screen state. The method is designed to be safely callable with a null key or an unrecognized key — in both cases, it performs no operation and returns gracefully without exception.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["clearListDataInstance(String key)"])
    CHECK_NULL{key != null?}
    CLEAR_1(["l0_taiorrk_out_url_no_list.clear()"])
    CLEAR_2(["l0_taiorrk_out_url_list.clear()"])
    CLEAR_3(["l0_taiorrk_out_url_nm_list.clear()"])
    END_NODE(["Return / Next"])

    START --> CHECK_NULL
    CHECK_NULL -->|No| END_NODE
    CHECK_NULL -->|Yes| CMP_KEY{key matches list key?}
    CMP_KEY -->|"対応履歴外部接続URL番号リスト"| CLEAR_1
    CMP_KEY -->|"対応履歴外部接続URLリスト"| CLEAR_2
    CMP_KEY -->|"対応履歴外部接続URL名リスト"| CLEAR_3
    CLEAR_1 --> END_NODE
    CLEAR_2 --> END_NODE
    CLEAR_3 --> END_NODE
```

**CRITICAL — Constant Resolution:**

The three literal string values used as dispatch keys are Japanese labels defined inline (no external constant references found). They map as follows:

| Dispatch Key (Japanese) | English Meaning | Target Field |
|--------------------------|----------------|--------------|
| `対応履歴外部接続URL番号リスト` | Response History External Connection URL Number List | `l0_taiorrk_out_url_no_list` |
| `対応履歴外部接続URLリスト` | Response History External Connection URL List | `l0_taiorrk_out_url_list` |
| `対応履歴外部接続URL名リスト` | Response History External Connection URL Name List | `l0_taiorrk_out_url_nm_list` |

These are inline string literals (not resolved from constant files), used as discriminators in the if-else chain.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | The list item identifier that determines which internal list field to clear. It must match one of the three Japanese string labels corresponding to URL-related lists in the Response History External Connection screen. If `null`, no operation is performed. If unrecognized, no operation is performed. |

**Instance fields read:**

| Field | Type | Business Meaning |
|-------|------|------------------|
| `l0_taiorrk_out_url_no_list` | `List<String>` | URL number list — stores the URL number identifiers for external connections in response history |
| `l0_taiorrk_out_url_list` | `List<String>` | URL list — stores the actual URL strings for external connections in response history |
| `l0_taiorrk_out_url_nm_list` | `List<String>` | URL name list — stores the display names associated with external connection URLs in response history |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `ArrayList.clear()` | - | - | Calls `java.util.List.clear()` on target list to remove all elements |
| - | `ArrayList.clear()` | - | - | Calls `java.util.List.clear()` on target list to remove all elements |
| - | `ArrayList.clear()` | - | - | Calls `java.util.List.clear()` on target list to remove all elements |

**Analysis:** This method performs **in-memory data manipulation only** — it calls `List.clear()` on Java collection fields, clearing all entries from the respective lists. There are **no database operations**, no SC (Service Component) calls, and no CBS (Common Business Service) invocations. This is a pure view-model reset operation.

## 5. Dependency Trace

**Upstream callers:** No callers found within the `CRW03407SF` module. This method is not invoked from `CRW03407SFBean`, `CRW03407SFLogic`, or any other class in the module. It is likely called indirectly via the parent/ancestor class's dispatch mechanism or through a screen controller not present in this module.

**Downstream calls:** This method calls only standard Java `List.clear()` on instance fields. No external services or components are invoked.

## 6. Per-Branch Detail Blocks

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

> Null-safety guard: only proceed with clearing if the key parameter is non-null. If null, skip all processing and return immediately.

| # | Type | Code |
|---|------|------|
| 1 | CHECK | `if (key != null)` // Null-safety guard — only process if key is provided |

---

**Block 1.1** — [IF] `(key.equals("対応履歴外部接続URL番号リスト"))` [Response History External Connection URL Number List] (L624)

> When the key matches the URL number list identifier, clear the `l0_taiorrk_out_url_no_list` field.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `l0_taiorrk_out_url_no_list.clear()` // Clears all URL number entries from the response history external connection URL number list |

---

**Block 1.2** — [ELSE-IF] `(key.equals("対応履歴外部接続URLリスト"))` [Response History External Connection URL List] (L628)

> When the key matches the URL list identifier, clear the `l0_taiorrk_out_url_list` field.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `l0_taiorrk_out_url_list.clear()` // Clears all URL entries from the response history external connection URL list |

---

**Block 1.3** — [ELSE-IF] `(key.equals("対応履歴外部接続URL名リスト"))` [Response History External Connection URL Name List] (L632)

> When the key matches the URL name list identifier, clear the `l0_taiorrk_out_url_nm_list` field.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `l0_taiorrk_out_url_nm_list.clear()` // Clears all URL name entries from the response history external connection URL name list |

---

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `対応履歴` | Field | Response History — records of external system connections and their responses during business processing |
| `外部接続` | Field | External Connection — connection to external systems or services (e.g., third-party APIs, partner systems) |
| `URL番号` | Field | URL Number — a unique identifier assigned to each external connection URL |
| `URL名` | Field | URL Name — a human-readable display name for an external connection URL |
| `l0_taiorrk` | Field | List 0 Response History — internal naming convention where "l0" likely denotes the first list group and "taiorrk" is an abbreviation for 対応履歴 (Response History) |
| `DBean` | Acronym | Data Bean — a view model class that holds data for display on a screen, providing getters/setters for JSP/View binding |
| `CRW03407SF` | Module | Screen Feature module 03407 — a web screen module handling response history external connection operations |
| X33SException | Technical | Custom exception class — likely a checked exception from the framework's exception hierarchy, thrown for screen-level processing errors |
| `List.clear()` | API | Java standard library method — removes all elements from a List, leaving it empty (size = 0) |
