# Business Logic — JKKKyoseiDslRunMapperCC.mappingEZM0121C010InMsg() [73 LOC]

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

## 1. Role

### JKKKyoseiDslRunMapperCC.mappingEZM0121C010InMsg()

This method acts as an **input message builder** for the EZM0121C010 service component (SC). Its sole business purpose is to populate a `CAANMsg` template with all the condition / filter fields needed to invoke the EZM0121C010 SC — a service that retrieves portability-related information for personal and corporate telephone numbers. The method implements the **message mapper (builder) pattern**: it takes raw business data from two input maps and a scalar parameter, then assembles them into a standardized CAANMsg request envelope. It has no conditional branches — it performs a flat, sequential field-by-field population. The EZM0121C010 SC is part of the telecom portability domain, handling number portability lookups (MNP — Mobile Number Portability). This method serves as the data-packing layer between the business controller (`JKKKyoseiDslRunCC.callEZM0121C010SC`) and the downstream service component, ensuring that all required fields are null-safe (via `fillCAANMSGNullMapping`) and consistently typed.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["mappingEZM0121C010InMsg"])
    S1["fillCAANMSGNullMapping
Null mapping for all fields"]
    S2["set TEMPLATEID
EZM0121C010"]
    S3["set FUNC_CODE
1"]
    S4["set TELNO from eZM0121A010HashList"]
    S5["set KYOKU_NO from eZM0121A010HashList"]
    S6["set NO_CD from eZM0121A010HashList"]
    S7["set WARIATE_TSJGS_CD from eZM0121A010HashList"]
    S8["set USE_TSJGS_CD from eZM0121A010HashList"]
    S9["set SVC_DIV from eZM0121A010HashList"]
    S10["set HKAT_SIYK_SBT_CD from eZM0121A010HashList"]
    S11["set HKAT_SIYK_SET_DTM from eZM0121A010HashList"]
    S12["set TLN_SETMEI from eZM0121A010HashList"]
    S13["set KOJIN_HOJIN_TLN_TAI_CD from param"]
    S14["set C5_SERVER_GOKI_SKBT_CD from eZM0121A010HashList"]
    S15["set TELNO_TSTAYMD from eZM0121A010HashList"]
    S16["set TELNO_TENDYMD from eZM0121A010HashList"]
    S17["set NRN_NO from eZM0121A010HashList"]
    S18["set FIRST_WARIATE_YMD from eZM0121A010HashList"]
    S19["set LAST_UPD_DTM_BF from eZM0121A010HashList"]
    S20["set SHK_KOJIN_HOJIN_TLN_TAI_CD from eZM0121A010HashList"]
    S21["set TLN_STKU_TSJGS_CD from eZM0121A010HashList"]
    S22["set ITNM_TSJGS_CD from eZM0121A010HashList"]
    S23["set ITNS_TSJGS_CD from eZM0121A010HashList"]
    END(["Return void"])

    START --> S1
    S1 --> S2
    S2 --> S3
    S3 --> S4
    S4 --> S5
    S5 --> S6
    S6 --> S7
    S7 --> S8
    S8 --> S9
    S9 --> S10
    S10 --> S11
    S11 --> S12
    S12 --> S13
    S13 --> S14
    S14 --> S15
    S15 --> S16
    S16 --> S17
    S17 --> S18
    S18 --> S19
    S19 --> S20
    S20 --> S21
    S21 --> S22
    S22 --> S23
    S23 --> END
```

The method follows a linear, sequential flow with no conditional logic:

1. **Null-safe initialization**: Call `fillCAANMSGNullMapping` to ensure all fields in the template are initialized to null, preventing null-pointer issues downstream.
2. **Envelope setup**: Set the `TEMPLATEID` and `FUNC_CODE` on the template to identify this as an EZM0121C010 request with function code `1`.
3. **Field-by-field population**: Extract 22 business fields from `eZM0121A010HashList` (and one direct parameter `kojinHojinTlnTaiCd`) and write them into the `template` via `set()`.

All 22 data fields come from the `eZM0121A010HashList` hash map, which was previously populated by `mappingEZM0121A010SCOutMsg` (the response parser for the EZM0121A010 SC). The method acts as a data-pass-through, transferring query conditions from one service invocation's output to the next service's input.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `template` | `CAANMsg` | The CAAN message envelope to populate. This is the request payload that will be sent to the EZM0121C010 SC. |
| 2 | `resultHash` | `HashMap<String, Object>` | Reserved / unused in this method. Javadoc marks it as present but no fields are read from it. |
| 3 | `kojinHojinTlnTaiCd` | `String` | Personal/Corporate telephone number carrier code — distinguishes whether the phone number belongs to an individual (personal) or corporate entity. Passed directly (not from hash map). |
| 4 | `eZM0121A010HashList` | `HashMap<String, Object>` | The result hash from the prior EZM0121A010 SC invocation. Contains all query conditions (phone number, branch code, service division, portability carrier info, etc.) extracted from the EZM0121A010 response. Used as the sole data source for the 22 field mappings. |

**External state / instance fields**: None. The method is entirely stateless and reads only from its parameters.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| EXEC | `JKKKyoseiDslRunMapperCC.fillCAANMSGNullMapping` | - | - | Null-maps all fields in the template using EZM0121C010 CBS message contents |
| R | `EZM0121C010CBSMsg.getContents` | - | - | Returns the set of message contents for null mapping |
| W | `CAANMsg.set` | - | - | Sets individual message fields (22 set operations) on the template |

**Details:**

| # | Type | SC / Method | CR | Description |
|---|------|-------------|----|-------------|
| 1 | CALL | `fillCAANMSGNullMapping(template, new EZM0121C010CBSMsg().getContents())` | EXEC | Initializes all fields in the template to null using the EZM0121C010 message contents definition |
| 2 | SET | `template.set(EZM0121C010CBSMsg.TEMPLATEID, JKKKyoseiDslRunCC.TEMPLATE_ID_EZM0121C010)` | W | Sets message envelope template ID = `"EZM0121C010"` |
| 3 | SET | `template.set(EZM0121C010CBSMsg.FUNC_CODE, JPCModelConstant.FUNC_CD_1)` | W | Sets function code = `"1"` (standard function code) |
| 4 | SET | `template.set(EZM0121C010CBSMsg.TELNO, ...)` | W | Sets phone number |
| 5 | SET | `template.set(EZM0121C010CBSMsg.KYOKU_NO, ...)` | W | Sets branch code |
| 6 | SET | `template.set(EZM0121C010CBSMsg.NO_CD, ...)` | W | Sets number code |
| 7 | SET | `template.set(EZM0121C010CBSMsg.WARIATE_TSJGS_CD, ...)` | W | Sets assigned telecommunications carrier code |
| 8 | SET | `template.set(EZM0121C010CBSMsg.USE_TSJGS_CD, ...)` | W | Sets used telecommunications carrier code |
| 9 | SET | `template.set(EZM0121C010CBSMsg.SVC_DIV, ...)` | W | Sets service division |
| 10 | SET | `template.set(EZM0121C010CBSMsg.HKAT_SIYK_SBT_CD, ...)` | W | Sets portability contract type code |
| 11 | SET | `template.set(EZM0121C010CBSMsg.HKAT_SIYK_SET_DTM, ...)` | W | Sets portability contract setup datetime |
| 12 | SET | `template.set(EZM0121C010CBSMsg.TLN_SETMEI, ...)` | W | Sets phone number description |
| 13 | SET | `template.set(EZM0121C010CBSMsg.KOJIN_HOJIN_TLN_TAI_CD, kojinHojinTlnTaiCd)` | W | Sets personal/corporate phone number carrier code (from direct parameter) |
| 14 | SET | `template.set(EZM0121C010CBSMsg.C5_SERVER_GOKI_SKBT_CD, ...)` | W | Sets C5 service number machine identification code |
| 15 | SET | `template.set(EZM0121C010CBSMsg.TELNO_TSTAYMD, ...)` | W | Sets phone number application start date |
| 16 | SET | `template.set(EZM0121C010CBSMsg.TELNO_TENDYMD, ...)` | W | Sets phone number application end date |
| 17 | SET | `template.set(EZM0121C010CBSMsg.NRN_NO, ...)` | W | Sets NRN (Number Portability Reference) number |
| 18 | SET | `template.set(EZM0121C010CBSMsg.FIRST_WARIATE_YMD, ...)` | W | Sets first assignment date |
| 19 | SET | `template.set(EZM0121C010CBSMsg.LAST_UPD_DTM_BF, ...)` | W | Sets last update datetime (before) |
| 20 | SET | `template.set(EZM0121C010CBSMsg.SHK_KOJIN_HOJIN_TLN_TAI_CD, ...)` | W | Sets initial personal/corporate phone number carrier code |
| 21 | SET | `template.set(EZM0121C010CBSMsg.TLN_STKU_TSJGS_CD, ...)` | W | Sets phone number acquisition carrier code |
| 22 | SET | `template.set(EZM0121C010CBSMsg.ITNM_TSJGS_CD, ...)` | W | Sets port-in (before) carrier code |
| 23 | SET | `template.set(EZM0121C010CBSMsg.ITNS_TSJGS_CD, ...)` | W | Sets port-out carrier code |

## 5. Dependency Trace

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

Direct callers of this method: `JKKKyoseiDslRunCC.callEZM0121C010SC()`.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKKyoseiDslRunCC.callEZM0121C010SC()` | `callEZM0121C010SC(param, handle, resultHash, KOJIN_HOJIN_TLN_TAI_CD, eZM0121A010HashList)` → `mappingEZM0121C010InMsg(template, resultHash, kojinHojinTlnTaiCd, eZM0121A010HashList)` | `callSCCmn` → EZM0121C010 SC |

**Call chain detail for caller `callEZM0121C010SC`:**

The caller `callEZM0121C010SC` in `JKKKyoseiDslRunCC` (line 9547):
1. Creates a new `CAANMsg` with `EZM0121C010CBSMsg` class name.
2. Delegates to `mappingEZM0121C010InMsg` to populate the template.
3. Invokes the SC via `callSCCmn(param, handle, template)`.
4. Processes the response via `mappingCAANOutMsgAdd`.

Terminal operations reached from this method: `fillCAANMSGNullMapping` (EXEC), `getContents` (R) x1 (EZM0121C010CBSMsg), and 22x `CAANMsg.set` (W).

## 6. Per-Branch Detail Blocks

This method has **no conditional branches** — it is a flat sequential flow. Below are the processing blocks in sequence.

---

**Block 1** — [PROCEDURE] `(null-safe initialization)` (L4378)

> Initialize all fields in the template to null using the EZM0121C010 CBS message contents.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `fillCAANMSGNullMapping(template, new EZM0121C010CBSMsg().getContents())` // Null-maps all fields in the template using EZM0121C010 CBS message contents |

---

**Block 2** — [PROCEDURE] `(template envelope: TEMPLATEID)` (L4380)

> Set the message envelope template ID to identify this as an EZM0121C010 request.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TEMPLATEID, JKKKyoseiDslRunCC.TEMPLATE_ID_EZM0121C010)` // Sets template ID -> `TEMPLATE_ID_EZM0121C010 = "EZM0121C010"` |

---

**Block 3** — [PROCEDURE] `(template envelope: FUNC_CODE)` (L4383)

> Set the standard function code for this service request.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.FUNC_CODE, JPCModelConstant.FUNC_CD_1)` // Sets function code -> `FUNC_CD_1 = "1"` |

---

**Block 4** — [PROCEDURE] `(phone number)` (L4386)

> Extract phone number from the prior EZM0121A010 result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TELNO, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.TELNO))` // Extracts phone number |

---

**Block 5** — [PROCEDURE] `(branch code)` (L4389)

> Extract branch code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.KYOKU_NO, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.KYOKU_NO))` // Extracts branch code |

