# Business Logic — KKW05501SF01DBean.listKoumokuIds() [10 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW05501SF.KKW05501SF01DBean` |
| Layer | Data Type Bean (WebView / View Model) |
| Module | `KKW05501SF` (Package: `eo.web.webview.KKW05501SF`) |

## 1. Role

### KKW05501SF01DBean.listKoumokuIds()

This method provides the field metadata descriptor for the "Code Type Bean" data type view model used within the KKW05501SF screen module. In the Futurity X33 web framework, data type beans define the structure of structured data fields (such as tables or list grids) — and each data type bean must supply a list of its item (column) names so that the framework can render column headers and bind form fields dynamically. The Javadoc states: "Returns the list of item names of the data type bean" (`データタイプビーンの項目名のリストを返す`). This is a shared utility called from the parent screen bean (`KKW05501SFBean`) via conditional dispatch on data type names — notably for "法人格前後" (Legal Entity Pre/Post) and "法人格" (Legal Entity) fields. It implements the **Builder** design pattern: it constructs and returns a fully populated collection without branching logic or external side effects.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["Initialize ArrayList<String> koumokuList"])
    ADD1(["Add: Code Type Code"])
    ADD2(["Add: Code Type Name"])
    ADD3(["Add: Selection Index"])
    ADD4(["Add: Initial Setting Code"])
    ADD5(["Add: Code Type Code Value List"])
    ADD6(["Add: Code Type Name List"])
    RETURN(["Return koumokuList"])

    START --> ADD1
    ADD1 --> ADD2
    ADD2 --> ADD3
    ADD3 --> ADD4
    ADD4 --> ADD5
    ADD5 --> ADD6
    ADD6 --> RETURN
```

**Processing description:**

1. **START** — Create a new empty `ArrayList<String>` named `koumokuList`.
2. **ADD1–ADD6** — Sequentially append 6 predefined item name strings (representing the column/field names of the data type bean) to the list.
3. **RETURN** — Return the fully populated list. There are no conditional branches, loops, or external calls.

This method is a pure factory function: it constructs and returns a static list of column metadata, with no runtime logic beyond sequential list population.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none — static method, no parameters) | - | - |

This method requires no input parameters. It returns a fixed, hardcoded list of 6 field names that describe the structure of the data type bean. Since it is a `static` method, it does not depend on any instance state or external objects.

## 4. CRUD Operations / Called Services

This method performs no CRUD operations, no service component calls, and no data access. It is a pure data factory that constructs a list of metadata strings.

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

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW05501SF | `KKW05501SFBean.listKoumokuIds(key)` → `KKW05501SF01DBean.listKoumokuIds()` | None (pure metadata factory) |

**Notes on caller:**
- The sole caller is the parent screen bean `KKW05501SFBean`, which dispatches to this method from its `listKoumokuIds(String key)` method based on the `key` parameter value.
- When `key.equals("法人格前後")` (Legal Entity Pre/Post) or `key.equals("法人格")` (Legal Entity), the screen bean forwards the call to `KKW05501SF01DBean.listKoumokuIds()`.
- These are data type bean names that define structured list fields in the KKW05501SF screen — used for managing legal entity classification data with pre/post state.

## 6. Per-Branch Detail Blocks

**Block 1** — [STATIC FACTORY] `(no conditions — pure sequential execution)` (L531)

> Creates a new ArrayList and populates it with 6 hardcoded item name strings that represent the columns of the data type bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList<String> koumokuList = new ArrayList<String>();` // Initialize empty list [L532] |
| 2 | EXEC | `koumokuList.add("コードタイプコード");` // Add item: Code Type Code [L533] |
| 3 | EXEC | `koumokuList.add("コードタイプ名称");` // Add item: Code Type Name [L534] |
| 4 | EXEC | `koumokuList.add("選択インデックス");` // Add item: Selection Index [L535] |
| 5 | EXEC | `koumokuList.add("初期設定コード");` // Add item: Initial Setting Code [L536] |
| 6 | EXEC | `koumokuList.add("コードタイプコード値リスト");` // Add item: Code Type Code Value List [L537] |
| 7 | EXEC | `koumokuList.add("コードタイプ名称リスト");` // Add item: Code Type Name List [L538] |
| 8 | RETURN | `return koumokuList;` // Return the populated list [L539] |

No conditional branches exist in this method. The entire body is a single sequential block of 8 operations: 1 instantiation, 6 list additions, and 1 return.

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KKW05501SF` | Module | Screen module for legal entity management — handles registration, modification, and listing of corporate entity information |
| `KKW05501SF01DBean` | Class | Data type bean defining the structured data fields for legal entity pre/post classification |
| `listKoumokuIds` | Method | Returns the list of item (column) names for the data type bean's view |
| 項目名 (`koumoku-me`) | Field | Item name — the display name of a column/field in a data type bean |
| コードタイプコード | Field | Code Type Code — the unique identifier for a code type (e.g., legal entity type code) |
| コードタイプ名称 | Field | Code Type Name — the human-readable name of a code type |
| 選択インデックス | Field | Selection Index — the index position for selecting/displaying items in dropdown or list UI components |
| 初期設定コード | Field | Initial Setting Code — the default value code assigned during initial configuration |
| コードタイプコード値リスト | Field | Code Type Code Value List — a list of valid code values for a given code type |
| コードタイプ名称リスト | Field | Code Type Name List — a list of human-readable names corresponding to code type values |
| 法人格 (`houninkaku`) | Field | Legal Entity — the legal status/classification of a corporate entity (e.g., corporation, sole proprietor) |
| 法人格前後 (`houninkaku zengo`) | Field | Legal Entity Pre/Post — legal entity classification with state before/after some operation (e.g., before/after modification) |
| X33 | Framework | Futurity X33 — Fujitsu's web application framework providing data binding, view beans, and code type management |
| データタイプビーン | Framework | Data Type Bean — a bean class that defines the structure (column names and types) of structured data fields in X33 |
| X33VViewBaseBean | Class | Base class for view beans in the X33 framework — provides view data management and code type list support |
| ArrayList | Type | Java's resizable array list — used here to hold the ordered list of column names |
