---
title: "Business Logic — JBSbatKKAdChgFixYokyu.execute() [20 LOC]"
domain: K-Opticom Customer Base System
package: eo.business.service
source: source/koptBatch/src/eo/business/service/JBSbatKKAdChgFixYokyu.java
---

# Business Logic — JBSbatKKAdChgFixYokyu.execute() [20 LOC]

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

## 1. Role

### JBSbatKKAdChgFixYokyu.execute()

This method serves as the **entry point for address change confirmation request processing** (住所変更確定要求部品) within the K-Opticom customer base system. The address change feature handles customer moves — when a subscriber changes their registered address, the system must confirm and finalize the address change request, updating all related service contract line items accordingly. The method implements the **delegate pattern**: it creates an instance of `JBSbatKKAdChgFinAddRun` (Address Change Finalization Addition Run) and delegates the actual work to that object's `initial()`, `execute()`, and `terminal()` lifecycle methods, wrapped in a try/finally block to guarantee cleanup even if an exception occurs. This class is a batch business service (extending `JBSbatBusinessService`), and its role in the larger system is to act as a **coordinator/facade** — it does not perform database operations itself but orchestrates the underlying `JBSbatKKAdChgFinAddRun` component which carries out the heavy lifting across multiple database tables including address change records, service contract details, and work project cases. The method has no conditional branches — it always follows the same three-phase lifecycle: initialize, execute, clean up — and returns the output information from the delegate's `execute` method.

**Javadoc translation:** Main processing — @param inMap Input message, @return JBSbatOutputItem Output information, @throws Exception.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execute(inMap)"])
    STEP1["Create JBSbatKKAdChgFinAddRun execObj"]
    INIT["execObj.initial(commonItem) - Initialization"]
    EXEC["execObj.execute(inMap) - Main processing"]
    FINALLY["finally: execObj.terminal() - Cleanup"]
    RETURN["Return JBSbatOutputItem from execObj.execute()"]

    START --> STEP1
    STEP1 --> INIT
    INIT --> EXEC
    EXEC --> FINALLY
    FINALLY --> RETURN
```

**Processing lifecycle:**

1. **Instantiate the delegate** (`JBSbatKKAdChgFinAddRun`) — a batch service object responsible for address change finalization logic.
2. **Initialize** (`initial`) — sets up common batch parameters and creates SQL access objects for all relevant database tables.
3. **Execute** (`execute`) — the delegate performs the core address change confirmation processing, including reading and updating multiple tables (address change header, service contract details, work project cases, progress tracking).
4. **Cleanup** (`terminal`) — the `finally` block guarantees this runs regardless of whether `execute` succeeds or throws, ensuring proper resource cleanup.
5. **Return** — the `JBSbatOutputItem` from the delegate's execute is returned directly to the caller.

The try/finally block ensures that `terminal()` always executes, providing deterministic cleanup even on error paths. There are no conditional branches within this method itself; all branching logic is delegated to `JBSbatKKAdChgFinAddRun`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `inMap` | `JBSbatServiceInterfaceMap` | The input message carrying batch processing parameters — contains the address change request context, customer identifiers, and processing flags needed by the delegate `JBSbatKKAdChgFinAddRun` to locate and update the relevant records. |

**Instance / external state read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `commonItem` | `JBSbatCommonItem` | Batch common parameter message — inherited from the parent class `JBSbatBusinessService`, this carries shared batch context such as batch execution date/time, operator ID, and transaction information passed to the delegate's `initial()` method. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JBSbatKKAdChgFinAddRun.execute` | JBSbatKKAdChgFinAddRun | - | Calls `execute` in `JBSbatKKAdChgFinAddRun` |
| - | `JBSbatKKAdChgFinAddRun.initial` | JBSbatKKAdChgFinAddRun | - | Calls `initial` in `JBSbatKKAdChgFinAddRun` |
| - | `JBSbatKKAdChgFinAddRun.terminal` | JBSbatKKAdChgFinAddRun | - | Calls `terminal` in `JBSbatKKAdChgFinAddRun` |