---

**Block 6** — [PROCEDURE] `(number code)` (L4392)

> Extract number code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.NO_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.NO_CD))` // Extracts number code |

---

**Block 7** — [PROCEDURE] `(assigned telecommunications carrier code)` (L4395)

> Extract the carrier code assigned for portability from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.WARIATE_TSJGS_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.WARIATE_TSJGS_CD))` // Extracts assigned telecom carrier code |

---

**Block 8** — [PROCEDURE] `(used telecommunications carrier code)` (L4398)

> Extract the carrier code used for service from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.USE_TSJGS_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.USE_TSJGS_CD))` // Extracts used telecom carrier code |

---

**Block 9** — [PROCEDURE] `(service division)` (L4401)

> Extract service division code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.SVC_DIV, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.SVC_DIV))` // Extracts service division |

---

**Block 10** — [PROCEDURE] `(portability contract type code)` (L4404)

> Extract the portability contract type code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.HKAT_SIYK_SBT_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.HKAT_SIYK_SBT_CD))` // Extracts portability contract type code |

---

**Block 11** — [PROCEDURE] `(portability contract setup datetime)` (L4407)

> Extract the portability contract setup datetime from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.HKAT_SIYK_SET_DTM, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.HKAT_SIYK_SET_DTM))` // Extracts portability contract setup datetime |

