---
title: "Business Logic — JKKSvkeiShosaBaseCC.editMapMemberStb()"
entity: "com.fujitsu.futurity.bp.custom.common.JKKSvkeiShosaBaseCC.editMapMemberStb"
---

# Business Logic — JKKSvkeiShosaBaseCC.editMapMemberStb() [45 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKSvkeiShosaBaseCC` |
| Layer | CC/Common Component (Package: `com.fujitsu.futurity.bp.custom.common`) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKSvkeiShosaBaseCC.editMapMemberStb()

This method performs the **member type change mapping processing** (会員種別変更のマッピング処理) for customer identity records in the K-Opticom telecom service contract system. It takes pre-fetched customer consent/agreement data (retrieved via a prior unique inquiry operation) and transforms each consent record through a two-stage editing pipeline: first by `editInMsgECK0011C120` (which applies member type change-specific field transformations, including post-termination billing reference visibility) and second by `editInMsgCmn` (which performs common input message formatting). The method implements a **template-based routing/dispatch pattern** -- it iterates over an array of consent data maps, retrieves message templates via `getWorkData`, and then dispatches each template to the editing chain. This is a **shared utility method** consumed by `updCustinfo` during the customer information update screen flow, enabling the system to reclassify a customer from one member type to another (e.g., individual to corporate or vice versa) while preserving all consent/agreement associations.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editMapMemberStb(param, userDataIndex, rsltShokai, regitMemberSbtCd, dslAfSkssnsKh)"])

    START --> INIT["Initialize: rsltMemberStb, wkMapArray, workECK0011A010Array"]

    INIT --> GET["Get workECK0011A010Array from rsltShokai.get(MAP_KEY_ECK0011A010)"]

    GET --> CHECK_NULL{workECK0011A010Array != null?}

    CHECK_NULL -->|No| RETURN["Return rsltMemberStb (empty)"]

    CHECK_NULL -->|Yes| FOR_START["For loop: i from 0 to workECK0011A010Array.size()"]

    FOR_START --> CREATE_MAP["wkMapArray = new ArrayList"]

    CREATE_MAP --> GET_WORK["getWorkData(ECK0011A010CBSMSG1LIST, workArray[i])"]

    GET_WORK --> CHECK_TPL{wkTenplates != null?}

    CHECK_TPL -->|No| NEXT_I["Next i"]

    CHECK_TPL -->|Yes| FOR_J["For loop: j from 0 to wkTenplates.length"]

    FOR_J --> EDIT_MEMBER["shosaOkMapper.editInMsgECK0011C120(param, childTemplate, regitMemberSbtCd, dslAfSkssnsKh)"]

    EDIT_MEMBER --> EDIT_COMMON["editInMsgCmn(param, wkCaanMsgList.get(0))"]

    EDIT_COMMON --> ADD_TO_ARRAY["wkMapArray.add(rslt)"]

    ADD_TO_ARRAY --> NEXT_J["Next j"]

    NEXT_J --> CHECK_J{j < wkTenplates.length?}

    CHECK_J -->|Yes| FOR_J

    CHECK_J -->|No| NEXT_I_2["Next i"]

    NEXT_I_2 --> FOR_I_END{End of for i?}

    FOR_I_END -->|No| FOR_START

    FOR_I_END -->|Yes| PUT_RESULT["rsltMemberStb.put(MAP_KEY_ECK0011C120, wkMapArray)"]

    PUT_RESULT --> RETURN

    RETURN --> END_NODE(["Return rsltMemberStb"])
