---
title: "Business Logic — JKKAdchgTelInfoChgCC.setTokiInfo()"
file: "source/koptBp/ejbModule/com/fujitsu/futurity/bp/custom/common/JKKAdchgTelInfoChgCC.java"
lines: "2510-2593"
loc: 84
fqn: "com.fujitsu.futurity.bp.custom.common.JKKAdchgTelInfoChgCC"
layer: "CC/Common Component"
---

# Business Logic — JKKAdchgTelInfoChgCC.setTokiInfo() [84 LOC]

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

## 1. Role

### JKKAdchgTelInfoChgCC.setTokiInfo()

This method performs **migratory service timing information synchronization** for telecom service contracts that have been moved (transferred/reneged — 転居). When a customer's service contract is transferred to a new address, the system must reconcile timing preferences (desired service start dates) between the old contract and the new contract. Specifically, it handles two categories of service timing: **DSL pause timing** (解約・休止トーキ — cancellation/suspension timing) and **internal post-delivery timing** (開設後トーキ — post-connectivity timing). The method acts as a shared utility called by the service change initialization screen controller (`KKSV0004OP`), functioning as a guard-pattern dispatcher that reads consent data from a prior contract lookup, validates whether timing updates are necessary, and selectively propagates consent results into the current session's parameter map. It employs the **routing/dispatch pattern** with early-exit guards, then the **delegation pattern** for timing updates and the cross-service transfer registration.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setTokiInfo"])
    EARLY_RETURN(["Early Return"])

    START --> GetParam["getRequestParameter"]
    GetParam --> GetUserHash["Get userData from param KEY_TELNO_INFO_TOKI"]
    GetUserHash --> CheckUserNull{userData null?}
    CheckUserNull -- yes --> EARLY_RETURN
    CheckUserNull -- no --> GetEKKMap["Get EKK0191C011 from userData"]
    GetEKKMap --> CheckEKKNull{EKK0191C011Map null?}
    CheckEKKNull -- yes --> EARLY_RETURN
    CheckEKKNull -- no --> CheckBeforeSvc{"is before_svc_kei_ucwk_no empty?"}
    CheckBeforeSvc -- yes/empty --> EARLY_RETURN
    CheckBeforeSvc -- no --> GetContract["getEKK0191A010(beforeSvcKeiUcwkNo)"]
    GetContract --> CheckContractNull{kk0191_a010_map null or empty?}
    CheckContractNull -- yes --> EARLY_RETURN
    CheckContractNull -- no --> ExtractFields["Extract: dsl_pause_toki and itens_opaf_toki fields"]
    ExtractFields --> CheckAllNasi{"All 4 isTokiKiboNasi true?"}
    CheckAllNasi -- yes --> EARLY_RETURN
    CheckAllNasi -- no --> GetOpeDate["JCCBPCommon.getOpeDate(null)"]
    GetOpeDate --> CheckDslTiming{"DSL pause timing skip logic"}
    CheckDslTiming --> SyncDsl{"DSL pause: sync consent to EKK0191C011?"}
    SyncDsl -- yes --> CallEditDsl["editDslPauseTokiNoUpd"]
    SyncDsl -- no --> CheckItnsTiming{"Internal post-delivery timing skip logic"}
    CallEditDsl --> CheckItnsTiming
    CheckItnsTiming --> SyncItns{"Itns post-delivery: sync consent?"}
    SyncItns -- yes --> CallEditItns["editItnsOpafTokiNoUpd"]
    SyncItns -- no --> SetUpdBf["Set upd_dtm_bf in userData and EKK0191C011Map"]
    CallEditItns --> SetUpdBf
    SetUpdBf --> CallEditTss["editItnsOpafTokiTssSvkuwno(userData, EKK0191C011Map)"]
    CallEditTss --> SetData["keepReqParam.get().setData(KEY_TELNO_INFO_TOKI, userData)"]
    SetData --> CreateItenToki["Create JKKItenTokiInfoSetteiCC"]
    CreateItenToki --> CallItenToki["itenTokiInfoSettei(handle, param, KEY_TELNO_INFO_TOKI)"]
    CallItenToki --> END_NODE(["Return"])