---

**Block 12** — [PROCEDURE] `(phone number description)` (L4410)

> Extract the phone number description from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TLN_SETMEI, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.TLN_SETMEI))` // Extracts phone number description |

---

**Block 13** — [PROCEDURE] `(personal/corporate phone number carrier code)` (L4414)

> Set the personal/corporate phone number carrier code from the direct parameter (not from hash map).

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.KOJIN_HOJIN_TLN_TAI_CD, kojinHojinTlnTaiCd)` // Sets personal/corporate phone number carrier code from direct parameter |

---

**Block 14** — [PROCEDURE] `(C5 service number machine identification code)` (L4417)

> Extract the C5 server machine identification code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.C5_SERVER_GOKI_SKBT_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.C5_SERVER_GOKI_SKBT_CD))` // Extracts C5 service number machine ID code |

---

**Block 15** — [PROCEDURE] `(phone number application start date)` (L4420)

> Extract the phone number application start date from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TELNO_TSTAYMD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.TELNO_TSTAYMD))` // Extracts phone number application start date |

---

**Block 16** — [PROCEDURE] `(phone number application end date)` (L4423)

> Extract the phone number application end date from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TELNO_TENDYMD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.TELNO_TENDYMD))` // Extracts phone number application end date |

---

**Block 17** — [PROCEDURE] `(NRN number)` (L4426)

> Extract the NRN (Number Portability Reference) number from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.NRN_NO, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.NRN_NO))` // Extracts NRN number |