```

**Processing Summary:**

1. **Initialization**: Create result map, clear local arrays.
2. **Data Extraction**: Retrieve the customer consent/agreement array (`workECK0011A010Array`) from the inquiry result map using the key `MAP_KEY_ECK0011A010` (`"ECK0011A010"`).
3. **Null Guard**: If no consent data exists (null), return an empty result immediately.
4. **Outer Loop**: Iterate over each consent record in the array.
5. **Template Retrieval**: For each consent record, retrieve message templates via `getWorkData` keyed by `ECK0011A010CBSMSG1LIST`.
6. **Template Null Guard**: If no templates exist for a record, skip to the next record.
7. **Inner Loop**: For each template, execute the two-stage editing pipeline:
   - Stage 1: `shosaOkMapper.editInMsgECK0011C120` applies member type change-specific edits, injecting `regitMemberSbtCd` and `dslAfSkssnsKh` parameters.
   - Stage 2: `editInMsgCmn` applies common input message formatting to the first edited message.
8. **Result Assembly**: Collect all processed results into `wkMapArray`, then store under `MAP_KEY_ECK0011C120` (`"ECK0011C120"`) key in the result map.
9. **Return**: Return the assembled result map.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the model group and control maps for the customer update screen operation. Contains business data context, user session info, and input controls. |
| 2 | `userDataIndex` | `int` | Index within `param` identifying which business data record to process. Selects the specific customer data row from the parameter's multi-record structure. |
| 3 | `rsltShokai` | `HashMap<String, Object>` | Results from the unique consent/inquiry lookup (一意照会). Contains previously fetched customer consent/agreement records keyed by map keys (e.g., `MAP_KEY_ECK0011A010` for customer consent). The `workECK0011A010Array` is extracted from this map. |
| 4 | `regitMemberSbtCd` | `String` | Registration member type code (登録会員種別コード) -- the target member type code being assigned during the member type change operation. Used by `editInMsgECK0011C120` to set the new member classification on each consent record. |
| 5 | `dslAfSkssnsKh` | `String` | Post-termination billing reference availability flag (解約後請求書参照可否). Determines whether post-termination invoices/references are visible after contract cancellation. Injected into each consent record during editing. |

**Instance fields read:**
| Field | Type | Business Description |
|-------|------|---------------------|
| `shosaOkMapper` | (Mapper) | Processing approval mapper component -- used to invoke `editInMsgECK0011C120` for member type change message editing. |

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKSvkeiShosaBaseCC.getWorkData` | JKKSvkeiShosaBaseCC | - | Retrieves message templates (`CAANMsg[]`) from the consent data record using key `ECK0011A010CBSMSG1LIST`. Reads template structure for subsequent editing. |
| U | `shosaOkMapper.editInMsgECK0011C120` | ECK0011C120 | - | Executes member type change message editing. Sets `regitMemberSbtCd` and `dslAfSkssnsKh` on each message template. Returns list of edited `CAANMsg` objects. |
| U | `JKKSvkeiShosaBaseCC.editInMsgCmn` | ECK0011 (Common) | - | Applies common input message formatting to the first edited message from the member type change edit. Produces the final mapped result entry. |

### Additional Method Call:
| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `ArrayList.add` | - | - | Accumulates each formatted result into `wkMapArray` during the inner loop iteration. |

## 5. Dependency Trace

### Pre-computed evidence from code analysis graph:

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `editInMsgCmn` [U], `editInMsgECK0011C120` [U], `getWorkData` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKSvkeiShosaBaseCC.updCustinfo` | `updCustinfo` -> `editMapMemberStb` | `editInMsgCmn` [U], `editInMsgECK0011C120` [U], `getWorkData` [R] |

**Caller Description:**
- `updCustinfo` -- Customer information update CBS (Business Component Service). Invoked during the customer data update flow to reclassify member type. It passes the inquiry result (`rsltShokai`), target member type code, and post-termination billing flag to this method.

## 6. Per-Branch Detail Blocks

**Block 1** -- [VARIABLE_DECLARATION] (L563)

> Initialize all local result and working variables before processing begins.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMemberStb = new HashMap<String, Object>()` // Result map for member type change processing |
| 2 | SET | `rslt = null` // Individual result entry placeholder |
| 3 | SET | `wkCaanMsgList = null` // Working list of edited CAAN messages |
| 4 | SET | `wkMapArray = null` // Working array collecting formatted results |
| 5 | SET | `workECK0011A010Array = null` // Customer consent/agreement array [お客様一意照会] |

**Block 2** -- [SET] (L572)

> Retrieve the customer consent/agreement array from the inquiry result map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workECK0011A010Array = (ArrayList)rsltShokai.get(MAP_KEY_ECK0011A010)` // `[-> MAP_KEY_ECK0011A010 = "ECK0011A010"]` -- Extract customer consent data from inquiry results |

**Block 3** -- [IF] `(workECK0011A010Array != null)` (L574)

> Null guard: if no consent data was found in the inquiry result, skip all processing and return an empty result map.

| # | Type | Code |
|---|------|------|
| 1 | IF | `workECK0011A010Array != null` // Guard against empty inquiry results |

**Block 3.1** -- [FOR] `(int i = 0; i < workECK0011A010Array.size(); i++)` (L576)

> Outer loop: iterate over each customer consent record. For every record, retrieve its message templates and process them.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList<>()` // Reset working array for each consent record |
| 2 | EXEC | `wkTenplates = getWorkData(ECK0011A010CBSMsg.ECK0011A010CBSMSG1LIST, (Map)workECK0011A010Array.get(i))` // Retrieve message templates for current consent record |