```

**Key Decision Logic — DSL Pause Timing:**

The method applies a skip condition: if either (a) **both** current and new DSL pause timing values are empty/no-preference (`isTokiKiboNasi`), OR (b) **both** have timing set, a start date exists, and the operation date has not yet passed the start date (`opeDate.compareTo(dsl_pause_toki_sta_ymd) <= 0`), then the consent data is copied without modification — meaning the existing contract's consent takes precedence. Otherwise, the method bypasses the update entirely, treating the timing as outside the update scope.

**Key Decision Logic — Internal Post-Delivery Timing:**

An analogous skip condition applies to internal post-delivery (itens_opaf) timing. If either both values are absent, or both are present with a future start date, the consent results are transferred to the EKK0191C011 map. Otherwise, the update is skipped.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | `(none — uses instance-level getRequestParameter())` | - | - |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `keepReqParam` (via `get()`) | `ThreadLocal<...>` holding `IRequestParameterReadWrite` | Request parameter holder carrying the migratory service timing data (`KEY_TELNO_INFO_TOKI = "telno_info_toki"`) through the current request thread |
| `keepSesHandle` (via `get()`) | `ThreadLocal<Handle>` | Session database handle used for downstream service calls |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKAdchgTelInfoChgCC.getRequestParameter` | JKKAdchgTelInfoChgCC | — | Retrieves the request parameter map from the current thread-local request context |
| R | `JKKAdchgTelInfoChgCC.getEKK0191A010` | EKK0191A010 | Service contract details (FTTH phone) consent table | Fetches the old (pre-transfer) service contract consent data for the source service work number, including DSL pause and internal post-delivery timing preferences |
| R | `JCCBPCommon.getOpeDate` | JCCBPCommon | — | Retrieves the current operation date from the system configuration |
| U | `JKKAdchgTelInfoChgCC.editDslPauseTokiNoUpd` | JKKAdchgTelInfoChgCC | — | Synchronizes the consent results (DSL pause timing fields) from the source contract lookup into the EKK0191C011 parameter map, effectively copying the old contract's timing decisions |
| U | `JKKAdchgTelInfoChgCC.editItnsOpafTokiNoUpd` | JKKAdchgTelInfoChgCC | — | Synchronizes the consent results (internal post-delivery timing fields) from the source contract lookup into the EKK0191C011 parameter map |
| U | `JKKAdchgTelInfoChgCC.editItnsOpafTokiTssSvkuwno` | JKKAdchgTelInfoChgCC | — | Edits the internal post-delivery transfer destination details number (転送先内訳番号) in the user data map |
| U | `keepReqParam.get().setData` | — | — | Stores the updated userData back into the request parameter holder under `KEY_TELNO_INFO_TOKI` |
| C | `JKKItenTokiInfoSetteiCC.itenTokiInfoSettei` | JKKItenTokiInfoSettei | Migratory timing info tables | Registers/cross-sets the migratory service timing information as a separate cross-component step, passing the handle, request params, and the telno_info_toki key |

## 5. Dependency Trace

### Direct callers:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `KKSV0004OP` (JKKAdchgInitDspCC) | `JKKAdchgInitDspCC` (screen controller) -> `setTokiInfo()` (no-arg, this method) | `editDslPauseTokiNoUpd [U] —`, `editItnsOpafTokiNoUpd [U] —`, `editItnsOpafTokiTssSvkuwno [U] —`, `itenTokiInfoSettei [C] —` |
| 2 | `KKSV0004` (JKKAdchgInitDspCC line 234) | Screen initialization -> `setTokiInfo()` | Same as above |

