# Com / Optage / Kopt / Batch

## Overview

The `com.optage.kopt.batch` package contains batch job processing classes that serve as entry points for scheduled batch operations within the KOPT system. These classes encapsulate individual batch routines, providing a structured `run()` method for execution. One of the classes delegates work to an external batch processor in the `com.optage.kopt.ekk` package.

## Key Classes

### KKPRC14901

**[Source](src/main/java/com/optage/kopt/batch/KKPRC14901.java)** — Primary batch processor.

This class serves as the main batch job entry point. It exposes two public methods:

- **`check()`** — A placeholder method with no implementation. This appears to be a stub intended for validation or pre-flight checks before the batch is executed, though no logic has been implemented yet.

- **`run()`** — The core batch execution method. When invoked, it instantiates `EKK0301A010` from the `com.optage.kopt.ekk` package and delegates processing by calling `process()` on it. This is the only class in this package that performs actual delegated work rather than being a no-op stub.

### KKPRC24901

**[Source](src/main/java/com/optage/kopt/batch/KKPRC24901.java)** — Secondary batch processor.

This class provides a `run()` method that serves as a no-op placeholder. The method body contains a comment indicating this is intended for "KKPRC secondary batch" logic. No implementation has been added yet.

### KKPRC34901

**[Source](src/main/java/com/optage/kopt/batch/KKPRC34901.java)** — Tertiary batch processor.

Similar to `KKPRC24901`, this class provides a `run()` method with no implementation, marked as a "KKPRC tertiary batch" placeholder.

## Module Diagram

```mermaid
flowchart TD
    subgraph Batch["Com / Optage / Kopt / Batch"]
        K1["KKPRC14901"]
        K2["KKPRC24901"]
        K3["KKPRC34901"]
    end
    K1 -->|"delegates to EKK0301A010.process()"| EKK["EKK0301A010
com.optage.kopt.ekk"]
    K2 -->|"run() stub"| EXT1["External batch logic"]
    K3 -->|"run() stub"| EXT2["External batch logic"]
```

## Dependencies

| Dependency | Package | Usage |
|---|---|---|
| `EKK0301A010` | `com.optage.kopt.ekk` | Used by `KKPRC14901.run()` to delegate batch processing |

The `EKK0301A010` class lives in a sibling package (`com.optage.kopt.ekk`) and is not part of this package's index. It provides the actual processing logic that `KKPRC14901` triggers.

## Notes for Developers

- **Stub pattern**: `KKPRC24901` and `KKPRC34901` are currently empty stubs. They follow the same `public void run()` signature as `KKPRC14901`, suggesting a common interface or convention that all batch classes should implement. When adding implementation, follow the same pattern.

- **Delegation in KKPRC14901**: The `run()` method creates a new `EKK0301A010` instance inline and calls `process()`. This is a simple delegation pattern — if the external processor needs configuration, it would need to be passed into the constructor.

- **`check()` method**: `KKPRC14901` has a separate `check()` method that is currently unimplemented. If the batch system supports pre-run validation, this is the designated hook.

- **Naming convention**: The `KKPRC` prefix followed by numeric codes appears to be a naming convention for batch procedures within this project. The numbering (14901, 24901, 34901) suggests sequential ordering of batch types.
