---

# Business Logic — KKW02701SF02DBean.listKoumokuIds() [17 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA16701SF.KKW02701SF02DBean` |
| Layer | Data Type Bean (Web Presentation / View Layer) |
| Module | `KKA16701SF` (Package: `eo.web.webview.KKA16701SF`) |

## 1. Role

### KKW02701SF02DBean.listKoumokuIds()

This method is the metadata provider for the "Course History List" (コース履歴一覧リスト) data type bean within the K-Opticom web application. It returns a fixed, ordered list of 12 Japanese display names that correspond to the column headers or field labels presented to the user on the course history screen. The method implements the **Data Type Bean Metadata Pattern** — a shared utility used by the framework's list data binding mechanism. When the parent bean `KKW02701SFBean.listKoumokuIds(key)` is invoked with the key `"コース履歴一覧リスト"` (Course History List), it delegates to this static method to discover which fields should be rendered in the list view. It plays the role of a **configuration-only method** — it does not perform any I/O, database access, or business computation. Its sole purpose is to define the UI column order and labels for the course contract history detail screen. The 12 items reflect telecom service contract attributes including service contract detail number, registration timestamp, pre-registration number, application detail number, status, course application date, course name, mansion (apartment complex) identification, and — per ANK-4592-00-00 — new and old material course codes for pricing changes.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["listKoumokuIds()"])
    STEP1["Create ArrayList&lt;String&gt; koumokuList"]
    STEP2["Add: Service Contract Detail Number"]
    STEP3["Add: Generation Registration DateTime"]
    STEP4["Add: Pre-Registration Number"]
    STEP5["Add: Application Detail Number"]
    STEP6["Add: Status"]
    STEP7["Add: Course Application Date"]
    STEP8["Add: Course Name"]
    STEP9["Add: Mansion ID"]
    STEP10["Add: Mansion Name"]
    STEP11["Add: New Material Course Code (ANK-4592-00-00)"]
    STEP12["Add: Old Material Course Code (ANK-4592-00-00)"]
    STEP13["Return koumokuList"]
    END_NODE(["Return / Next"])

    START --> STEP1
    STEP1 --> STEP2
    STEP2 --> STEP3
    STEP3 --> STEP4
    STEP4 --> STEP5
    STEP5 --> STEP6
    STEP6 --> STEP7
    STEP7 --> STEP8
    STEP8 --> STEP9
    STEP9 --> STEP10
    STEP10 --> STEP11
    STEP11 --> STEP12
    STEP12 --> STEP13
    STEP13 --> END_NODE
```

**Processing Description:**

The method performs a linear, sequential population of an `ArrayList<String>` with 12 hard-coded display labels. There are no conditional branches, loops, or external method calls beyond `ArrayList.add()`. Each call appends one field label that corresponds to a column in the course history list screen. The order of insertion defines the left-to-right display order of columns in the UI grid. The last two entries (new and old material course codes) were added via change ticket **ANK-4592-00-00** to support material/coupon code display for price changes.

## 3. Parameter Analysis

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

This method takes **no parameters**. It is a static factory method that returns a constant list of field labels independent of any input. The returned list is the same on every invocation — it is purely declarative metadata.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no external services, SCs, CBSs, or database queries**. It only invokes `ArrayList.add()` (a standard Java collection operation) 12 times to populate the list. There is no data type bean (`KKW02701SF02DBean`) field read, no instance state dependency, and no I/O of any kind.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| N/A | `ArrayList.add(String)` | N/A | N/A | Framework list population — adds field label strings to the return list. No database or service interaction. |

## 5. Dependency Trace

This method is called exclusively by the parent bean in the same module. The call chain traces from the list-type metadata dispatch pattern used by the screen framework.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW02701SF | `KKW02701SFBean.listKoumokuIds(key)` where `key` = `"コース履歴一覧リスト"` → `KKW02701SF02DBean.listKoumokuIds()` | `listKoumokuIds [N/A] N/A` — metadata-only, no CRUD |
| 2 | Screen:KKW02701SF | `KKW02701SFBean.addListDataInstance(key)` where `key` = `"コース履歴一覧リスト"` → instantiates `KKW02701SF02DBean` → framework may invoke `listKoumokuIds()` for column discovery | Same as above |

**Caller Details:**
- The parent bean `KKW02701SFBean.listKoumokuIds(String key)` at ~line 631 of `KKW02701SFBean.java` contains the dispatch logic: when `key.equals("コース履歴一覧リスト")` (Course History List), it returns `KKW02701SF02DBean.listKoumokuIds()` directly.
- The same pattern appears in `KKW02701SFBean.addListDataInstance(String key)` which instantiates `KKW02701SF02DBean` objects for the list.

## 6. Per-Branch Detail Blocks

> This method has no conditional branches (if/else, switch, loops). It is a purely linear sequence of list population statements.

**Block 1** — [SET / CONSTRUCTOR] `(instantiation)` (L763)

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList<String> koumokuList = new ArrayList<String>();` // Create empty list to hold column label strings |

