---
title: "Business Logic — KKW01037SF01DBean.listKoumokuIds() [16 LOC]"
---

# Business Logic — KKW01037SF01DBean.listKoumokuIds() [16 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW01037SF.KKW01037SF01DBean` |
| Layer | Web Data Bean (View Layer — DBean) |
| Module | `KKW01037SF` (Package: `eo.web.webview.KKW01037SF`) |

## 1. Role

### KKW01037SF01DBean.listKoumokuIds()

This method serves as the **metadata provider** for a data-type bean used in the referral/recommendation program screen. It returns a fixed, ordered list of 9 display field names (項目名) that define the columns visible in the "Service Contract List" (サービス契約一覧リスト) table. The fields cover both the **referrer** (紹介者) — the existing customer who referred a new customer — and the **referee** (被紹介者) — the newly acquired customer — including their IDs, fee group affiliations, service start dates, statuses, and SP identifiers. It implements the **factory method** design pattern: a static method on a DBean that returns structural metadata, enabling the parent bean (`KKW01037SFBean`) to dynamically construct table headers and data instances without hard-coping field names in the calling logic. This method is called exclusively by `KKW01037SFBean.listKoumokuIds(String key)` when the key matches the business menu item "Service Contract List", forming part of the screen initialization data flow for the referral program customer listing view.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["listKoumokuIds()"])
    STEP1["Create ArrayList&lt;String&gt; koumokuList"]
    STEP2["Add 'Referee Customer ID'"]
    STEP3["Add 'Referee Fee Group Name'"]
    STEP4["Add 'Referee Status'"]
    STEP5["Add 'Referee Service Start Date'"]
    STEP6["Add 'Referral Code'"]
    STEP7["Add 'Coupon Code' [ANK-4416-00-00]"]
    STEP8["Add 'Referrer Customer ID'"]
    STEP9["Add 'Referrer Fee Group Name'"]
    STEP10["Add 'Referrer SPID'"]
    STEP11["Add 'Referrer Contract Name'"]
    STEP12["Return koumokuList"]
    END(["Return ArrayList&lt;String&gt;"])

    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 --> END
```

This method follows a **straight-line sequential processing pattern** with no conditional branches, loops, or error handling. Each step appends one display field name to the list in the order they should appear in the UI table. The list order is business-defined: referee fields are listed first (4 fields), followed by referral identifiers (2 fields, the second added via a change ticket), then referrer fields (3 fields).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This is a `static` method with no parameters. It returns the complete list of display field names for the referral program data bean. |

**Instance fields / external state:** None. This method is fully self-contained and side-effect free — it reads no instance fields, accesses no static state beyond `java.util.ArrayList`, and produces no side effects beyond constructing the return value.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | `ArrayList.add(String)` | — | — | Java collection operation to append display field names to the list. Not a data-tier operation. |

**Note:** This method performs no database or service component operations. It is a pure metadata producer — the only operations are `ArrayList.add()` calls to build the return list.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW01037SF | `KKW01037SFBean.listKoumokuIds(key)` → `KKW01037SF01DBean.listKoumokuIds()` [when `key.equals("サービス契約一覧リスト")`] | (none — metadata only) |

**Caller analysis:**

The method is called from `KKW01037SFBean.listKoumokuIds(String key)`. This parent bean's `listKoumokuIds(String key)` method acts as a **dispatcher**: when the key parameter equals the Japanese string "サービス契約一覧リスト" (Service Contract List), it delegates to `KKW01037SF01DBean.listKoumokuIds()` to obtain the field definitions. The parent bean supports multiple data-type beans keyed by Japanese menu item names (e.g., "顧客契約継承リスト" delegates to `KKW01037SF02DBean`), making this a shared routing pattern across the webview layer.

## 6. Per-Branch Detail Blocks

> This method has no conditional branches. Each processing step is documented below.

**Block 1** — [SET] `ArrayList<String> koumokuList = new ArrayList<String>();` (L762)

> Creates the return list.

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

**Block 2** — [EXEC] Referee field additions (L763–L766)

> Appends the 4 fields describing the **referee** (被紹介者) — the referred/new customer.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("被紹介者お取引様ID");` // Add: Referee Customer ID |
| 2 | EXEC | `koumokuList.add("被紹介者料金グループ名");` // Add: Referee Fee Group Name |
| 3 | EXEC | `koumokuList.add("被紹介者ステータス");` // Add: Referee Status |
| 4 | EXEC | `koumokuList.add("被紹介者サービス開始年月日");` // Add: Referee Service Start Date (Year/Month/Day) |

**Block 3** — [EXEC] Referral identifiers (L767–L770)

> Appends the referral and coupon code identifiers. The coupon code was added as part of change ticket `ANK-4416-00-00`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("紹介コード");` // Add: Referral Code |
| 2 | EXEC | `koumokuList.add("クーポンコード");` // Add: Coupon Code [ANK-4416-00-00 ADD] |

**Block 4** — [EXEC] Referrer field additions (L771–L774)

> Appends the 3 fields describing the **referrer** (紹介者) — the existing customer who made the referral.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `koumokuList.add("紹介者お取引様ID");` // Add: Referrer Customer ID |
| 2 | EXEC | `koumokuList.add("紹介者料金グループ名");` // Add: Referrer Fee Group Name |
| 3 | EXEC | `koumokuList.add("紹介者SSPID");` // Add: Referrer SPID (Service Provider ID) |
| 4 | EXEC | `koumokuList.add("紹介者契約者名");` // Add: Referrer Contract Name |

**Block 5** — [RETURN] (L775)

> Returns the populated list to the caller.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return koumokuList;` // Return the 9-element field name list |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `被紹介者` (hishoukai-sha) | Field | Referee — the newly referred/new customer in a referral program |
| `紹介者` (shoukai-sha) | Field | Referrer — the existing customer who refers a new customer |
| `紹介コード` (shoukai-code) | Field | Referral Code — a unique code identifying a referral relationship between referrer and referee |
| `クーポンコード` (kuapon-code) | Field | Coupon Code — promotional coupon code associated with a referral (added via change ticket ANK-4416-00-00) |
| `お取引様ID` (otorikishi-sama ID) | Field | Customer ID — the unique identifier for a business customer (respectful naming convention) |
| `料金グループ名` (ryoukin-guruupu-mei) | Field | Fee Group Name — the billing tier/plan group the customer belongs to |
| `ステータス` (sutetassu) | Field | Status — the current lifecycle status of the referee's account |
| `サービス開始年月日` (saabisu-kaishi-nen-gatsu-bi) | Field | Service Start Date (Year/Month/Day) — when the referee's service contract became active |
| `SSPID` | Field | Service Provider ID — identifier for the service provider associated with the referrer |
| `契約者名` (keiyakusha-mei) | Field | Contract Name — the name of the contract holder (referrer) |
| `サービス契約一覧リスト` | Business term | Service Contract List — the screen menu item for viewing referral program service contracts |
| `データタイプビーン` (Deeta Taip Biin) | Architecture | Data Type Bean — a DBean that defines metadata (field names, types) for screen display; distinct from form beans and list beans |
| DBean | Acronym | Data Bean — a view-layer class that carries display metadata and data rows for a web screen |
| ANK-4416-00-00 | Change ticket | Internal change management ticket ID for adding the coupon code field to the referral bean |
| SPID | Acronym | Service Provider ID — a telecom identifier for the service provider entity in order management systems |
