---
title: Business Logic — KKW00127SF02DBean.removeElementFromListData()
class: KKW00127SF02DBean
method: removeElementFromListData
file: source/koptWebB/src/eo/web/webview/KKW00127SF/KKW00127SF02DBean.java
lines: 947-966
loc: 20
---

# Business Logic — KKW00127SF02DBean.removeElementFromListData() [20 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00127SF.KKW00127SF02DBean` |
| Layer | Utility / Data Bean (view-layer component within `eo.web.webview`) |
| Module | `KKW00127SF` (Package: `eo.web.webview.KKW00127SF`) |

## 1. Role

### KKW00127SF02DBean.removeElementFromListData()

This method provides targeted element removal from a key-dispatched list of data bean instances within the KKW00127SF service contract screen module. In business terms, it supports dynamic management of service agreement status and referral code entries that are displayed and edited on web forms, allowing callers to remove a specific row at a given index from one of the managed lists.

The method implements a routing/dispatch pattern: it examines the key parameter to determine which internal list (svc_kei_stat_lis_list for service agreement status, or intr_cd_list_list for referral codes) should have an element removed. The index parameter identifies the position within the target list.

This is a shared utility method embedded within a Data Bean (DBean) class. DBeans in this architecture serve as the model layer for JSF/HTML presentation screens, holding both display data and per-screen mutable collections. The method is overridden in multiple screen-specific subclasses (KKW00127SFBean, KKW00127SF01DBean, KKW00127SF04DBean, KKW00127SF07DBean, KKW00127SF12DBean, KKW00127SF22DBean), indicating it is a common utility called across multiple screens that need to dynamically remove list entries.

The method performs no database operations, no service component calls, and no business validation beyond bounds checking. It is a pure in-memory list mutation utility.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["removeElementFromListData key index"])
    NULL_CHECK[key is not null?]
    SVC_KEY_CHECK[key equals サービス契約ステータスリスト]
    INDEX_BOUNDS_1[index in valid range?]
    REMOVE_1[svc_kei_stat_lis_list remove index]
    INTR_KEY_CHECK[key equals 紹介コードリスト]
    INDEX_BOUNDS_2[index in valid range?]
    REMOVE_2[intr_cd_list_list remove index]
    END(["Return"])

    START --> NULL_CHECK
    NULL_CHECK -->|No| END
    NULL_CHECK -->|Yes| SVC_KEY_CHECK
    SVC_KEY_CHECK -->|Yes| INDEX_BOUNDS_1
    SVC_KEY_CHECK -->|No| INTR_KEY_CHECK
    INDEX_BOUNDS_1 -->|Yes| REMOVE_1
    INDEX_BOUNDS_1 -->|No| END
    REMOVE_1 --> END
    INDEX_BOUNDS_2 -->|Yes| REMOVE_2
    INDEX_BOUNDS_2 -->|No| END
    REMOVE_2 --> END
    INTR_KEY_CHECK -->|Yes| INDEX_BOUNDS_2
    INTR_KEY_CHECK -->|No| END
