---
title: Business Logic — JBSbatKKKDDIAnkenChsht.initial()
method: initial
class: JBSbatKKKDDIAnkenChsht
fqn: eo.business.service.JBSbatKKKDDIAnkenChsht
lines: "129–144"
loc: 16
returnType: void
---

# Business Logic — JBSbatKKKDDIAnkenChsht.initial() [16 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.business.service.JBSbatKKKDDIAnkenChsht` |
| Layer | Batch (Service Component — extends `JBSbatBusinessService`) |
| Module | `service` (Package: `eo.business.service`) |

## 1. Role

### JBSbatKKKDDIAnkenChsht.initial()

This method performs the initialization step for the **KDDI Secondary Case Extraction** batch, responsible for extracting case items related to KDDI secondary business operations. The batch operates as part of the **eo Customer Core System** and handles KDDI-related contract management between K-Opticom and other telecom service providers.

As the entry point of the batch processing lifecycle, this method follows the standard **batch service template** pattern shared across all batch service components in the framework. It performs three categories of initialization: (1) setting common batch parameters through the parent class, (2) creating database access objects (SQLAccess instances) for the three tables this batch will interact with — the KDDI other-provider discount contract status table (`KK_T_KDDI_TJGWR_KJKS`), the download file management table (`ZM_T_DL_FILE_KANRI`), and the business parameter management table (`ZM_M_WORK_PARAM_KNRI`) — and (3) invoking the delayed transaction processing request utility to verify pending transaction dependencies before the batch proceeds to its main processing phase.

