# Business Logic — KKW01034SF04DBean.listKoumokuIds() [12 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW01034SF.KKW01034SF04DBean` |
| Layer | Service Component (CC/Common Component — data type bean in the webview package) |
| Module | `KKW01034SF` (Package: `eo.web.webview.KKW01034SF`) |

## 1. Role

### KKW01034SF04DBean.listKoumokuIds()

This method returns a predefined, ordered list of field names (column headers) that define the columns displayed on the "Target Contract List" (対象契約一覧) data type view screen within the KKW01034SF service contract inquiry module. In the K-Opticom system, data type beans (DBean) serve as column-definition catalogs: each one holds a static set of human-readable field labels used by the X31S framework to dynamically generate table headers on web forms. The target screen presents contracted service items from the perspective of the service recipient (the customer-side contractor), showing details such as service contract numbers, option/sub-option contract numbers, device provisioning identifiers, and discount service codes. This method is part of a dispatcher-based design pattern where the parent bean (KKW01034SFBean.listKoumokuIds) routes incoming string keys to specific DBean implementations; when the key "対象契約一覧" or "対象契約一覧2" (Target Contract List) is specified, control is delegated to this method. It plays a shared utility role — any screen or batch that needs to display a target-contract-oriented data type table references this catalog to build its column structure without hardcoding labels.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["listKoumokuIds()"])
    STEP1["Initialize: koumokuList = new ArrayList"]
    STEP2["Add: 通番 (No.)"]
    STEP3["Add: 対象契約識別コード (Target Contract ID Code)"]
    STEP4["Add: サービス契約番号 (Service Contract Number)"]
    STEP5["Add: サービス契約内容番号 (Service Contract Content No.)"]
    STEP6["Add: オプションサービス契約番号 (Option Service Contract Number)"]
    STEP7["Add: サブオプションサービス契約番号 (Sub-Option Service Contract Number)"]
    STEP8["Add: 機器提供サービス契約番号 (Device Provisioning Service Contract Number)"]
    STEP9["Add: 割引サービス対象サービスコード (Discount Service Target Service Code)"]
    RETURN["Return koumokuList"]
    END(["Return / Next"])

    START --> STEP1
    STEP1 --> STEP2
    STEP2 --> STEP3
    STEP3 --> STEP4
    STEP4 --> STEP5
    STEP5 --> STEP6
    STEP6 --> STEP7
    STEP7 --> STEP8
    STEP8 --> STEP9
    STEP9 --> RETURN
    RETURN --> END
```

This method executes a linear, sequential append pattern with no conditional branches. It initializes an empty `ArrayList<String>`, then appends nine hardcoded field name strings in a fixed order — each representing a column header for the Target Contract List screen. Finally, it returns the populated list.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It returns a static catalog of field names. |

**Instance Fields / External State Read:**
- None — this method is fully self-contained and stateless.

## 4. CRUD Operations / Called Services

This method performs no database reads, no service component calls, and no external operations. It is a pure data-definition method that constructs and returns an in-memory collection.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | — | — | — | No CRUD operations. This method is a static catalog builder with no persistence layer interaction. |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW01034SF | `KKW01034SFBean.listKoumokuIds("対象契約一覧")` → `KKW01034SF04DBean.listKoumokuIds()` | none (static field catalog, no SC/DB) |
| 2 | Screen:KKW01034SF | `KKW01034SFBean.listKoumokuIds("対象契約一覧2")` → `KKW01034SF04DBean.listKoumokuIds()` | none (static field catalog, no SC/DB) |

**Call Chain Notes:**
- The parent bean `KKW01034SFBean` acts as a dispatcher. When its `listKoumokuIds(key)` method receives the key `"対象契約一覧"` (Target Contract List), it delegates to `KKW01034SF04DBean.listKoumokuIds()` (line 2786 in KKW01034SFBean.java). Similarly, the key `"対象契約一覧2"` (Target Contract List 2, added under ANK-4416) also delegates to the same method (line 2801).
- No external SC (Service Component) or CBS (Control Business Service) endpoints are invoked from this method. It is a pure data-definition utility.

## 6. Per-Branch Detail Blocks

**Block 1** — [LINEAR PROCESSING] (L508)

> Initialize the ArrayList for column field names. This is the entry point of a linear, no-branch flow.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList<String> koumokuList = new ArrayList<String>();` // Initialize empty list |

