# Business Logic — JBSbatKKCustDelTrgtCst.initial() [9 LOC]

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

## 1. Role

### JBSbatKKCustDelTrgtCst.initial()

This method performs the **initialization processing** for a batch service component responsible for extracting **customer deletion targets** in the K-Opticom customer base system (`eo` customer base system). The class `JBSbatKKCustDelTrgtCst` is a customer deletion target extraction component that identifies which customer records should be targeted for deletion processing. The `initial` method serves as the standard entry point for this batch service component, following a consistent initialization pattern shared across all batch service components in the framework. Its sole responsibility is to delegate to the parent class's `setCommonInfo` method, which populates the component's internal state with operational context (operation date, batch user ID, system code, job ID, etc.) from the incoming batch common parameter message (`JBSbatCommonItem`). This enables the component and the broader framework to log, audit, and route subsequent processing with the correct operational metadata. The method implements the **delegation pattern** and follows the **template method** convention used by the batch framework, where every batch service component initializes its shared context via the same inherited `setCommonInfo` call before proceeding to its specialized `execute` logic.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["initial(commonItem)"])
    START --> CALL["setCommonInfo(commonItem)"]
    CALL --> END_RETURN(["Return / Next"])
```

**Processing Description:**

The method performs a single delegation step:
1. Invokes `super.setCommonInfo(commonItem)` to populate the parent `JBSbatBusinessService` instance fields with the batch common parameters carried by `commonItem`.

The parent's `setCommonInfo` (in `JBSbatBusinessService`) copies the following fields:
- `opeDate` — operation date
- `onlineOpeDate` — online operation date
- `batchUserId` — batch updater ID
- `systemCode` — system code
- `logPrint` — log output control object
- `jobid` — job ID
- `freeItem` — free item
- `commonItem` — the common message itself (stored as instance field)
- Also sets `JBSbatInterface.commonItem` (static field in the common component class) for framework-wide access

No conditional branches, loops, or additional processing exist in this method.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commonItem` | `JBSbatCommonItem` | Batch common parameter message — carries the shared operational metadata used across all batch components, including operation date, batch user ID, system code, job ID, and log control settings. This object is the standard conduit through which the batch framework communicates runtime context to every service component. |

**Instance fields / external state read by this method:**
- `JBSbatInterface.commonItem` — static field in the common component class. This method writes to it (not reads), making it a side effect of initialization so that any part of the framework can access the common item globally during batch execution.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `JBSbatBusinessService.setCommonInfo` | - | In-memory state (JBSbatBusinessService instance fields) | Sets common batch parameters (operation date, user ID, system code, etc.) onto the service component's internal fields; also sets the static `JBSbatInterface.commonItem` for framework-wide access |

This method performs **no database CRUD operations**. It is purely an in-memory initialization step that configures the service component with runtime context.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKCustDelTrgtCst | (framework entry — not directly referenced in source) | `setCommonInfo [U] in-memory state` |

**Notes:** No callers were found in the source codebase that directly invoke `JBSbatKKCustDelTrgtCst.initial()`. This is consistent with the method being a **framework-dispatched callback**: the batch framework instantiates the component and calls `initial()` as part of a template method pattern, rather than being called explicitly from application code. The parent class `JBSbatBusinessService.setCommonInfo` is the only downstream dependency.

## 6. Per-Branch Detail Blocks

This method has no conditional branches, loops, or exception handling blocks. It consists of a single delegation call.

**Block 1** — [CALL] (L58)

> Delegates to the parent class's common info setter to initialize the component's operational context.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `super.setCommonInfo(commonItem);` // Set common parameters — [-> JBSbatBusinessService.setCommonInfo copies opeDate, onlineOpeDate, batchUserId, systemCode, logPrint, jobid, freeItem, commonItem to instance fields and sets JBSbatInterface.commonItem] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `JBSbatKKCustDelTrgtCst` | Class | Customer Deletion Target Constant Component — batch service component that identifies customer records targeted for deletion processing |
| `JBSbatCommonItem` | Class | Batch Common Item — standard parameter message carrying shared operational metadata (dates, user IDs, system codes) across all batch components |
| `JBSbatBusinessService` | Class | Batch Business Service — parent base class providing common batch service functionality including `setCommonInfo` initialization |
| `JBSbatInterface` | Class | Common Interface — framework class holding a static reference to the common item for global access during batch execution |
| `initial` | Method | Initialization processing — standard entry point called by the batch framework before `execute` |
| `execute` | Method | Main processing — the primary business logic method called after `initial` |
| `opeDate` | Field | Operation Date — the business date on which the batch is being executed |
| `batchUserId` | Field | Batch Updater ID — the identifier of the user or process performing the batch operation |
| `systemCode` | Field | System Code — identifier for the originating system in a multi-system environment |
| `jobid` | Field | Job ID — the unique identifier for the batch job instance |
| `logPrint` | Field | Log Output Control Object — object controlling logging behavior, including program ID assignment |
| `setCommonInfo` | Method | Set Common Info — framework method that populates instance fields from the common parameter message |
| K-Opticom | Business term | Telecommunications service provider — the domain context for this customer base system |
| `eo` | Business term | e-Opticom customer base system — the customer master database system being operated on |