The method at line 2510 is a no-argument private method called during service change initialization. A separate overload of `setTokiInfo` (with explicit parameters) exists in `JKKAdchgInitDspCC` at line 5106, but the no-arg variant used here relies on the instance-level request parameter context.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(userData == null)` (L2515)

> Early return guard: If the migratory timing user data hash map is absent from the request parameters, there is nothing to process.

| # | Type | Code |
|---|------|------|
| 1 | SET | `param = getRequestParameter()` // Retrieve request parameter map [REQUEST_PARAM] |
| 2 | SET | `beforeSvcKeiUcwkNo = (String) param.get("before_svc_kei_ucwk_no")` // Transfer source service work number [BEFORE_SVC_KEI_UCWK_NO] |
| 3 | SET | `userData = (HashMap) param.get(KEY_TELNO_INFO_TOKI)` // KEY_TELNO_INFO_TOKI = "telno_info_toki" [TELNO_INFO_TOKI_KEY] |
| 4 | IF | `userData == null` // If no migratory timing data present |
| 4.1 | RETURN | `return` // No migratory timing data to process |

**Block 2** — [IF] `(EKK0191C011Map == null)` (L2520)

> Early return guard: If the EKK0191C011 sub-map (containing consent results) is absent within userData, skip processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `EKK0191C011Map = (HashMap) userData.get("EKK0191C011")` // Consent result sub-map |
| 2 | IF | `EKK0191C011Map == null` // If consent results not available |
| 2.1 | RETURN | `return` // No consent data to synchronize |

**Block 3** — [IF] `(StringUtils.isEmpty(beforeSvcKeiUcwkNo))` (L2524)

> Early return guard: Without a source service work number (転居元 — transfer origin), there is no old contract to compare against.

| # | Type | Code |
|---|------|------|
| 1 | IF | `StringUtils.isEmpty(beforeSvcKeiUcwkNo)` // Source service work number is empty/null |
| 1.1 | RETURN | `return` // Cannot process without a transfer source |

**Block 4** — [IF] `(kk0191_a010_map == null || isEmpty)` (L2529)

> Fetches the old service contract consent data. If no record is found (e.g., the old contract has no associated consent), processing stops.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `kk0191_a010_map = getEKK0191A010(beforeSvcKeiUcwkNo)` // Query old contract consent [EKK0191A010] |
| 2 | IF | `kk0191_a010_map == null || kk0191_a010_map.isEmpty()` // No old consent data found |
| 2.1 | RETURN | `return` // No prior consent to reference |

**Block 5** — [EXTRACT FIELDS] (L2532–2537)

> Extracts timing preference and start date fields from both the old contract (kk0191_a010_map) and the new/param consent (EKK0191C011Map).

| # | Type | Code |
|---|------|------|
| 1 | SET | `dsl_pause_toki_kibo_um = kk0191_a010_map.get(DSL_PAUSE_TOKI_KIBO_UM)` // Old: DSL pause timing preference [-> "dsl_pause_toki_kibo_um"] |
| 2 | SET | `dsl_pause_toki_sta_ymd = kk0191_a010_map.get(DSL_PAUSE_TOKI_STA_YMD)` // Old: DSL pause start date (YYYYMMDD) |
| 3 | SET | `itens_opaf_toki_kibo_um = kk0191_a010_map.get(ITENS_OPAF_TOKI_KIBO_UM)` // Old: Internal post-delivery timing preference |
| 4 | SET | `itens_opaf_toki_sta_ymd = kk0191_a010_map.get(ITENS_OPAF_TOKI_STA_YMD)` // Old: Internal post-delivery start date |
| 5 | SET | `param_dsl_pause_toki_kibo_um = EKK0191C011Map.get("dsl_pause_toki_kibo_um")` // New: DSL pause preference from param |
| 6 | SET | `param_itens_opaf_toki_kibo_um = EKK0191C011Map.get("itens_opaf_toki_kibo_um")` // New: Internal post-delivery preference from param |

**Block 6** — [IF] `(All 4 isTokiKiboNasi checks)` (L2540–2545)

> Skip condition: If both old and new have NO timing preference for ALL four fields (DSL pause + internal post-delivery), there is nothing to update. `isTokiKiboNasi` returns true when the value is empty or equals `"0"` (no preference).

| # | Type | Code |
|---|------|------|
| 1 | IF | `isTokiKiboNasi(dsl_pause_toki_kibo_um) && isTokiKiboNasi(param_dsl_pause_toki_kibo_um) && isTokiKiboNasi(itens_opaf_toki_kibo_um) && isTokiKiboNasi(param_itens_opaf_toki_kibo_um)` // All 4 timing values are empty/"0" [IS_TOKI_KIBO_NASI="isEmpty() || val==\"0\""] |
| 1.1 | RETURN | `return` // No timing preference changes exist |

**Block 7** — [GET OPERATION DATE] (L2548)

> Retrieves the current system operation date for date comparison in the subsequent timing validation logic.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opeDate = JCCBPCommon.getOpeDate(null)` // Current operation date [OPERATION_DATE] |

