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

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

## 1. Role

### JFUShokaishaCheckCC.setInMapEKK0311A010()

This method performs **upper (upstream) data mapping for the EKK0311A010 referral uniqueness inquiry screen** (紹介一意照会 — single unique referral lookup). Its business purpose is to prepare the request parameter map with the minimal data payload required to trigger a referral uniqueness check: specifically, the function code identifying the screen context, and the referral inquiry code identifying which referral record to verify for uniqueness. It implements a **builder/routing design pattern** by extracting user data from the request parameter object, augmenting it with structural metadata (function code, inquiry key), and storing it back into the shared map for downstream processing by the CBS (Central Business System) layer. As a private utility method, it serves as a **shared data preparer** called by the screen's business delegate (`chkIntrCd`) and is not an entry point itself. The method has no conditional branches — it follows a linear three-step flow: function code setup, data retrieval, and key injection.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setInMapEKK0311A010"])
    A["FUNC_CD_1 = 1<br>機能コード設定"]
    B["inMap = param.getData(fixedText)<br>ユーザデータ取得"]
    C["inMap.put(KEY_INTR_CD, intrCd)<br>紹介照会コード"]
    END_NODE(["Return"])

    START --> A
    A --> B
    B --> C
    C --> END_NODE
```

**CRITICAL — Constant Resolution:**

- `JPCModelConstant.FUNC_CD_1 = "1"` — Function code 1, representing the primary screen/function context for this inquiry operation.
- `EKK0311A010CBSMsg.KEY_INTR_CD = "key_intr_cd"` — The HashMap key under which the referral inquiry code is stored, serving as the unique identifier for the referral record being checked.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter container that carries data between the screen tier and the business logic tier. Its `getData(fixedText)` retrieves the user data HashMap, and it serves as the vehicle through which the function code is set. |
| 2 | `fixedText` | `String` | The service message key — a discriminator string used to identify the data region within the request parameter. It acts as the key to fetch the correct HashMap containing the user's form data for this specific service/screen flow. |
| 3 | `intrCd` | `String` | The referral inquiry code (紹介照会コード) — the business identifier for the specific referral record whose uniqueness is to be verified. This value is injected into the data map as the lookup key for downstream CBS processing. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JFUBaseCC.setFuncCode` | - | - | Calls `setFuncCode` to set function code "1" in the request parameter's service message, establishing the screen context |

**Note:** This method is a pure data-mapping utility with no direct database or entity CRUD operations. The actual database access (if any) occurs in the downstream CBS layer invoked after this mapping is complete. The `setFuncCode` call is a metadata setup operation that writes a function code string to the service message portion of the parameter — classified as `-` (neither C/R/U/D against persistent storage).

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS:JFUShokaishaCheckCC.chkIntrCd | `chkIntrCd` -> `setInMapEKK0311A010` | `param.getData [R]`, `setFuncCode [-]` |

**Instructions:**
- Direct callers found: 1 method (`chkIntrCd`).
- No screen/batch entry points found within 8 hops — this method is a private utility called within a CBS (Common Business Service) layer, not a direct screen handler.
- Terminal operations from this method: `param.getData` [R — Read from request param], `setFuncCode` [- — metadata setup, no CRUD against database].

## 6. Per-Branch Detail Blocks

**Block 1** — [SET/CALL] `(setFuncCode — function code setup)` (L367–369)

> Sets the function code to "1" (FUNC_CD_1) on the request parameter's service message. This identifies the processing context for downstream components.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setFuncCode(param, fixedText, JPCModelConstant.FUNC_CD_1)` // 機能コード設定(1) [-> FUNC_CD_1="1"] |

**Block 1.1** — [nested: setFuncCode call] (L369)

> Delegates to `JFUBaseCC.setFuncCode` (or equivalent) to write the function code into the service message of the request parameter. This is a no-branch setup step.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUBaseCC.setFuncCode(param, fixedText, "1")` // delegates to base CC class |

**Block 2** — [SET/EXEC] `(param.getData — user data retrieval)` (L371–373)

> Retrieves the HashMap containing the screen's user data by passing the `fixedText` service message key to `param.getData()`. The result is cast to `HashMap` and stored in the local variable `inMap` for further manipulation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap)param.getData(fixedText)` // ユーザデータ取得 (user data acquisition) |

**Block 3** — [SET/EXEC] `(inMap.put — referral inquiry code injection)` (L375–377)

> Injects the referral inquiry code (`intrCd`) into the user data map under the key `"key_intr_cd"`. This is the core mapping operation — it populates the data structure that downstream CBS components will use to perform the uniqueness check on the specified referral record.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap.put(EKK0311A010CBSMsg.KEY_INTR_CD, intrCd)` // キー照会コード (key inquiry code) [-> KEY_INTR_CD="key_intr_cd"] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `intrCd` | Field | Referral inquiry code (紹介照会コード) — the unique identifier for a referral record being checked for uniqueness in the business system |
| `key_intr_cd` | Constant | The HashMap key name used to store and retrieve the referral inquiry code in the request parameter's data map |
| `fixedText` | Field | Service message key (サービスメッセージ) — a discriminator used to identify which data region within the request parameter corresponds to this specific service/screen flow |
| FUNC_CD_1 | Constant | Function code "1" — a standard constant representing the primary/first function context in the Fujitsu Futurity model framework |
| setFuncCode | Method | A common utility method that sets the function code in the service message portion of a request parameter, establishing the screen context for downstream processing |
| EKK0311A010 | Screen/Process Code | The screen or process code for the referral uniqueness inquiry (紹介一意照会) — a business operation that verifies whether a referral record already exists uniquely in the system |
| 紹介一意照会 | Japanese term | Referral uniqueness inquiry — a business check to determine if a referral (introduction/connection between parties) already exists uniquely, preventing duplicate referrals |
| IRequestParameterReadWrite | Interface | The request parameter contract interface used throughout the Futurity framework for passing bidirectional data between screen and business tiers |
| 機能コード | Japanese term | Function code — a numeric identifier (such as "1") that specifies which screen or business function is currently active, used for context-aware processing in common utilities |
| ユーザデータ | Japanese term | User data — the form/data payload associated with the current screen interaction, stored as a HashMap within the request parameter |
| 上りマッピング | Japanese term | Upper/upstream mapping — the process of preparing and populating data structures on the request path (from screen to server) before they are processed by the CBS layer |
