---

# Business Logic — JKKBumpMdsCC.mappingEZM0121C010InMsg_2() [67 LOC]

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

## 1. Role

### JKKBumpMdsCC.mappingEZM0121C010InMsg_2()

This method is a **data-mapping utility** responsible for populating the SIF (Service Interface Framework) request message template for the **EZM0121C010 — Telephone Number Change** service (電話番号変更). It operates as part of the number portability migration (番号ポスキ) completion workflow, which is triggered when a customer completes porting their telephone number to a new carrier while the old carrier processes the final bump/migration records.

The method follows a **builder pattern** — it takes a pre-allocated `CAANMsg` template, first initializes all fields to null via `fillCAANMSGNullMapping` (全条件のNullマッピング), then sequentially sets every required field from the telephone number inquiry result hash (`eZM0121A010Hash`). The hash is pre-populated by a prior call to `callEZM0121A010SC` (telephone number one-time inquiry), which queries the system for the customer's current service contract details associated with the given telephone number.

The method handles a **single deterministic branch** — there are no conditional logic paths. It unconditionally maps the following fields: template ID, function code ("1" — telephone number change), raw telephone number, office number (局番), number code (番号コード), distributor code (割当通信事業者コード), end-user carrier code (使用通信事業者コード), service division (サービス区分), agency contract type code (引当契約種別コード), agency contract setting timestamp (引当契約設定年月日時分秒), telephone number description (電話番号説明), individual/corporate telephone number carrier code (個人法人電話番号帯コード), S5 server number machine distinction code (＃５サバ番号機識別コード), telephone number applicable start/end dates (電話番号適用開始/終了年月日), N.R.N. (Number Portability) number (Ｎ．Ｒ．Ｎ．番号), first allocation date (初回割当年月日), previous update timestamp (更新前最終年月日時分秒), and BMP halt request control code (番ポ廃止依頼制御コード, fixed to "0" — not required).

This method's **role in the larger system** is as a shared data transformer called by `callEZM0121C010SC_2`, which in turn is invoked from `executeBumpMds` — the core batch processing method for completing number portability migration. The mapped template is then used to invoke the EZM0121C010 service component, which processes the telephone number change request against the underlying telecom service database.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["mappingEZM0121C010InMsg_2 template eZM0121A010Hash telNo updDtm"])
    START --> STEP1["Step 1 Null Mapping Initialization"]
    STEP1 --> STEP1_EXEC["fillCAANMSGNullMapping template EZM0121C010CBSMsg contents"]
    STEP1_EXEC --> STEP2["Step 2 Set Template ID"]
    STEP2 --> STEP2_EXEC["template.set TEMPLATEID TEMPLATE_ID_EZM0121C010"]
    STEP2_EXEC --> STEP3["Step 3 Set Function Code - Telephone Number Change"]
    STEP3 --> STEP3_EXEC["template.set FUNC_CODE value 1"]
    STEP3_EXEC --> STEP4["Step 4 Set Telephone Number"]
    STEP4 --> STEP4_EXEC["template.set TELNO telNo"]
    STEP4_EXEC --> STEP5["Step 5 Extract and Set Hash Data"]
    STEP5 --> STEP5A["template.set KYOKU_NO hash.get KYOKU_NO"]
    STEP5A --> STEP5B["template.set NO_CD hash.get NO_CD"]
    STEP5B --> STEP5C["template.set WARIATE_TSJGS_CD hash.get WARIATE_TSJGS_CD"]
    STEP5C --> STEP5D["template.set USE_TSJGS_CD hash.get USE_TSJGS_CD"]
    STEP5D --> STEP5E["template.set SVC_DIV hash.get SVC_DIV"]
    STEP5E --> STEP5F["template.set HKAT_SIYK_SBT_CD hash.get HKAT_SIYK_SBT_CD"]
    STEP5F --> STEP5G["template.set HKAT_SIYK_SET_DTM hash.get HKAT_SIYK_SET_DTM"]
    STEP5G --> STEP5H["template.set TLN_SETMEI hash.get TLN_SETMEI"]
    STEP5H --> STEP5I["template.set KOJIN_HOJIN_TLN_TAI_CD hash.get KOJIN_HOJIN_TLN_TAI_CD"]
    STEP5I --> STEP5J["template.set C5_SERVER_GOKI_SKBT_CD hash.get C5_SERVER_GOKI_SKBT_CD"]
    STEP5J --> STEP5K["template.set TELNO_TSTAYMD hash.get TELNO_TSTAYMD"]
    STEP5K --> STEP5L["template.set TELNO_TENDYMD hash.get TELNO_TENDYMD"]
    STEP5L --> STEP5M["template.set NRN_NO hash.get NRN_NO"]
    STEP5M --> STEP5N["template.set FIRST_WARIATE_YMD hash.get FIRST_WARIATE_YMD"]
    STEP5N --> STEP6["Step 6 Set Previous Update Timestamp"]
    STEP6 --> STEP6_EXEC["template.set LAST_UPD_DTM_BF updDtm"]
    STEP6_EXEC --> STEP7["Step 7 Set BMP Halt Request Control Code"]
    STEP7 --> STEP7_EXEC["template.set BMP_HAISHI_REQ_CTRL_CD value 0"]
    STEP7_EXEC --> END_NODE(["Return"])