### Full CRUD analysis (inferred from the delegate's source code):

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_ADCHG | Reads address change header records to locate the address change request to confirm |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_SVKEI_KAISEN_UW | Reads service contract route line details to determine affected service lines |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_KAISEN_TG_SVKEI | Reads routed-target service contracts to identify which subscriptions are affected |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KU_T_KOJIAK | Reads work project case information for address change project tracking |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_PRG | Reads progress tracking records for batch processing state |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_SVKEI_EXC_CTRL | Reads service contract exclusion control rules |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_SVC_KEI | Reads service contract header information |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_ADCHM_TPPV | Reads address change application temporary save records |
| R | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_ADCHG_DTL | Reads address change detail records |
| U | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_ADCHG | Updates address change header to mark the confirmation as finalized |
| U | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_SVKEI_KAISEN_UW | Updates service contract route line details with new address information |
| U | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_KAISEN_TG_SVKEI | Updates routed-target service contracts reflecting the address change |
| U | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_SVKEI_EXC_CTRL | Updates service contract exclusion control records |
| U | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_SVC_KEI | Updates service contract header with address change data |
| U | `JBSbatKKAdChgFinAddRun` | JBSbatKKAdChgFinAddRun | KK_T_ADCHG_DTL | Updates address change detail records |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Batch: JBSbatKKAdChgFixYokyu | `JBSbatKKAdChgFixYokyu.execute(inMap)` | `execObj.execute()` -> `JBSbatKKAdChgFinAddRun.execute()` -> KK_T_ADCHG [U], KK_T_SVKEI_KAISEN_UW [U], KK_T_KAISEN_TG_SVKEI [U], KU_T_KOJIAK [R], KK_T_PRG [R], KK_T_SVKEI_EXC_CTRL [U], KK_T_SVC_KEI [U], KK_T_ADCHG_DTL [U] |

**Note:** No other files were found that directly call `JBSbatKKAdChgFixYokyu.execute()`. This method is a standalone batch service entry point, likely invoked by the batch scheduler or a batch orchestration layer rather than by a screen controller. It delegates all processing to `JBSbatKKAdChgFinAddRun`, which is also used by `JBSbatKKAdChgCstScreenKidou` for customer move-related processing.

## 6. Per-Branch Detail Blocks

**Block 1** — [TRY] `(L56)`

> Creates the delegate object and enters the main processing lifecycle with guaranteed cleanup.

| # | Type | Code |
|---|------|------|
| 1 | SET | `JBSbatKKAdChgFinAddRun execObj = new JBSbatKKAdChgFinAddRun();` // Instantiate address change finalization delegate [-> L58] |
| 2 | SET | `try` // Begin try block to guarantee terminal() execution in finally [-> L59] |
| 3 | CALL | `execObj.initial(commonItem);` // Initialize the delegate: sets common batch parameters and creates SQL access objects for all DB tables [-> L61, L62] |
| 4 | CALL | `execObj.execute(inMap);` // Execute main address change confirmation processing [-> L64] |
| 5 | RETURN | `return execObj.execute(inMap);` // Return the JBSbatOutputItem from the delegate [-> L65] |

**Block 2** — [FINALLY] `(L67)`

> Ensures cleanup always runs — the `finally` block executes regardless of whether the `execute()` call above succeeded or threw an exception.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `execObj.terminal();` // Cleanup: closes database connections, releases resources held by SQL access objects [-> L69] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `KK_T_ADCHG` | Table | Address Change Header — stores address change request records for customers who have moved |
| `KK_T_ADCHG_DTL` | Table | Address Change Details — stores line-item detail records for each address change request |
| `KK_T_SVKEI_KAISEN_UW` | Table | Service Contract Route Line Details — internal records linking service contracts to their routing paths |
| `KK_T_KAISEN_TG_SVKEI` | Table | Routed-Target Service Contract — service contracts that are targets of route changes |
| `KU_T_KOJIAK` | Table | Work Project Case — tracks work order/project cases for field operations like address changes |
| `KK_T_PRG` | Table | Progress — batch processing progress tracking records |
| `KK_T_SVKEI_EXC_CTRL` | Table | Service Contract Exclusion Control — rules governing which service contracts are excluded from certain operations |
| `KK_T_SVC_KEI` | Table | Service Contract — header records for service contract lines (e.g., FTTH, Mail, ENUM) |
| `KK_T_ADCHM_TPPV` | Table | Address Change Application Temporary Save — temporary storage for address change application data |
| JBSbatKKAdChgFixYokyu | Class | Address Change Fix Confirmation — batch service for confirming/finalizing address change requests (住所変更確定要求部品) |
| JBSbatKKAdChgFinAddRun | Class | Address Change Finalization Addition Run — the delegate that performs actual address change finalization database operations |
| JBSbatBusinessService | Class | Batch Business Service — abstract base class for all batch business services, providing common batch lifecycle methods |
| JBSbatServiceInterfaceMap | Class | Service Interface Map — the input message carrying batch processing parameters |
| JBSbatOutputItem | Class | Output Item — the response object carrying processing results and status |
| JBSbatCommonItem | Class | Common Batch Parameter Item — shared batch context (execution date/time, operator, transaction info) |
| `commonItem` | Field | Batch common parameter message — inherited from parent class, passed to delegate initialization |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| K-Opticom | Business term | Japanese telecommunications provider (the system owner) |
| 住所変更 (Jusho Henkou) | Japanese term | Address Change — customer move processing where a subscriber updates their registered address |
| 確定 (Kakutei) | Japanese term | Confirmation/Finalization — the act of confirming and finalizing a pending address change request |
| バッチ (Batch) | Japanese term | Batch processing — background scheduled job execution mode |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity (used in related order processing) |
| JOKEN | Acronym | Permission/Authorization — used in service permission code fields |