**Block 8** — [IF] `(DSL pause timing skip logic)` (L2551–2559)

> Business rule: Determine whether to sync the old contract's DSL pause consent results into the new parameter map. Two scenarios trigger the sync (copy of consent): (a) Both old and new DSL pause timing are absent — meaning no timing was specified in either contract, so the old consent stands. (b) Both have timing set, a start date exists, and the operation date has not yet passed the start date — meaning the timing has not taken effect yet, so the old consent should be preserved.

| # | Type | Code |
|---|------|------|
| 1 | IF | `(isTokiKiboNasi(dsl_pause_toki_kibo_um) && isTokiKiboNasi(param_dsl_pause_toki_kibo_um))` // Both DSL pause values are empty/"0" [NO_PREFERENCE_BOTH] |
| 1.1 | OR | `||` |
| 1.2 | IF | `(!isTokiKiboNasi(dsl_pause_toki_kibo_um) && !isTokiKiboNasi(param_dsl_pause_toki_kibo_um) && !StringUtils.isEmpty(dsl_pause_toki_sta_ymd) && opeDate.compareTo(dsl_pause_toki_sta_ymd) <= 0)` // Both have timing set, start date exists, operation date not yet past start [TIMING_NOT_YET_EFFECTIVE] |
| 1.3 | EXEC | `editDslPauseTokiNoUpd(EKK0191C011Map, kk0191_a010_map)` // Copy DSL pause consent from old to new map [SYNC_CONSENT] // "更新対象外とするため意思表示の結果を転記" — Copy consent results because outside update scope |

**Block 9** — [IF] `(Internal post-delivery timing skip logic)` (L2562–2571)

> Business rule: Analogous to Block 8 but for internal post-delivery (開設後) timing. If both old and new have no timing, or both have timing set with a future start date, copy the consent results from the old contract lookup to the new parameter map.

| # | Type | Code |
|---|------|------|
| 1 | IF | `(isTokiKiboNasi(itens_opaf_toki_kibo_um) && isTokiKiboNasi(param_itens_opaf_toki_kibo_um))` // Both internal post-delivery values are empty/"0" |
| 1.1 | OR | `||` |
| 1.2 | IF | `(!isTokiKiboNasi(itens_opaf_toki_kibo_um) && !isTokiKiboNasi(param_itens_opaf_toki_kibo_um) && !StringUtils.isEmpty(itens_opaf_toki_sta_ymd) && opeDate.compareTo(itens_opaf_toki_sta_ymd) <= 0)` // Both have timing, start date exists, operation date not past |
| 1.3 | EXEC | `editItnsOpafTokiNoUpd(EKK0191C011Map, kk0191_a010_map)` // Copy internal post-delivery consent from old to new [SYNC_CONSENT] // "更新対象外とするため意思表示の結果を転記" |

**Block 10** — [SET UPDATE DATETIME] (L2574–2577)

> Records the last update datetime from the old contract lookup into both the userData and EKK0191C011Map as `upd_dtm_bf` (update datetime before).

| # | Type | Code |
|---|------|------|
| 1 | SET | `userData.put("upd_dtm_bf", kk0191_a010_map.get(LAST_UPD_DTM))` // LAST_UPD_DTM = "last_upd_dtm" — last update timestamp (before) |
| 2 | SET | `EKK0191C011Map.put("upd_dtm_bf", kk0191_a010_map.get(LAST_UPD_DTM))` // Same timestamp in consent map |

**Block 11** — [EDIT TRANSFER DESTINATION] (L2580)

> Edits the internal post-delivery transfer destination details number in the user data.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `editItnsOpafTokiTssSvkuwno(userData, EKK0191C011Map)` // Edit post-delivery transfer destination details [EDIT_TSS_SVKUWNO] |

**Block 12** — [SET DATA BACK] (L2583)

> Writes the updated userData back into the request parameter holder so downstream components receive the synchronized migratory timing info.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `keepReqParam.get().setData(KEY_TELNO_INFO_TOKI, userData)` // KEY_TELNO_INFO_TOKI = "telno_info_toki" — persist updated migratory timing data |