```

**CRITICAL — Constant Resolution:**

| Constant Name | Resolved Value | Business Meaning |
|---------------|---------------|-----------------|
| `TEMPLATE_ID_EZM0121C010` | `"EZM0121C010"` | SIF template identifier for the Telephone Number Change service component |
| `EZM0121C010CBSMsg.FUNC_CODE` set value | `"1"` | Function code indicating "Telephone Number Change" operation type |
| `EZM0121C010CBSMsg.BMP_HAISHI_REQ_CTRL_CD` set value | `"0"` | BMP (Ban Po = Number Portability Halt) Halt Request Control Code — value "0" means "Not Required" (不要), indicating no halt request is needed for this phone number change operation |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `template` | `CAANMsg` | The SIF request message template object to populate. This is a newly instantiated `CAANMsg` wrapping the `EZM0121C010CBSMsg` class definition, created in the caller `callEZM0121C010SC_2` via `new CAANMsg(EZM0121C010CBSMsg.class.getName())`. All method fields are mapped into this template, which is then sent as the SIF request payload to the service component. |
| 2 | `eZM0121A010Hash` | `HashMap<String, Object>` | The result hash from the prior telephone number one-time inquiry (電話番号一意照会) service call `EZM0121A010`. Contains all service contract and carrier assignment details for the given telephone number, including office number, number code, distributor codes, service division, contract type codes, dates, N.R.N. number, and more. Values are extracted from this map and set into the template fields. |
| 3 | `telNo` | `String` | The telephone number (電話番号) of the customer whose number change request is being processed. This is the raw phone number provided as input to the bump processing workflow, typically extracted from the request parameters (`requestParam.get(TELNO)`). |
| 4 | `updDtm` | `String` | The update timestamp (更新年月日時分秒) — the previous/last update date-time string before this operation. It is stored as `LAST_UPD_DTM_BF` (更新前最終年月日時分秒) in the template for audit/tracking purposes. This is the value `zm0121UpdDtm` extracted from the request parameters in the outer method. |

**Instance fields read by this method:** None. This method is purely stateless and does not access any instance fields of `JKKBumpMdsCC`.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKBumpMdsCC.fillCAANMSGNullMapping` | - | - | Calls `fillCAANMSGNullMapping` to initialize all template fields to null values based on the `EZM0121C010CBSMsg` field definitions. This is a local utility method within the same class, not a service component call. |
| - | `EZM0121C010CBSMsg.getContents` | - | - | Instantiates a new `EZM0121C010CBSMsg` and calls `getContents()` to retrieve the field definition structure for null-mapping. This is a message class introspection call, not a database operation. |

**Note:** This method does **not** perform any direct CRUD operations (C/R/U/D) on databases or call external service components. It is a pure data-mapping method that transforms data from a HashMap into a structured SIF message template. The actual database interactions are performed by the caller `callEZM0121C010SC_2`, which invokes the `EZM0121C010SC` service component with the populated template.

## 5. Dependency Trace

### Caller Chain:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch:JKKBumpMdsCC.executeBumpMds | `executeBumpMds` (line 785) -> `callEZM0121C010SC_2` (line 1854) -> `mappingEZM0121C010InMsg_2` | `fillCAANMSGNullMapping [-]`, `EZM0121C010CBSMsg.getContents [-]` |
| 2 | Internal CBS:JKKBumpMdsCC.callEZM0121C010SC_2 | `callEZM0121C010SC_2` (line 1854) -> `mappingEZM0121C010InMsg_2` | `fillCAANMSGNullMapping [-]`, `EZM0121C010CBSMsg.getContents [-]` |