This is a **delegation-pattern** entry point: it delegates common setup to the parent `JBSbatBusinessService`, delegates SQL access creation to the `JBSbatSQLAccess` constructor, and delegates processing request info retrieval to `JKKBatCommon.getShoriIraiInfo`. There are no conditional branches in this method — it executes a straight-line initialization sequence unconditionally.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["initial(commonItem)"])
    STEP1["setCommonInfo(commonItem)
Set batch common parameters via parent"]
    STEP2["new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_KDDI_TJGWR_KJKS)
Initialize SQLAccess for KK_T_KDDI_TJGWR_KJKS
(KDDI other-provider discount contract status)"]
    STEP3["new JBSbatSQLAccess(commonItem, D_TBL_NAME_ZM_T_DL_FILE_KANRI)
Initialize SQLAccess for ZM_T_DL_FILE_KANRI
(Download file management)"]
    STEP4["new JBSbatSQLAccess(commonItem, D_TBL_NAME_ZM_M_WORK_PARAM_KNRI)
Initialize SQLAccess for ZM_M_WORK_PARAM_KNRI
(Business parameter management)"]
    STEP5["JKKBatCommon.getShoriIraiInfo(commonItem, commonItem.getJobid())
Fetch processing request info for delayed
transaction dependency verification"]
    END_NODE(["Return void / Next"])

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

**Processing Flow:**

1. **Step 1 — Common Parameter Setup**: Delegates to `super.setCommonInfo(commonItem)` which sets up the shared batch processing state (common parameters, logging configuration, error handling setup) via the parent `JBSbatBusinessService` class.

2. **Step 2 — SQLAccess Initialization (KK_T_KDDI_TJGWR_KJKS)**: Creates a database access object for the KDDI other-provider discount contract status table. This table stores contract status records for KDDI-related discount arrangements between K-Opticom and other telecommunications providers.

3. **Step 3 — SQLAccess Initialization (ZM_T_DL_FILE_KANRI)**: Creates a database access object for the download file management table. This table tracks files that have been or need to be downloaded as part of the batch workflow.

4. **Step 4 — SQLAccess Initialization (ZM_M_WORK_PARAM_KNRI)**: Creates a database access object for the business parameter management table. This table stores configurable parameters that control batch behavior.

5. **Step 5 — Delayed Transaction Verification**: Calls `JKKBatCommon.getShoriIraiInfo()` to retrieve the processing request information for the current job. The result is stored in the `dlydTrnMapList` field (Delayed Transaction Map List) and is used to verify that dependent transactions have been properly processed before this batch proceeds.

No conditional branches exist in this method — it is a linear initialization sequence that always executes the same five steps.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commonItem` | `JBSbatCommonItem` | Batch common parameter data file — the shared data transfer object carrying all common batch execution context, including the job ID (`getJobid()`), logging configuration, batch execution flags, error codes, and shared state across all batch service components. |

**Instance fields read/written:**

| # | Field | Type | Business Description |
|---|-------|------|---------------------|
| 1 | `db_KK_T_KDDI_TJGWR_KJKS` | `JBSbatSQLAccess` | Database access handle for the KDDI other-provider discount contract status table (KK_T_KDDI_TJGWR_KJKS) |
| 2 | `db_ZM_T_DL_FILE_KANRI` | `JBSbatSQLAccess` | Database access handle for the download file management table (ZM_T_DL_FILE_KANRI) |
| 3 | `db_ZM_M_WORK_PARAM_KNRI` | `JBSbatSQLAccess` | Database access handle for the business parameter management table (ZM_M_WORK_PARAM_KNRI) |
| 4 | `dlydTrnMapList` | `ArrayList<HashMap<String, Object>>` | Delayed transaction map list — holds processing request info used to verify transaction dependencies before main processing |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `JBSbatBusinessService.setCommonInfo` | JBSbatBusinessService | - | Sets common batch parameters by updating the parent service's common item state |
| C | `JBSbatSQLAccess` constructor | - | `KK_T_KDDI_TJGWR_KJKS` | Creates a database access object for the KDDI other-provider discount contract status table |
| C | `JBSbatSQLAccess` constructor | - | `ZM_T_DL_FILE_KANRI` | Creates a database access object for the download file management table |
| C | `JBSbatSQLAccess` constructor | - | `ZM_M_WORK_PARAM_KNRI` | Creates a database access object for the business parameter management table |
| R | `JKKBatCommon.getShoriIraiInfo` | JACbatShoriIrai | - | Retrieves processing request information for delayed transaction dependency verification |
| R | `ApiCommonItem.getJobid` | - | - | Retrieves the job ID from the common item to pass to `getShoriIraiInfo` |

### Detailed CRUD Analysis:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `setCommonInfo(JBSbatCommonItem)` | JBSbatBusinessService | In-memory | Updates the parent class's common item state with batch parameters — prepares shared execution context |
| C | `JBSbatSQLAccess` (db_KK_T_KDDI_TJGWR_KJKS) | - | `KK_T_KDDI_TJGWR_KJKS` | Instantiates SQLAccess object for reading/writing the KDDI other-provider discount contract status table |
| C | `JBSbatSQLAccess` (db_ZM_T_DL_FILE_KANRI) | - | `ZM_T_DL_FILE_KANRI` | Instantiates SQLAccess object for managing download file records |
| C | `JBSbatSQLAccess` (db_ZM_M_WORK_PARAM_KNRI) | - | `ZM_M_WORK_PARAM_KNRI` | Instantiates SQLAccess object for reading batch business parameters |
| R | `JKKBatCommon.getShoriIraiInfo` | JACbatShoriIrai | Processing request data | Fetches the processing request information map to verify delayed transaction dependencies; uses the job ID from commonItem to scope the query |

## 5. Dependency Trace

This class (`JBSbatKKKDDIAnkenChsht`) is referenced **only within its own source file** in the codebase — no other Java files import or directly reference it. As a batch service component extending the framework's `JBSbatBusinessService`, it is invoked indirectly through the batch framework's configuration mechanism (XML job definitions or batch routing tables), not through direct Java method calls in other source files.

The batch framework's standard execution model calls `initial()` automatically as the first phase of batch processing, before invoking the `main` (main processing) method. The `initial()` method is part of the batch lifecycle contract defined by the `JBSbatBusinessService` base class.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch Framework | `JBSbatBusinessBase.run()` -> `initial(commonItem)` | `setCommonInfo [U] In-memory (JBSbatBusinessService)` |
| 2 | Batch Framework | `JBSbatBusinessBase.run()` -> `initial(commonItem)` | `JBSbatSQLAccess [C] KK_T_KDDI_TJGWR_KJKS` |
| 3 | Batch Framework | `JBSbatBusinessBase.run()` -> `initial(commonItem)` | `JBSbatSQLAccess [C] ZM_T_DL_FILE_KANRI` |
| 4 | Batch Framework | `JBSbatBusinessBase.run()` -> `initial(commonItem)` | `JBSbatSQLAccess [C] ZM_M_WORK_PARAM_KNRI` |
| 5 | Batch Framework | `JBSbatBusinessBase.run()` -> `initial(commonItem)` | `getShoriIraiInfo [R] Processing request data (JACbatShoriIrai)` |

## 6. Per-Branch Detail Blocks

> **Block 1** — [EXEC] `setCommonInfo(commonItem)` (L132)
>
> Sets common batch parameters by delegating to the parent class. This prepares the shared execution context used throughout the batch lifecycle.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `super.setCommonInfo(commonItem);` | Delegates to parent `JBSbatBusinessService` to set common batch parameters from the `commonItem` data transfer object |

> **Block 2** — [SET] `db_KK_T_KDDI_TJGWR_KJKS` initialization (L135)
>
> Creates a database access object for the KDDI other-provider discount contract status table. This table stores contract status records related to KDDI discount arrangements between K-Opticom and other telecom providers.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `db_KK_T_KDDI_TJGWR_KJKS = new JBSbatSQLAccess(commonItem, D_TBL_NAME_KK_T_KDDI_TJGWR_KJKS);` | Instantiates SQLAccess for `KK_T_KDDI_TJGWR_KJKS` (KDDI other-provider discount contract status). Constant `D_TBL_NAME_KK_T_KDDI_TJGWR_KJKS = "KK_T_KDDI_TJGWR_KJKS"` [-> D_TBL_NAME_KK_T_KDDI_TJGWR_KJKS="KK_T_KDDI_TJGWR_KJKS"] |

> **Block 3** — [SET] `db_ZM_T_DL_FILE_KANRI` initialization (L137)
>
> Creates a database access object for the download file management table. This table tracks file download operations as part of the batch workflow.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `db_ZM_T_DL_FILE_KANRI = new JBSbatSQLAccess(commonItem, D_TBL_NAME_ZM_T_DL_FILE_KANRI);` | Instantiates SQLAccess for `ZM_T_DL_FILE_KANRI` (download file management). Constant `D_TBL_NAME_ZM_T_DL_FILE_KANRI = "ZM_T_DL_FILE_KANRI"` [-> D_TBL_NAME_ZM_T_DL_FILE_KANRI="ZM_T_DL_FILE_KANRI"] |

> **Block 4** — [SET] `db_ZM_M_WORK_PARAM_KNRI` initialization (L138)
>
> Creates a database access object for the business parameter management table. This table stores configurable parameters that control batch behavior.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `db_ZM_M_WORK_PARAM_KNRI = new JBSbatSQLAccess(commonItem, D_TBL_NAME_ZM_M_WORK_PARAM_KNRI);` | Instantiates SQLAccess for `ZM_M_WORK_PARAM_KNRI` (business parameter management). Constant `D_TBL_NAME_ZM_M_WORK_PARAM_KNRI = "ZM_M_WORK_PARAM_KNRI"` [-> D_TBL_NAME_ZM_M_WORK_PARAM_KNRI="ZM_M_WORK_PARAM_KNRI"] |

> **Block 5** — [EXEC] Delayed transaction dependency verification (L140)
>
> Retrieves processing request information for the current job to verify delayed transaction dependencies. The result is stored in the `dlydTrnMapList` field for use during main processing. The Japanese comment reads: "ディレクトリ処理依存確認部品呼び出し" (Call delayed transaction dependency verification component).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | CALL | `dlydTrnMapList = JKKBatCommon.getShoriIraiInfo(commonItem, commonItem.getJobid());` | Calls `JKKBatCommon.getShoriIraiInfo()` to fetch processing request info for the current job, passing the job ID from `commonItem.getJobid()` to scope the query. Result stored in `dlydTrnMapList` field for delayed transaction dependency checking during main processing |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `JBSbatKKKDDIAnkenChsht` | Class | KDDI Secondary Case Extraction Batch — the batch service component for extracting KDDI-related case items |
| `ANKEN` | Japanese abbreviation | 案件 (Anken) — Case/Item; refers to business case records in the KDDI secondary business workflow |
| `CHSHT` | Abbreviation | 抽出 (Chusatsu) — Extraction; indicates this batch extracts/retrieves case data |
| `KK` | Prefix | K-Opticom; the company code prefix used in this system |
| `JBSbat` | Prefix | J Batch Service — Java Batch Service component naming convention |
| `JBSbatCommonItem` | Class | Batch common parameter data file — shared data transfer object carrying batch execution context including job ID, logging config, and error handling state |
| `JBSbatBusinessService` | Class | Batch business service base class — parent class providing common batch lifecycle methods (`setCommonInfo`, `main`, `initial`) |
| `JBSbatSQLAccess` | Class | Database access abstraction layer — provides consistent database query/update operations across batch components |
| `JKKBatCommon` | Class | K-Opticom Batch Common utility — shared batch utility class providing common batch operations like processing request info retrieval |
| `KK_T_KDDI_TJGWR_KJKS` | Table | KDDI Other-Provider Discount Contract Status table — stores contract status records for KDDI discount arrangements between K-Opticom and other telecom service providers |
| `ZM_T_DL_FILE_KANRI` | Table | Download File Management table — manages file download records and operations in the batch workflow |
| `ZM_M_WORK_PARAM_KNRI` | Table | Business Parameter Management table — stores configurable parameters that control batch processing behavior |
| `dlydTrnMapList` | Field | Delayed Transaction Map List — holds processing request info used to verify that dependent transactions have been processed before main batch processing |
| `getShoriIraiInfo` | Method | Processing Request Info Retrieval — fetches processing request information for a given job to verify transaction dependencies |
| `SOD` | Acronym | Service Order Data — telecom order fulfillment entity (referenced in framework patterns) |
| `Jobid` | Field | Job Identifier — unique identifier for the current batch job execution, used to scope processing request queries |
| `D_TBL_NAME_*` | Constant | Database Table Name Constant — naming convention for static constants holding table names (D = Definition, T = Table, T = Type prefix for K-Opticom table naming) |