**Block 13** — [CREATE AND CALL ITEN TOKI CC] (L2586–2593)

> Creates a migratory timing info setup cross-component and delegates the timing registration to it. The key parameter is `KEY_TELNO_INFO_TOKI` (telno_info_toki), which was changed from `KEY_BMPO_ADD` via a 2014 change ticket (IT1-2014-0000023).

| # | Type | Code |
|---|------|------|
| 1 | SET | `itenTokiCC = new JKKItenTokiInfoSetteiCC()` // Create migratory timing info setup component |
| 2 | CALL | `itenTokiCC.itenTokiInfoSettei(keepSesHandle.get(), keepReqParam.get(), KEY_TELNO_INFO_TOKI)` // Register migratory timing info [KEY_TELNO_INFO_TOKI = "telno_info_toki"] // IT1-2014-0000023対応 — Changed from KEY_BMPO_ADD |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `before_svc_kei_ucwk_no` | Field | Transfer source service work number — the internal tracking ID of the service contract before customer transfer (転居元) |
| `dsl_pause_toki_kibo_um` | Field | DSL pause timing preference indicator — whether the customer wants to specify a cancellation/suspension start date (null/empty or "0" means no preference) |
| `dsl_pause_toki_sta_ymd` | Field | DSL pause start date — YYYYMMDD-formatted date when the cancellation/suspension timing takes effect |
| `itens_opaf_toki_kibo_um` | Field | Internal post-delivery timing preference — whether the customer wants to specify a post-connectivity start date for internal processing |
| `itens_opaf_toki_sta_ymd` | Field | Internal post-delivery start date — YYYYMMDD date when post-connectivity timing becomes effective |
| `upd_dtm_bf` | Field | Update datetime before — the last update timestamp carried over from the old contract, preserved for audit/comparison |
| `isTokiKiboNasi` | Method | Returns true if a timing preference value is absent (empty string or "0") — i.e., the customer has no timing preference |
| `EKK0191A010` | SC Code | Service contract details inquiry for FTTH phone — retrieves the old contract's consent data including timing preferences |
| `EKK0191C011` | Map Key | Sub-map within userData holding the consent result data (意思表示の結果) for the current service change request |
| `KEY_TELNO_INFO_TOKI` | Constant | `"telno_info_toki"` — the request parameter key under which migratory (転居) telephone timing information is stored |
| `LAST_UPD_DTM` | Constant | `"last_upd_dtm"` — the last update datetime field name in the EKK0191A010 contract detail result |
| `DSL_PAUSE_TOKI_KIBO_UM` | Constant | `"dsl_pause_toki_kibo_um"` — the field name for DSL pause/cancellation timing preference in EKK0191A010CBSMsg1List |
| `ITENS_OPAF_TOKI_KIBO_UM` | Constant | `"itens_opaf_toki_kibo_um"` — the field name for internal post-delivery timing preference in EKK0191A010CBSMsg1List |
| DSL | Business term | Digital Subscriber Line — broadband telecommunication service over copper phone lines |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| トーキ (Toki) | Japanese term | Timing — refers to desired start dates/scheduling for service changes |
| 転居 (Tenkyo) | Japanese term | Customer address transfer/move — a telecom service event where a customer moves their service contract from one address to another |
| 意思表示 (Ishi-hyouji) | Japanese term | Customer consent/intent expression — the customer's expressed preference regarding service change timing |
| 解約 (Kaiyaku) | Japanese term | Cancellation — terminating a service contract |
| 休止 (Shiishi) | Japanese term | Suspension — temporarily pausing a service contract |
| 開設後 (Kaisetsu-go) | Japanese term | Post-connectivity — internal processing timing after service has been activated |
| 転送先内訳番号 | Japanese term | Transfer destination details number — internal routing detail number for post-delivery transfers |
| JKKItenTokiInfoSetteiCC | Class | Migratory timing info setup cross-component — handles the cross-service registration of migratory timing information |
| IT1-2014-0000023 | Change ticket | 2014 change ticket that modified the key parameter from `KEY_BMPO_ADD` to `KEY_TELNO_INFO_TOKI` |