```

**CRITICAL Constant Resolution:**

| Constant Name | Value | Business Meaning |
|---------------|-------|-----------------|
| KKW00127SFConst.SVC_KEI_STAT_LIS_02 | "サービス契約ステータスリスト" | Service Agreement Status List, the internal key for the service contract status display list |
| KKW00127SFConst.INTR_CD_LIST_02 | "紹介コードリスト" | Referral Code List, the internal key for the referral code display list |

**Processing Steps:**

1. **Null Guard** - If key is null, exit immediately (no operation performed).
2. **Branch 1: Service Agreement Status List** - If key equals "サービス契約ステータスリスト", validate the index is within bounds of svc_kei_stat_lis_list, then remove the element at that index.
3. **Branch 2: Referral Code List** - If key equals "紹介コードリスト", validate the index is within bounds of intr_cd_list_list, then remove the element at that index.
4. **No Match** - If key does not match any recognized list key, exit without operation.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | key | String | The list identifier that determines which internal data collection to operate on. Valid values are the literal Japanese strings "サービス契約ステータスリスト" (Service Agreement Status List, mapped from constant SVC_KEI_STAT_LIS_02) and "紹介コードリスト" (Referral Code List, mapped from constant INTR_CD_LIST_02). If null or unrecognized, no action is taken. |
| 2 | index | int | The zero-based position of the element to remove within the identified list. Must be >= 0 and less than the current list size. Out-of-range values are silently ignored (no exception thrown). |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| svc_kei_stat_lis_list | X33VDataTypeList | The service agreement status list, a collection of data bean instances used for displaying service contract status entries on screen forms. |
| intr_cd_list_list | X33VDataTypeList | The referral code list, a collection of data bean instances used for displaying referral code entries on screen forms. |

## 4. CRUD Operations / Called Services

This method performs no external service calls, no SC/CBS invocations, and no database operations. It directly manipulates in-memory Java collections via java.util.List.remove(int). The operations are classified below as in-memory mutations rather than traditional CRUD.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U (in-memory) | java.util.List.remove(int) | N/A | N/A | In-memory removal of an element at the given index from svc_kei_stat_lis_list or intr_cd_list_list. No database persistence, the change affects only the current screen view state. |

## 5. Dependency Trace

This method is overridden in 6+ subclasses within the KKW00127SF module (screen-specific DBean variants). The base implementation is defined in KKW00127SF02DBean and delegated to via super.removeElementFromListData(key, index) in subclasses. No callers were found directly invoking this method in the KKW00127SFLogic.java logic layer, suggesting it is invoked indirectly through screen event handlers or form submission processing pipelines rather than explicit logic-layer calls.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00127SF01 (via KKW00127SF01DBean) | KKW00127SF01DBean.removeElementFromListData(key, index) -> super.removeElementFromListData(key, index) -> KKW00127SF02DBean.removeElementFromListData(key, index) | N/A (in-memory only) |
| 2 | Screen:KKW00127SF02 (via KKW00127SFBean) | KKW00127SFBean.removeElementFromListData(key, index) -> super.removeElementFromListData(key, index) -> KKW00127SF02DBean.removeElementFromListData(key, index) | N/A (in-memory only) |
| 3 | Screen:KKW00127SF04 (via KKW00127SF04DBean) | KKW00127SF04DBean.removeElementFromListData(key, index) -> KKW00127SF02DBean.removeElementFromListData(key, index) | N/A (in-memory only) |
| 4 | Screen:KKW00127SF07 (via KKW00127SF07DBean) | KKW00127SF07DBean.removeElementFromListData(key, index) -> KKW00127SF02DBean.removeElementFromListData(key, index) | N/A (in-memory only) |
| 5 | Screen:KKW00127SF12 (via KKW00127SF12DBean) | KKW00127SF12DBean.removeElementFromListData(key, index) -> KKW00127SF02DBean.removeElementFromListData(key, index) | N/A (in-memory only) |
| 6 | Screen:KKW00127SF22 (via KKW00127SF22DBean) | KKW00127SF22DBean.removeElementFromListData(key, index) -> KKW00127SF02DBean.removeElementFromListData(key, index) | N/A (in-memory only) |

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] (key != null) (L951)

> Null guard: Only proceed if key is non-null. If null, skip all processing.

| # | Type | Code |
|---|------|------|
| 1 | IF | if(key != null) // Null guard, skip processing if key is null |

**Block 1.1** — [IF-ELSE-IF] (key.equals("サービス契約ステータスリスト")) [SVC_KEI_STAT_LIS_02="サービス契約ステータスリスト"] (L953)

> Branch 1: When the key identifies the Service Agreement Status List, validate index bounds and remove the element.

| # | Type | Code |
|---|------|------|
| 1 | IF | if(key.equals("サービス契約ステータスリスト")) // Check if key matches Service Agreement Status List constant [SVC_KEI_STAT_LIS_02="サービス契約ステータスリスト"] |

**Block 1.1.1** — [IF] (index >= 0 && index < svc_kei_stat_lis_list.size()) (L954)

> Bounds validation: Ensure the index is within the current size of the service agreement status list before removal.

| # | Type | Code |
|---|------|------|
| 1 | IF | if(index >= 0 && index < svc_kei_stat_lis_list.size()) // Validate index is within list bounds |
| 2 | EXEC | svc_kei_stat_lis_list.remove(index) // Remove element at specified index from the service agreement status list |

**Block 1.2** — [ELSE-IF] (key.equals("紹介コードリスト")) [INTR_CD_LIST_02="紹介コードリスト"] (L959)

> Branch 2: When the key identifies the Referral Code List, validate index bounds and remove the element.

| # | Type | Code |
|---|------|------|
| 1 | ELSE_IF | else if(key.equals("紹介コードリスト")) // Check if key matches Referral Code List constant [INTR_CD_LIST_02="紹介コードリスト"] |

**Block 1.2.1** — [IF] (index >= 0 && index < intr_cd_list_list.size()) (L960)

> Bounds validation: Ensure the index is within the current size of the referral code list before removal.

| # | Type | Code |
|---|------|------|
| 1 | IF | if(index >= 0 && index < intr_cd_list_list.size()) // Validate index is within list bounds |
| 2 | EXEC | intr_cd_list_list.remove(index) // Remove element at specified index from the referral code list |

**Block 2** — [END] (L965)

> Method returns void, no explicit return statement. Falls through to end of method.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | Implicit void return |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|-----------------|
| svc_kei_stat_lis_list | Field | Service detail status list, an X33VDataTypeList containing X33VDataTypeStringBean instances that hold service contract status display data for screen forms. |
| intr_cd_list_list | Field | Referral code list, an X33VDataTypeList containing X33VDataTypeStringBean instances that hold referral code display data for screen forms. |
| SVC_KEI_STAT_LIS_02 | Constant | "サービス契約ステータスリスト" - The constant key string identifying the Service Agreement Status List. SVC_KEI = Service Detail, STAT = Status, LIS = List. |
| INTR_CD_LIST_02 | Constant | "紹介コードリスト" - The constant key string identifying the Referral Code List. INTR = Introduction/Referral, CD = Code. |
| DBean | Acronym | Data Bean, a view-layer Java class that holds screen display data and implements data type interfaces (X33VDataTypeBeanInterface, X33VListedBeanInterface). |
| X33VDataTypeList | Type | A framework-specific list container for view data beans, providing typed list operations for JSF screen data binding. |
| X33VDataTypeStringBean | Type | A string data type bean used as the element type within X33VDataTypeList collections. |
| サービス契約ステータスリスト | Field (Japanese) | Service Agreement Status List, the display list showing current status values for service contract line items. |
| 紹介コードリスト | Field (Japanese) | Referral Code List, the display list showing referral codes associated with service contracts. |
| KKW00127SF | Module | The service contract status maintenance screen module, a K-Opticom business module for managing service agreement information. |