**Block 2** — [LINEAR APPEND SEQUENCE] (L509–L517)

> Append nine predefined field names in fixed order. These field names correspond to columns displayed on the Target Contract List screen — they represent the contract-level identifiers and service metadata visible to the customer-side contractor.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `koumokuList.add("通番");` // No. (sequential row number) | Adds the row number column |
| 2 | SET | `koumokuList.add("対象契約識別コード");` // Target Contract ID Code — unique identifier for the target contract | Adds the contract ID code column |
| 3 | SET | `koumokuList.add("サービス契約番号");` // Service Contract Number — the primary contract number for the service | Adds the service contract number column |
| 4 | SET | `koumokuList.add("サービス契約内容番号");` // Service Contract Content No. — sub-identifier within the service contract | Adds the service contract content number column |
| 5 | SET | `koumokuList.add("オプションサービス契約番号");` // Option Service Contract Number — number for optional add-on service contracts | Adds the option service contract number column |
| 6 | SET | `koumokuList.add("サブオプションサービス契約番号");` // Sub-Option Service Contract Number — number for sub-option (nested option) service contracts | Adds the sub-option service contract number column |
| 7 | SET | `koumokuList.add("機器提供サービス契約番号");` // Device Provisioning Service Contract Number — contract number for device provisioning services | Adds the device provisioning contract number column |
| 8 | SET | `koumokuList.add("割引サービス対象サービスコード");` // Discount Service Target Service Code — code identifying services eligible for discounts | Adds the discount service target service code column |

**Block 3** — [RETURN] (L518)

> Return the fully populated field name list to the caller.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return koumokuList;` // Returns the list of 9 field name strings |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| 通番 (Tsūban) | Field | Row number — a sequential line number assigned to each row in a table display |
| 対象契約識別コード (Taishō Keiyaku Shikibetsu Kōdo) | Field | Target Contract ID Code — a unique identifier that distinguishes individual target contracts within the system |
| サービス契約番号 (Sābisu Keiyaku Bangō) | Field | Service Contract Number — the primary contract number assigned to a telecom service agreement |
| サービス契約内容番号 (Sābisu Keiyaku Naiyō Bangō) | Field | Service Contract Content No. — a sub-number that further identifies specific content within a broader service contract |
| オプションサービス契約番号 (Opushon Sābisu Keiyaku Bangō) | Field | Option Service Contract Number — contract number for optional add-on services attached to a base service contract |
| サブオプションサービス契約番号 (Sabu Opushon Sābisu Keiyaku Bangō) | Field | Sub-Option Service Contract Number — contract number for nested/sub-option services that are themselves optional add-ons |
| 機器提供サービス契約番号 (Kiki Teikyō Sābisu Keiyaku Bangō) | Field | Device Provisioning Service Contract Number — contract number for services involving hardware/device provisioning to the customer |
| 割引サービス対象サービスコード (Waribiki Sābisu Taishō Sābisu Kōdo) | Field | Discount Service Target Service Code — code identifying which services are eligible for discount pricing |
| データタイプビューン (Data Type Bean) | Pattern | A DBean is a data-type definition bean in the X31S framework that holds column metadata (field names, types, validation rules) for dynamic table generation |
| 対象契約一覧 (Taishō Keiyaku Ichiran) | Screen | Target Contract List — the data type view screen that displays contracted service items from the customer (contractor) side |
| DBean (Data Bean) | Pattern | Short for Data Type Bean; a catalog class that defines the column structure and field metadata for a screen's data table |
| KKW01034SF | Module | A service contract inquiry module in the K-Opticom web system, handling customer-side contract view and management operations |
| X31S | Framework | The internal web application framework used by K-Opticom for screen development, data binding, and business logic dispatch |
| ANK-2755 | Ticket | JIRA/change ticket that added campaign and discount service-related field items to the KKW01034SF module (2016/08/10) |
| ANK-4416 | Ticket | JIRA/change ticket that added a second set of campaign and discount service items to the module (suffix "_2" variants) |