**Block 2** — [EXEC] `(add: service contract detail number)` (L764)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("サービス契約内訳番号");` // Add: "Service Contract Detail Number" — internal tracking ID for service contract line items |

**Block 3** — [EXEC] `(add: generation registration date/time)` (L765)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("世代登録年月日日時分秒");` // Add: "Generation Registration DateTime" — timestamp of the generation record |

**Block 4** — [EXEC] `(add: pre-registration number)` (L766)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("異動予約番号");` // Add: "Pre-Registration Number" — change reservation number |

**Block 5** — [EXEC] `(add: application detail number)` (L767)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("申込明細番号");` // Add: "Application Detail Number" — order detail number |

**Block 6** — [EXEC] `(add: status)` (L768)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("状態");` // Add: "Status" — current state of the record |

**Block 7** — [EXEC] `(add: course application date)` (L769)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("コース適用年月日");` // Add: "Course Application Date" — date the course was applied |

**Block 8** — [EXEC] `(add: course name)` (L770)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("コース名");` // Add: "Course Name" — name of the service course |

**Block 9** — [EXEC] `(add: mansion ID)` (L771)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("マシヨンID");` // Add: "Mansion ID" — apartment complex identifier |

**Block 10** — [EXEC] `(add: mansion name)` (L772)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("マシヨン名");` // Add: "Mansion Name" — apartment complex name |

**Block 11** — [EXEC] `(add: new material course code — ANK-4592-00-00)` (L774)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("新材料コースコード");` // Add: "New Material Course Code" — new material/coupon code for pricing changes [→ ANK-4592-00-00 ADD START] |

**Block 12** — [EXEC] `(add: old material course code — ANK-4592-00-00)` (L775)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("旧材料コースコード");` // Add: "Old Material Course Code" — previous material/coupon code before pricing changes [→ ANK-4592-00-00 ADD END] |

**Block 13** — [RETURN] `(return list)` (L777)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return koumokuList;` // Return the completed list of 12 field labels |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `サービス契約内訳番号` (svc_kei_ucwk_no) | Field | Service Contract Detail Number — internal tracking ID for service contract line items |
| `世代登録年月日日時分秒` (sdm_rec_tm) | Field | Generation Registration Date/Time/Second — timestamp when the record generation was registered |
| `異動予約番号` (idou_yoyo_no) | Field | Pre-Registration Number — reservation number for changes/movements to a contract |
| `申込明細番号` (moshikomi_meisai_no) | Field | Application Detail Number — unique identifier for an application/order detail |
| `状態` (state) | Field | Status — current processing or operational state of the record |
| `コース適用年月日` (koosu_tekiyou_nn) | Field | Course Application Date — the date a service course was applied to a contract |
| `コース名` (koosu_mei) | Field | Course Name — human-readable name of the service course |
| `マシヨンID` (mansion_id) | Field | Mansion ID — identifier for an apartment complex (multi-unit dwelling) |
| `マシヨン名` (mansion_mei) | Field | Mansion Name — name of the apartment complex |
| `新材料コースコード` (shin_zairyo_koodo) | Field | New Material Course Code — new material/coupon code for pricing changes [added by ANK-4592-00-00] |
| `旧材料コースコード` (kyuu_zairyo_koodo) | Field | Old Material Course Code — previous material/coupon code before pricing changes [added by ANK-4592-00-00] |
| コース履歴一覧リスト (koosu rekishi ichiran risuto) | Field | Course History List — the list-type display item whose metadata this method provides |
| ANK-4592-00-00 | Change Ticket | Internal change request that added material course code columns to the course history display |
| Data Type Bean | Pattern | A framework bean that holds typed field metadata for dynamic list rendering in the view layer |
| DBean | Acronym | Data Bean — a bean class that holds data type metadata and field definitions for a specific list/screen |
| KKW02701SF | Module | The screen module code for the course history management screen (S-F = Service Function) |

---
