# Business Logic — JFUShokaishaCheckCC.setInMapEKK0081B532() [11 LOC]

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

## 1. Role

### JFUShokaishaCheckCC.setInMapEKK0081B532()

This method performs the **upstream (top-flow) parameter mapping** for the **EKK0081B532 — Service Contract List Inquiry (Referral Code)** screen. It is a private helper that prepares the `HashMap` request payload used by the SC (Service Component) execution layer. Specifically, it sets the function code to `"1"` (indicating the inquiry function), retrieves the mutable parameter map identified by `fixedText`, and injects the introduction (referral) code (`intrCd`) into that map under the key `"key_intr_cd"`.

This method follows the **mapping/dispatch design pattern** commonly used throughout the Fujitsu Futurity BP framework: it transforms incoming HTTP/request parameters into a structured internal map that is subsequently consumed by `executeSC` (the SC execution wrapper). It is called exclusively by `checkSvcKei`, which runs the full inquiry-and-validate flow for checking whether a service contract line is available for referral purposes.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setInMapEKK0081B532(param, fixedText, intrCd)"])
    STEP1["setFuncCode(param, fixedText, FUNC_CD_1 = \"1\")
Set function code to 1"]
    STEP2["getData(fixedText): Retrieve HashMap from param"]
    STEP3["inMap.put(KEY_INTR_CD = \"key_intr_cd\", intrCd)
Store introduction code in map"]
    END_NODE(["Return void / Caller resumes"])

    START --> STEP1 --> STEP2 --> STEP3 --> END_NODE
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|-----------------|
| `JPCModelConstant.FUNC_CD_1` | `"1"` | Function code identifying this as an inquiry (search) operation |
| `EKK0081B532CBSMsg.KEY_INTR_CD` | `"key_intr_cd"` | Map key for the introduction/referral code passed to the SC layer |

The method executes **three sequential steps** with no conditional branches:
1. Sets the function code via delegation to `JFUShokaishaCheckCC.setFuncCode()`.
2. Retrieves the existing `HashMap` from the request parameter object using the `fixedText` identifier.
3. Puts the introduction code (`intrCd`) into the map, enabling the downstream SC to filter/look up service contracts by this referral code.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter carrier that holds the mutable input map. Used to set the function code and retrieve the service message payload (`HashMap`) for this screen's data exchange with the SC layer. |
| 2 | `fixedText` | `String` | Service message identifier — a key string used to distinguish this screen's data area within the request parameter object. It maps to the service message zone for EKK0081B532, ensuring data isolation when multiple screens or tabs share the same request. |
| 3 | `intrCd` | `String` | Introduction code (referral code) — the code identifying the referring party in a referral-based service contract. This code is injected into the request map so the SC can query service contracts linked to this specific referral. |

**External state accessed:**

| Field | Source | Business Description |
|-------|--------|---------------------|
| `setFuncCode` (method) | `JFUShokaishaCheckCC` | Delegates function-code setting to the base class utility |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JFUShokaishaCheckCC.setFuncCode` | — | — | Sets function code `"1"` on the request parameter for the inquiry operation |
| R | `IRequestParameterReadWrite.getData` | — | — | Retrieves the HashMap payload from the request parameter by `fixedText` key |
| W | `HashMap.put` | — | — | Inserts the introduction code into the input map under key `"key_intr_cd"` |

**Analysis:**
- This method does **not directly invoke any SC (Service Component) or CBS (Connection Business Service)**. It only prepares the data structure that a caller (specifically `checkSvcKei`) will subsequently pass to `executeSC`.
- The `setFuncCode` call configures the function code as a side-effect on the request parameter, which is a framework convention.
- The `put` operation is a simple map write that enriches the request payload with the referral code.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `setFuncCode` [-], `getData` [R], `put` [W]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JFUShokaishaCheckCC.checkSvcKei | `checkSvcKei(handle, param, fixedText, inIntrCd)` → `setInMapEKK0081B532(param, fixedText, inIntrCd)` | `setFuncCode [-]`, `getData [R]`, `put [W]` |

**Call Chain Detail:**
`checkSvcKei` is a private validation method that orchestrates the full inquiry flow:
1. Calls `initData` to initialize the parameter map with column definitions.
2. Calls **`setInMapEKK0081B532`** (this method) to populate the introduction code into the request.
3. Calls `ignoreSearchError` to suppress search errors.
4. Calls `executeSC` to execute the SC against the prepared map.
5. Iterates over the returned template list to check service contract statuses.

No public screen class (`KKSV*`) was found calling this chain within 8 hops in the available codebase. The method is **private** and serves exclusively as an internal mapping step within the referral-check business flow.

## 6. Per-Branch Detail Blocks

**Block 1** — [EXEC] `setFuncCode` call (L464)

> Sets the function code to `"1"` (inquiry mode). The comment reads: 機能コード設定(1) (Function code setting (1)).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setFuncCode(param, fixedText, JPCModelConstant.FUNC_CD_1)` |

**Block 2** — [SET + CAST] `HashMap` retrieval from request parameter (L467)

> Retrieves the service message payload from the request parameter. The comment reads: ユーザーデータ取得 (User data retrieval).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `HashMap inMap = (HashMap)param.getData(fixedText)` |

**Block 3** — [SET + PUT] `HashMap` insertion of introduction code (L470)

> Inserts the introduction (referral) code into the request map so the SC layer can use it for filtering. The comment reads: 紹介コード (Introduction code).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.put(EKK0081B532CBSMsg.KEY_INTR_CD, intrCd)` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `intrCd` / `inIntrCd` | Field | Introduction Code — the referral code identifying the party that referred a customer to a service contract |
| `fixedText` | Field | Service Message Identifier — a string key that identifies the data zone within the request parameter, used to isolate data between multiple screens or tabs |
| `svc_kei_no` (referenced by caller `checkSvcKei`) | Field | Service Detail Number — internal identifier for a service contract line item |
| `svc_kei_stat` (referenced by caller `checkSvcKei`) | Field | Service Status — current state of a service contract line (e.g., received, under review, completed, terminated, suspended, cancelled) |
| `FUNC_CD_1` | Constant | Function Code `"1"` — indicates an inquiry/search operation in the framework convention |
| `KEY_INTR_CD` | Constant | `"key_intr_cd"` — map key used to pass the introduction/referral code to the SC layer |
| SC | Acronym | Service Component — the middleware layer that executes database queries and business logic |
| CBS | Acronym | Connection Business Service — the service message definition class for the SC |
| EKK0081B532 | Screen/SC Code | Service Contract List Inquiry (Referral Code) — the screen and SC code for viewing service contracts filtered by a referral/introduction code |
| HashMap | Type | Java `java.util.HashMap` — the mutable key-value map used as the request/response payload between screens and SCs |
| IRequestParameterReadWrite | Interface | Framework interface for reading and writing request parameters, providing `getData()` and data mutation methods |
| JPCModelConstant | Class | Framework constant class defining standard codes such as function codes |
| setFuncCode | Method | Framework utility method that sets the function code on the request parameter, enabling the SC layer to determine the operation mode |
| executeSC | Method | Framework method that invokes the SC layer with the prepared request map |
| initData | Method | Framework method that initializes the request map with column definitions and metadata |
| ignoreSearchError | Method | Framework method that configures the request to ignore search errors, allowing the screen to display even if no matching records exist |