**Entry Point Context:** `executeBumpMds` is the public entry point method in `JKKBumpMdsCC` (番ポ後実行メソッド / Post-Number-Portability Execution Method). It orchestrates the entire number portability migration completion workflow, which includes: service contract content inquiry (EKK0161B013), telephone number status judgment (JKKTelnoStatJudgeCC), telephone number one-time inquiry (EZM0121A010), and then — when the BMP flag is "1" (番号あり / with number portability) — invokes `callEZM0121C010SC_2` which calls this `mappingEZM0121C010InMsg_2` method.

**Terminal operations from this method:** `fillCAANMSGNullMapping` (local null initialization), `EZM0121C010CBSMsg.getContents` (message field introspection). No external SC or database CRUD operations are directly invoked by this method.

## 6. Per-Branch Detail Blocks

### Block 1 — EXEC (null mapping initialization) (L2750)

> Initial processing step: Sets all template fields to null values based on the EZM0121C010CBSMsg field definition structure. This ensures a clean slate before populating the required fields. The comment states `まず全条件のNullマッピング` (First, null-map all conditions).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `fillCAANMSGNullMapping(template, new EZM0121C010CBSMsg().getContents())` // Initialize all fields to null [-> EZM0121C010CBSMsg field definitions] |

### Block 2 — EXEC (template ID assignment) (L2753)

> Sets the SIF template ID (SIFのID) on the message template. This ID identifies the request type for the service component invoker.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TEMPLATEID, TEMPLATE_ID_EZM0121C010)` // Template ID (SIF ID) [-> CONSTANT TEMPLATE_ID_EZM0121C010 = "EZM0121C010"] |

### Block 3 — EXEC (function code assignment) (L2756)

> Sets the function code to indicate the operation type. This tells the downstream service component what business operation to perform.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.FUNC_CODE, "1")` // Function Code - Telephone Number Change [-> FUNC_CODE = "1" (電話番号変更)] |

### Block 4 — EXEC (telephone number assignment) (L2759)

> Sets the raw telephone number from the method parameter directly onto the template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TELNO, telNo)` // Telephone Number [from caller parameter] |

### Block 5 — EXEC (hash data extraction and mapping) (L2762–2797)

> Extracts service contract and carrier assignment details from the `eZM0121A010Hash` (telephone number one-time inquiry result hash) and maps each field into the template. This is the core data transformation step — the hash was pre-populated by the prior `callEZM0121A010SC` service component call which queried the database for the customer's current service contract records. Each field is extracted as a String cast from the Object-typed HashMap.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.KYOKU_NO, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.KYOKU_NO))` // Office Number (局番) [from inquiry result hash] |
| 2 | SET | `template.set(EZM0121C010CBSMsg.NO_CD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.NO_CD))` // Number Code (番号コード) [from inquiry result hash] |
| 3 | SET | `template.set(EZM0121C010CBSMsg.WARIATE_TSJGS_CD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.WARIATE_TSJGS_CD))` // Assigned Telecom Distributor Code (割当通信事業者コード) [from inquiry result hash] |
| 4 | SET | `template.set(EZM0121C010CBSMsg.USE_TSJGS_CD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.USE_TSJGS_CD))` // End-User Carrier Code (使用通信事業者コード) [from inquiry result hash] |
| 5 | SET | `template.set(EZM0121C010CBSMsg.SVC_DIV, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.SVC_DIV))` // Service Division (サービス区分) [from inquiry result hash] |
| 6 | SET | `template.set(EZM0121C010CBSMsg.HKAT_SIYK_SBT_CD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.HKAT_SIYK_SBT_CD))` // Agency Contract Type Code (引当契約種別コード) [from inquiry result hash] |
| 7 | SET | `template.set(EZM0121C010CBSMsg.HKAT_SIYK_SET_DTM, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.HKAT_SIYK_SET_DTM))` // Agency Contract Setting Timestamp (引当契約設定年月日時分秒) [from inquiry result hash] |
| 8 | SET | `template.set(EZM0121C010CBSMsg.TLN_SETMEI, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.TLN_SETMEI))` // Telephone Number Description (電話番号説明) [from inquiry result hash] |
| 9 | SET | `template.set(EZM0121C010CBSMsg.KOJIN_HOJIN_TLN_TAI_CD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.KOJIN_HOJIN_TLN_TAI_CD))` // Individual/Corporate Telephone Number Carrier Code (個人法人電話番号帯コード) [from inquiry result hash] |
| 10 | SET | `template.set(EZM0121C010CBSMsg.C5_SERVER_GOKI_SKBT_CD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.C5_SERVER_GOKI_SKBT_CD))` // S5 Server Number Machine Distinction Code (＃５サバ番号機識別コード) [from inquiry result hash] |
| 11 | SET | `template.set(EZM0121C010CBSMsg.TELNO_TSTAYMD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.TELNO_TSTAYMD))` // Telephone Number Applicable Start Date (電話番号適用開始年月日) [from inquiry result hash] |
| 12 | SET | `template.set(EZM0121C010CBSMsg.TELNO_TENDYMD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.TELNO_TENDYMD))` // Telephone Number Applicable End Date (電話番号適用終了年月日) [from inquiry result hash] |
| 13 | SET | `template.set(EZM0121C010CBSMsg.NRN_NO, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.NRN_NO))` // N.R.N. Number (Ｎ．Ｒ．Ｎ．番号) — Number Portability retention number [from inquiry result hash] |
| 14 | SET | `template.set(EZM0121C010CBSMsg.FIRST_WARIATE_YMD, (String)eZM0121A010Hash.get(EZM0121A010CBSMsg1List.FIRST_WARIATE_YMD))` // First Allocation Date (初回割当年月日) [from inquiry result hash] |

