# Business Logic — KKW01023SF02DBean.listKoumokuIds() [8 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW01023SF.KKW01023SF02DBean` |
| Layer | View/Bean (Web Layer — data type bean providing UI column metadata) |
| Module | `KKW01023SF` (Package: `eo.web.webview.KKW01023SF`) |

## 1. Role

### KKW01023SF02DBean.listKoumokuIds()

This method provides the column header labels (item names) for a **data type bean view** used in the Discount Service Contract listing screen (KKW01023SF). It returns an `ArrayList<String>` containing five Japanese UI field names that serve as column headers for a grid or table displaying **campaign target application conditions** (キャンペーン対象適用条件).

The method implements the **Data Type Bean** design pattern, which is a standard architectural convention in this codebase. Under this pattern, each data type bean class is responsible for declaring its own set of display columns (koumoku items). The parent bean `KKW01023SFBean` acts as a central registry: when a caller requests item names for a specific data type key, it dispatches to the corresponding bean's `listKoumokuIds()` method. In this case, `KKW01023SF02DBean` is the data type bean assigned to the "Campaign Target Application Conditions" item.

As a static utility method, it is called without instantiating the bean — it simply provides metadata (column labels) for the view layer to render a table or form. It has no side effects, no database access, and no conditional branching. Its role is purely declarative: it tells the UI layer what columns to display.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["listKoumokuIds()"])
    INIT["Create ArrayList String koumokuList"]
    ADD1["Add Number and Document Count to list"]
    ADD2["Add Target Contract ID Name to list"]
    ADD3["Add Target Contract Number to list"]
    ADD4["Add Target Service Name to list"]
    RET["Return koumokuList"]
    END_NODE(["Return Next"])

    START --> INIT
    INIT --> ADD1
    ADD1 --> ADD2
    ADD2 --> ADD3
    ADD3 --> ADD4
    ADD4 --> RET
    RET --> END_NODE
```

**Processing summary:**
1. **Initialize** — Create a new `ArrayList<String>` named `koumokuList`.
2. **Populate** — Add five column label strings in order: "番号／件数", "対象契約識別コード名称", "対象契約番号", "対象サービス名称".
3. **Return** — Return the populated list to the caller.

This method contains no conditional branches, no loops, and no external calls. It is a linear data builder that constructs and returns a static list of column headers.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This is a static method with no parameters. It always returns the same five-column header list regardless of input. |

**Instance fields or external state read:** None. This method is fully self-contained and stateless.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no external services**. It only constructs a local `ArrayList` via `add()`, which is an in-memory collection operation, not a database operation.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | — | — | — | No database or service component calls. Pure in-memory list construction. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Bean:KKW01023SFBean | `KKW01023SFBean.listKoumokuIds(String key)` → check `key.equals("キャンペーン対象適用条件")` → `KKW01023SF02DBean.listKoumokuIds()` | — (no terminal CRUD) |

**Caller details:**

The sole caller is `KKW01023SFBean.listKoumokuIds(String key)`, which is the parent view bean's item-name query method. When the `key` parameter equals `"キャンペーン対象適用条件"` (Campaign Target Application Conditions), the parent bean delegates to `KKW01023SF02DBean.listKoumokuIds()` to retrieve the column labels specific to that data type. This delegation pattern allows the parent bean to support multiple data types, each with its own set of columns.

## 6. Per-Branch Detail Blocks

> This method has no conditional branches, loops, or try-catch blocks. The entire method body is a single linear block.

**Block 1** — [METHOD BODY] (L381)

> Construct and return a list of column header labels for the data type bean view. This block builds the display metadata for the "Campaign Target Application Conditions" grid columns.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList<String> koumokuList = new ArrayList<String>()` — Create new empty list |
| 2 | EXEC | `koumokuList.add("番号／件数")` — Add "Number / Document Count" (Japanese: 番号／件数) as first column header [-> "番号／件数" (Number/Document Count)] |
| 3 | EXEC | `koumokuList.add("対象契約識別コード名称")` — Add "Target Contract Identification Code Name" (Japanese: 対象契約識別コード名称) as second column header [-> "対象契約識別コード名称" (Target Contract Identification Code Name)] |
| 4 | EXEC | `koumokuList.add("対象契約番号")` — Add "Target Contract Number" (Japanese: 対象契約番号) as third column header [-> "対象契約番号" (Target Contract Number)] |
| 5 | EXEC | `koumokuList.add("対象サービス名称")` — Add "Target Service Name" (Japanese: 対象サービス名称) as fourth column header [-> "対象サービス名称" (Target Service Name)] |
| 6 | RETURN | `return koumokuList` — Return the populated list to the caller |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `koumoku` | Field | Item / column — Japanese naming convention for UI column or field identifiers |
| `listKoumokuIds` | Method | List of item/column names — returns display labels for a data type bean's view columns |
| データタイプビーン | Japanese | Data Type Bean — a design pattern where bean classes declare their own set of display columns for the UI layer |
| キャンペーン対象適用条件 | Japanese | Campaign Target Application Conditions — a data type that defines which contracts or service items are eligible for promotional campaign discounts |
| 番号／件数 | Japanese | Number / Document Count — column header for the sequential row number or record count in the listing grid |
| 対象契約識別コード名称 | Japanese | Target Contract Identification Code Name — column header showing the human-readable name of the contract identification code |
| 対象契約番号 | Japanese | Target Contract Number — column header for the unique contract number of the target contract |
| 対象サービス名称 | Japanese | Target Service Name — column header showing the name of the service subject to the campaign conditions |
| KKW01023SF | Module | Discount Service Contract module — the broader screen/module handling discount and promotional service contracts in the K-Opticom system |
| KKW01023SF02DBean | Bean class | Data type bean #02 — the second data type subclass for the KKW01023SF module, handling campaign target application conditions |
| KKW01023SFBean | Bean class | Parent view bean — the main bean class that delegates column-list requests to data type bean subclasses based on the key parameter |