---

**Block 18** — [PROCEDURE] `(first assignment date)` (L4429)

> Extract the first assignment date from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.FIRST_WARIATE_YMD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.FIRST_WARIATE_YMD))` // Extracts first assignment date |

---

**Block 19** — [PROCEDURE] `(last update datetime before)` (L4432)

> Extract the last update datetime before from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.LAST_UPD_DTM_BF, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.UPD_DTM))` // Extracts last update datetime (before) |

---

**Block 20** — [PROCEDURE] `(initial personal/corporate phone number carrier code)` (L4434)

> Extract the initial personal/corporate phone number carrier code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.SHK_KOJIN_HOJIN_TLN_TAI_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.SHK_KOJIN_HOJIN_TLN_TAI_CD))` // Extracts initial personal/corporate phone number carrier code |

---

**Block 21** — [PROCEDURE] `(phone number acquisition carrier code)` (L4437)

> Extract the phone number acquisition carrier code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.TLN_STKU_TSJGS_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.TLN_STKU_TSJGS_CD))` // Extracts phone number acquisition carrier code |

---

**Block 22** — [PROCEDURE] `(port-in carrier code)` (L4440)

> Extract the port-in (before portability) carrier code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.ITNM_TSJGS_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.ITNM_TSJGS_CD))` // Extracts port-in carrier code |

---

**Block 23** — [PROCEDURE] `(port-out carrier code)` (L4443)

> Extract the port-out carrier code from the prior result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EZM0121C010CBSMsg.ITNS_TSJGS_CD, eZM0121A010HashList.get(EZM0121A010CBSMsg1List.ITNS_TSJGS_CD))` // Extracts port-out carrier code |