### Block 6 — EXEC (previous update timestamp assignment) (L2800)

> Sets the previous/last update date-time from the method parameter. This tracks when the record was last modified before the current change operation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.LAST_UPD_DTM_BF, updDtm)` // Previous Final Update Timestamp (更新前最終年月日時分秒) [from caller parameter zm0121UpdDtm] |

### Block 7 — EXEC (BMP halt request control code assignment) (L2803)

> Sets the BMP (Ban Po = Number Portability Halt) Halt Request Control Code to "0", meaning "Not Required" (不要). This indicates that no halt request is needed for this phone number change operation — the number portability process is proceeding normally without any halt.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.BMP_HAISHI_REQ_CTRL_CD, "0")` // BMP Halt Request Control Code [-> CONSTANT value = "0" (不要 / Not Required)] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `mappingEZM0121C010InMsg_2` | Method | Method name following naming convention: `mapping` (data mapping) + `EZM0121C010` (telephone number change service) + `InMsg` (input message) + `_2` (version 2, indicating an evolved variant) |
| `EZM0121C010` | Service Code | Telephone Number Change service (電話番号変更) — a telecom service component that processes telephone number changes within the number portability (番号ポスキ) framework |
| `EZM0121A010` | Service Code | Telephone Number One-Time Inquiry service (電話番号一意照会) — queries the system to retrieve all service contract details associated with a specific telephone number |
| `CAANMsg` | Technical Type | Fujitsu's service message container class used for SIF (Service Interface Framework) request/response payloads. Supports field-level get/set operations with type-safe accessors. |
| `fillCAANMSGNullMapping` | Method | Local utility method that initializes all fields of a CAANMsg template to null based on a field definition structure (Object[][] contents). Ensures a clean state before population. |
| `SIF` | Acronym | Service Interface Framework — Fujitsu's middleware for invoking service components. Provides template-based request/response messaging with status code handling. |
| `SC` | Acronym | Service Component — a business logic module invoked through the SIF. Each SC code (e.g., `EZM0121C010SC`) maps to a specific business operation. |
| `FUNC_CODE` | Field | Function Code — identifies the type of operation the service component should perform. Value "1" for this method indicates "Telephone Number Change" (電話番号変更). |
| `TELNO` | Field | Telephone Number (電話番号) — the customer's current phone number being processed |
| `KYOKU_NO` | Field | Office Number (局番) — the telephone exchange prefix/code that identifies the local telephone exchange serving the number |
| `NO_CD` | Field | Number Code (番号コード) — the unique number segment assigned within the office prefix |
| `WARIATE_TSJGS_CD` | Field | Assigned Telecom Distributor Code (割当通信事業者コード) — identifies the telecom operator/contractor to whom the number was initially allocated |
| `USE_TSJGS_CD` | Field | End-User Carrier Code (使用通信事業者コード) — identifies the current telecom carrier providing the service to the end customer |
| `SVC_DIV` | Field | Service Division (サービス区分) — classifies the type of service (e.g., FTTH, DSL, Voice, etc.) |
| `HKAT_SIYK_SBT_CD` | Field | Agency Contract Type Code (引当契約種別コード) — the type of agency/assignment contract associated with this service |
| `HKAT_SIYK_SET_DTM` | Field | Agency Contract Setting Timestamp (引当契約設定年月日時分秒) — the date-time when the agency contract was configured |
| `TLN_SETMEI` | Field | Telephone Number Description (電話番号説明) — descriptive label/name for the telephone number |
| `KOJIN_HOJIN_TLN_TAI_CD` | Field | Individual/Corporate Telephone Number Carrier Code (個人法人電話番号帯コード) — distinguishes whether the number belongs to an individual (個人) or corporate (法人) customer and the associated carrier |
| `C5_SERVER_GOKI_SKBT_CD` | Field | S5 Server Number Machine Distinction Code (＃５サバ番号機識別コード) — identifies the server machine type for #5 (SS7/Digital Exchange) signaling processing |
| `TELNO_TSTAYMD` | Field | Telephone Number Applicable Start Date (電話番号適用開始年月日) — the date from which this telephone number assignment becomes effective |
| `TELNO_TENDYMD` | Field | Telephone Number Applicable End Date (電話番号適用終了年月日) — the date until which this telephone number assignment remains valid |
| `NRN_NO` | Field | N.R.N. Number (Ｎ．Ｒ．Ｎ．番号) — Number Retention Number, used in number portability to retain the original number during carrier transitions |
| `FIRST_WARIATE_YMD` | Field | First Allocation Date (初回割当年月日) — the original date the number was first allocated to any carrier |
| `LAST_UPD_DTM_BF` | Field | Previous Final Update Timestamp (更新前最終年月日時分秒) — the timestamp of the last modification before the current operation |
| `BMP_HAISHI_REQ_CTRL_CD` | Field | BMP Halt Request Control Code (番ポ廃止依頼制御コード) — controls whether a number portability halt request is required. "0" = Not Required (不要), "1" = Required (要) |
| `BMP` | Acronym | Ban Po (番ポ) — short for Banpo = Number Portability (電話番号切替/番号ポスキ). "BMP" stands for Ban Po processing in this codebase. |
| `BMP_1` | Constant | BMP flag value "1" indicating "with number portability" (あり). When this flag is set, the EZM0121C010 telephone number change processing is triggered. |
| `eZM0121A010Hash` | Field/Variable | HashMap containing the result data from the telephone number one-time inquiry (EZM0121A010). Holds all service contract and carrier details for the target phone number. |
| `updDtm` | Parameter | Update timestamp (更新年月日時分秒) — the previous/last update date-time for the record being modified |
| `zm0121UpdDtm` | Variable | The phone number-specific update timestamp extracted from request parameters (ZM0121_UPD_DTM), passed to this method as `updDtm` |
| `executeBumpMds` | Method | Post-Number-Portability Execution Method (番ポ後実行メソッド) — the main batch processing entry point for completing number portability migration |
| `callEZM0121C010SC_2` | Method | Telephone Number Change Service Call (電話番号変更呼び出し) — the service component invocation wrapper that creates the SIF request template, maps data via this method, and executes the SC call. Version "_2" indicates the evolved variant (issue #86474, added 2025/03/12). |
| `#86474` | Change Request | Internal change request/ticket number tracking the telephone number change (EZM0121C010) feature addition. Modified 2025/03/12 (ADD) and 2025/03/26 (MOD). |
| `RequestParameterReadWrite` | Technical Type | Interface for SIF request/response parameter data transfer between the calling screen and batch processing logic. |
| `SessionHandle` | Technical Type | Fujitsu session handle for managing SIF service component invocations, typically containing security context and connection information. |
| `TEMPLATE_ID_*` | Constant | String constant defining the SIF template identifier used to tag and route service component requests. |
| `ERR_LV_BIJINES_ERR` | Constant | Error level constant for business-level errors (非業務エラー / non-business error). Triggers conditional skipping of subsequent processing steps. |
| `ITO_DIV` | Field | Dispute Division Flag (異動区分) — indicates whether a service contract is being moved/changed |
| `IDO_RSN_CD` | Field | Dispute Reason Code (異動理由コード) — the reason code for the service contract change/dispute |
| `SVC_KEI_NO` | Field | Service Contract Number (サービス契約番号) — the unique identifier for a service contract |
| `SVC_KEI_UCWK_NO` | Field | Service Contract Detail Work Number (サービス契約内容番号) — the unique identifier for a specific line item/detail within a service contract |
| `SYSID` | Field | Target System ID (対象SYSID) — identifies the target system for processing |
| `TELNO` (requestParam key) | Field | Telephone number extracted from the request parameters |

---