**Block 3.1.1** -- [IF] `(wkTenplates != null)` (L579)

> Null guard: if no message templates exist for the current consent record, skip template processing but continue to next consent record.

| # | Type | Code |
|---|------|------|
| 1 | IF | `wkTenplates != null` // Guard against missing templates for a consent record |

**Block 3.1.1.1** -- [FOR] `(int j = 0; j < wkTenplates.length; j++)` (L581)

> Inner loop: iterate over each message template within the consent record. For each template, execute the two-stage editing pipeline.

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Current message template |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgECK0011C120(param, childTemplate, regitMemberSbtCd, dslAfSkssnsKh)` // Stage 1: Member type change-specific editing [ANK-3179-00-00 MOD] -- Injects `regitMemberSbtCd` and `dslAfSkssnsKh` into the template |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // Stage 2: Common input message formatting on first edited message |
| 4 | EXEC | `wkMapArray.add(rslt)` // Accumulate processed result into working array |

**Block 3.2** -- [SET] (L597)

> After completing all loops, store the assembled result array under the member type change map key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltMemberStb.put(MAP_KEY_ECK0011C120, wkMapArray)` // `[-> MAP_KEY_ECK0011C120 = "ECK0011C120"]` -- Store all formatted member type change results |

**Block 4** -- [RETURN] (L600)

> Return the assembled result map containing the member type change mapping data.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return rsltMemberStb` // Return empty or populated result map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `MAP_KEY_ECK0011A010` | Constant | Customer consent/agreement map key -- value `"ECK0011A010"`. Used to extract customer consent records from the inquiry result map. |
| `MAP_KEY_ECK0011C120` | Constant | Member type change map key -- value `"ECK0011C120"`. Used to store the processed member type change results in the output map. |
| `ECK0011A010CBSMSG1LIST` | Constant | Message template list key for customer consent/agreement CBS message structure. |
| `rsltShokai` | Field | Inquiry result (一意照会) -- data returned from a unique lookup of customer consent/agreement records. |
| `regitMemberSbtCd` | Field | Registration member type code (登録会員種別コード) -- the target member classification being applied during the change operation. |
| `dslAfSkssnsKh` | Field | Post-termination billing reference flag (解約後請求書参照可否) -- controls visibility of post-cancellation billing documents. Added via ANK-3179-00-00 modification. |
| `wkTenplates` | Field | Working message templates array (wkTemplates typo) -- CAANMsg objects describing the structure of each consent record to be edited. |
| `shosaOkMapper` | Field | Processing approval mapper (審査承認Mapper) -- component that handles message editing for member type change operations. |
| `CAANMsg` | Class | Fujitsu internal message schema class -- represents a message/template item in the CBS message handling framework. |
| `IRequestParameterReadWrite` | Interface | Request parameter interface for read/write access to screen-level business data and controls. |
| 一意照会 | Japanese term | Unique inquiry -- a system lookup that retrieves exactly one matching record by primary key or unique constraint. |
| 会員種別変更 | Japanese term | Member type change -- business operation to reclassify a customer's membership type (e.g., individual to corporate). |
| マッピング処理 | Japanese term | Mapping processing -- transformation of data structures between different representations (e.g., inquiry results to input messages). |
| 解約後請求書参照可否 | Japanese term | Post-termination billing reference availability -- flag indicating whether terminated customer billing records remain accessible. |
| ANK-3179-00-00 | Change ticket | Modification ticket that added the `dslAfSkssnsKh` parameter to this method, extending member type change processing to support post-termination billing visibility control. |
| ECK | Abbreviation | Customer (客) consent/agreement -- module prefix for customer identity and consent management CBS/SC codes. |
| SHOKAI (照会) | Japanese term | Inquiry -- database lookup operation to retrieve existing records. |
| editMapMemberStb | Method name | Member type change mapping (memberStb = member change) -- performs the mapping/transformation for member type change operations. |
| updCustinfo | Method name | Update customer information -- the CBS method that invokes this member type change mapping method. |
