# Business Logic — FUW02201SFLogic.setFuOpedate() [10 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW02201SF.FUW02201SFLogic` |
| Layer | Service (Web View Logic) |
| Module | `FUW02201SF` (Package: `eo.web.webview.FUW02201SF`) |

## 1. Role

### FUW02201SFLogic.setFuOpedate()

This method is a data-setting utility responsible for propagating an **operation date** (運用日付, OPE date) into the **front-end shared information** structure within the web-layer bean hierarchy. It extracts the `FRONT_COMMON_INFO` data bean array from the incoming `commonInfoBean`, retrieves the first (index 0) data bean instance, and sets the field `FU_OPEDATE_05` (front operation date) to the provided `opeDate` value. The method plays the role of a **builder/initializer helper** within the `FUW02201SF` screen logic — it prepares shared state that will be consumed by subsequent processing steps or by the presentation layer. It uses a **delegation pattern**, relying on `getDataBeanArray`, `getDataBean`, and `sendMessageString` from the `X31SDataBeanAccess` API to navigate and mutate the bean structure. It has no conditional branches — it is a linear, deterministic setter.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setFuOpedate(commonInfoBean, opeDate)"])
    START --> NAV["commonInfoBean.getDataBeanArray(CommonInfoCFConst.FRONT_COMMON_INFO)"]
    NAV --> GET0["getDataBean(0)"]
    GET0 --> FRONT_INFO["frontInfo = result as X31SDataBeanAccess"]
    FRONT_INFO --> SEND["frontInfo.sendMessageString(CommonInfoCFConst.FU_OPEDATE_05, X31CWebConst.DATABEAN_SET_VALUE, opeDate)"]
    SEND --> END(["Return / Next"])
```

**Processing Description:**
1. **Navigation** — From the `commonInfoBean` parameter, call `getDataBeanArray(CommonInfoCFConst.FRONT_COMMON_INFO)` to retrieve the data bean array identified by the constant key.
2. **Element Selection** — From the returned data bean array, call `getDataBean(0)` to obtain the first element (index 0).
3. **Assignment** — Cast and store the result into the local variable `frontInfo` of type `X31SDataBeanAccess`.
4. **Value Setting** — Invoke `frontInfo.sendMessageString(CommonInfoCFConst.FU_OPEDATE_05, X31CWebConst.DATABEAN_SET_VALUE, opeDate)` to set the front operation date field to the provided `opeDate`.

**Constants Resolved:**
- `CommonInfoCFConst.FRONT_COMMON_INFO` — Key identifying the front-end shared information data bean array within the common info structure.
- `CommonInfoCFConst.FU_OPEDATE_05` — Field identifier for the front operation date (FU_OPEDATE_05) within the front common info data bean.
- `X31CWebConst.DATABEAN_SET_VALUE` — Operation mode constant indicating a value-set operation on a data bean field.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commonInfoBean` | `X31SDataBeanAccess` | The shared form bean that holds common screen data. It contains nested data beans including the `FRONT_COMMON_INFO` array which carries front-end shared information across screen processing stages. This bean acts as the data context root for the operation. |
| 2 | `opeDate` | `String` | The operation date (運用日付, OPE date) to be set. This date represents the business transaction date used for logging, record-keeping, or processing timestamping. It is a string-formatted date value (e.g., `yyyyMMdd`). |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `X31SDataBeanAccess.getDataBeanArray(String)` | - | - | Retrieves the data bean array identified by `FRONT_COMMON_INFO` key from the common info bean hierarchy. |
| R | `DataBeanArray.getDataBean(int)` | - | - | Retrieves the data bean at index 0 from the front common info array. |
| SET | `X31SDataBeanAccess.sendMessageString(String, String, String)` | - | - | Sets the front operation date field (`FU_OPEDATE_05`) to the provided `opeDate` value on the front info data bean. |

**Classification Notes:**
- All operations are Read (R) or Set (data bean mutation). There are no database reads or writes (C/R/U/D) performed by this method.
- `getDataBeanArray` and `getDataBean` are read operations that navigate the in-memory bean hierarchy.
- `sendMessageString` is a setter operation that mutates the data bean field — classified as SET (not DBCRUD) since it operates on an in-memory data structure, not a database table.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `getDataBeanArray` [R], `getDataBean` [R], `sendMessageString` [SET]  # NOSONAR

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `FUW02201SFLogic.init()` | `init()` -> `setFuOpedate(commonInfoBean, opeDate)` | `getDataBeanArray` [R], `getDataBean` [R], `sendMessageString` [SET] |

**Description:** The only known caller is `FUW02201SFLogic.init()`, which is the initialization method of the same class. It calls `setFuOpedate` to populate the front-end shared information with the operation date during screen initialization. This is a typical init-then-use pattern where screen state is prepared before subsequent processing.

## 6. Per-Branch Detail Blocks

**Block 1** — [ASSIGNMENT] `frontInfo` initialization (L579)

> Extract the front common info data bean from the common info bean by navigating through the data bean array at index 0.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `commonInfoBean.getDataBeanArray(CommonInfoCFConst.FRONT_COMMON_INFO)` // Retrieve the front common info data bean array from the common info bean [-> `CommonInfoCFConst.FRONT_COMMON_INFO` = "Key for front-end shared info array"] |
| 2 | CALL | `.getDataBean(0)` // Select the first element (index 0) from the data bean array |
| 3 | SET | `X31SDataBeanAccess frontInfo = ...` // Store the front common info data bean reference |

**Block 2** — [ASSIGNMENT] `opeDate` setting (L581)

> Set the operation date value into the front common info data bean field.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `frontInfo.sendMessageString(CommonInfoCFConst.FU_OPEDATE_05, X31CWebConst.DATABEAN_SET_VALUE, opeDate)` // Set the front operation date field to the provided opeDate value [-> `CommonInfoCFConst.FU_OPEDATE_05` = "Field key for front operation date", `X31CWebConst.DATABEAN_SET_VALUE` = "Operation mode: set value"] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `opeDate` | Field | Operation Date — the business transaction date used for record-keeping, formatted as a string (typically `yyyyMMdd`) |
| `CommonInfoCFConst.FRONT_COMMON_INFO` | Constant | Key identifier for the front-end shared information data bean array within the common info structure |
| `CommonInfoCFConst.FU_OPEDATE_05` | Constant | Field identifier for the front operation date within the front common info data bean |
| `X31CWebConst.DATABEAN_SET_VALUE` | Constant | Operation mode constant indicating a value-set operation on a data bean field |
| `X31SDataBeanAccess` | Technical | Shared Data Bean Access — a data access bean used to navigate and mutate the shared information bean hierarchy in the web layer |
| 運用日付 (OPE date) | Japanese term | Operation Date — the business date on which a transaction or operation is executed; used for audit trails and date-based processing |
| フロント共有情報 (Front Shared Info) | Japanese term | Front-End Shared Information — data passed between front-end components across screen processing stages; carried in nested data beans |
| 共通フォームBean (Common Form Bean) | Japanese term | Common Form Bean — the root bean containing shared screen data including front-end shared info, used as the data context for screen logic |
| FU_OPEDATE_05 | Field | Front Operation Date field (05) — the specific field within the front common info data bean that stores the operation date |