---

**Block 24** — [RETURN] `(end of method)` (L4445)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | (void) // Method completes; template is now fully populated for SC invocation |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `EZM0121C010` | SC Code | Telecom Portability Condition Query SC — service component that queries portability-related conditions for telephone numbers |
| `CAANMsg` | Class | CAAN message envelope — the standard message container used throughout the JPCModel framework for inter-component communication |
| `fillCAANMSGNullMapping` | Method | Null-safe initialization helper — sets all fields in a CAANMsg to null based on CBS message contents definition |
| `TEMPLATE_ID_EZM0121C010` | Constant | Template ID string = `"EZM0121C010"` — identifies the message type for the EZM0121C010 SC |
| `FUNC_CD_1` | Constant | Function code string = `"1"` — standard/primary function code from JPCModelConstant |
| `TELNO` | Field | Telephone number — the phone number being queried for portability |
| `KYOKU_NO` | Field | Branch code — the Fujitsu branch/office code |
| `NO_CD` | Field | Number code — internal number classification code |
| `WARIATE_TSJGS_CD` | Field | Assigned telecommunications carrier code — the carrier code assigned for portability (assigned operator) |
| `USE_TSJGS_CD` | Field | Used telecommunications carrier code — the carrier code currently in use (using operator) |
| `SVC_DIV` | Field | Service division — classifies the type of telecom service (e.g., phone, data, fiber) |
| `HKAT_SIYK_SBT_CD` | Field | Portability contract type code — type of portability contract (MNP contract classification) |
| `HKAT_SIYK_SET_DTM` | Field | Portability contract setup datetime — timestamp of when the portability contract was established |
| `TLN_SETMEI` | Field | Phone number description — human-readable description of the phone number |
| `KOJIN_HOJIN_TLN_TAI_CD` | Field | Personal/corporate phone number carrier code — distinguishes individual vs corporate entity type for the phone number |
| `C5_SERVER_GOKI_SKBT_CD` | Field | C5 service number machine identification code — identifies the C5 system server for service number operations |
| `TELNO_TSTAYMD` | Field | Phone number application start date — when the phone number application starts |
| `TELNO_TENDYMD` | Field | Phone number application end date — when the phone number application ends |
| `NRN_NO` | Field | NRN (Number Portability Reference) number — the unique reference number for number portability |
| `FIRST_WARIATE_YMD` | Field | First assignment date — the date the number was first assigned |
| `LAST_UPD_DTM_BF` | Field | Last update datetime (before) — the timestamp before the most recent update, used for optimistic locking or change tracking |
| `SHK_KOJIN_HOJIN_TLN_TAI_CD` | Field | Initial personal/corporate phone number carrier code — the carrier code at initial registration |
| `TLN_STKU_TSJGS_CD` | Field | Phone number acquisition carrier code — the carrier from which the phone number was acquired |
| `ITNM_TSJGS_CD` | Field | Port-in (before) carrier code — the carrier code before port-in (originating carrier) |
| `ITNS_TSJGS_CD` | Field | Port-out carrier code — the carrier code after port-out (destination carrier) |
| `eZM0121A010HashList` | Parameter | Result hash map from the EZM0121A010 SC — contains query condition data extracted from the prior service response |
| `JKKKyoseiDslRunCC` | Class | DSL Run Common Component — the business controller that orchestrates DSL (domain service layer) run operations including service component invocations |
| `JPCModelConstant` | Class | Shared constant definitions — contains standard constants like function codes used across the JPCModel framework |
| `JKKKyoseiDslRunMapperCC` | Class | DSL Run Mapper Common Component — the message mapper that transforms data between business objects and CAANMsg envelopes |
