# Business Logic — KKW00810SFLogic.editServiceFormBean() [45 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00810SF.KKW00810SFLogic` |
| Layer | Controller (Web presentation layer, under `eo.web.webview` package) |
| Module | `KKW00810SF` (Package: `eo.web.webview.KKW00810SF`) |

## 1. Role

### KKW00810SFLogic.editServiceFormBean()

This method serves as a data synchronization utility within the Fixed IP Add-ON service screen (KKW00810SF). Its primary responsibility is to **transfer service configuration data from a source data bean (ipAddressBean) into the target form bean (svcFormBean)**, preparing the form for display or further processing by the view layer. Specifically, it extracts Fixed IP address, subnet mask, usage start date components (year/month/day), and several service contract line item fields (line item number, internal number, registration timestamp, and status) from the source bean — and populates corresponding fields on the target bean so the screen can render the complete service order configuration. The method follows a **sequential data-copy pattern** with no branching logic: it performs a series of read-then-write pairs, acting as a data mapper between two bean representations. It has no conditional logic (no if/else/switch), making it a straightforward, deterministic transformer. It is called internally by `actionInitKKW00810()`, positioning it as a shared initialization helper that assembles the form data model before the screen is rendered to the user.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editServiceFormBean(svcFormBean)"])

    START --> ExtractList["Extract FIXIPAD_HRADSI_LIST from svcFormBean"]
    ExtractList --> GetBean["Get first element (index 0) as ipAddressBean"]
    GetBean --> GetIP["Get ipAddress from ipAddressBean FIXIPAD_02"]
    GetIP --> GetNetmask["Get netMask from ipAddressBean NETMASK_02"]
    GetNetmask --> SplitDate["Parse unyo_ymd instance field into year/month/day"]
    SplitDate --> SetIP["Set KOTEI_IP_AD into svcFormBean"]
    SetIP --> SetNetmask["Set SUBNET_MASK into svcFormBean"]
    SetNetmask --> SetYear["Set USE_STAYMD_YEAR into svcFormBean"]
    SetYear --> SetMon["Set USE_STAYMD_MON into svcFormBean"]
    SetMon --> SetDay["Set USE_STAYMD_DAY into svcFormBean"]
    SetDay --> GetSvcKaisen["Get svc_kei_kaisen_ucwk_no from ipAddressBean"]
    GetSvcKaisen --> SetSvcKaisen["Set SVC_KEI_KAISEN_UCWK_NO into svcFormBean"]
    SetSvcKaisen --> GetSvcUcwkg["Get svc_kei_ucwk_no from ipAddressBean"]
    GetSvcUcwkg --> SetSvcUcwkg["Set SVC_KEI_UCWK_NO into svcFormBean"]
    SetSvcUcwkg --> GetRegDtm["Get kk0161_gene_add_dtm from ipAddressBean"]
    GetRegDtm --> SetRegDtm["Set KK0161_GENE_ADD_DTM into svcFormBean"]
    SetRegDtm --> GetSvcStat["Get svc_kei_ucwk_stat from ipAddressBean"]
    GetSvcStat --> SetSvcStat["Set SVC_KEI_UCWK_STAT into svcFormBean"]
    SetSvcStat --> END_NODE(["Return void"])
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|------------------|
| `FIXIPAD_HRADSI_LIST` | `"固定IPアウドラス出力結果明細"` [-> FIXIPAD_HRADSI_LIST="固定IPアウドラス出力結果明細" (KKW00810SFConst.java:194)] | Fixed IP address output result details key |
| `FIXIPAD_02` | `"固定IPアウドラス"` [-> FIXIPAD_02 (KKW00810SFConst.java, source line)] | Fixed IP address key |
| `NETMASK_02` | `"ネットマスク"` [-> NETMASK_02="ネットマスク" (KKW00810SFConst.java:269)] | Net mask key |
| `KOTEI_IP_AD` | `"固定IPアウドラス"` [-> KOTEI_IP_AD="固定IPアウドラス" (KKW00810SFConst.java:34)] | Fixed IP address target key |
| `SUBNET_MASK` | `"サブネットマスク"` [-> SUBNET_MASK="サブネットマスク" (KKW00810SFConst.java:39)] | Subnet mask target key |
| `USE_STAYMD_YEAR` | `"利用開始日（年）"` [-> USE_STAYMD_YEAR="利用開始日（年）" (KKW00810SFConst.java:44)] | Usage start date (year) |
| `USE_STAYMD_MON` | `"利用開始日（月）"` [-> USE_STAYMD_MON="利用開始日（月）" (KKW00810SFConst.java:49)] | Usage start date (month) |
| `USE_STAYMD_DAY` | `"利用開始日（日）"` [-> USE_STAYMD_DAY="利用開始日（日）" (KKW00810SFConst.java:54)] | Usage start date (day) |
| `SVC_KEI_KAISEN_UCWK_NO_02` | `"サービス契約回線内訳番号"` [-> SVC_KEI_KAISEN_UCWK_NO_02="サービス契約回線内訳番号" (KKW00810SFConst.java:289)] | Service contract line item breakdown number source key |
| `SVC_KEI_KAISEN_UCWK_NO` | `"サービス契約回線内訳番号"` [-> SVC_KEI_KAISEN_UCWK_NO="サービス契約回線内訳番号" (KKW00810SFConst.java:79)] | Service contract line item breakdown number target key |
| `SVC_KEI_UCWK_NO_02` | `"サービス契約内訳番号"` [-> SVC_KEI_UCWK_NO_02="サービス契約内訳番号" (KKW00810SFConst.java:279)] | Service contract internal number source key |
| `SVC_KEI_UCWK_NO` | `"サービス契約内訳番号"` [-> SVC_KEI_UCWK_NO="サービス契約内訳番号" (KKW00810SFConst.java:219)] | Service contract internal number target key |
| `KK0161_GENE_ADD_DTM_02` | `"KK0161世代登録年月日时分秒"` [-> KK0161_GENE_ADD_DTM_02="KK0161世代登録年月日时分秒" (KKW00810SFConst.java:284)] | KK0161 generation registration datetime source key |
| `KK0161_GENE_ADD_DTM` | `"KK0161世代登録年月日时分秒"` [-> KK0161_GENE_ADD_DTM="KK0161世代登録年月日时分秒" (KKW00810SFConst.java:224)] | KK0161 generation registration datetime target key |
| `SVC_KEI_UCWK_STAT_02` | `"サービス契約内訳ステータス"` [-> SVC_KEI_UCWK_STAT_02="サービス契約内訳ステータス" (KKW00810SFConst.java:309)] | Service contract internal status source key |
| `SVC_KEI_UCWK_STAT` | `"サービス契約内訳ステータス"` [-> SVC_KEI_UCWK_STAT="サービス契約内訳ステータス" (KKW00810SFConst.java:229)] | Service contract internal status target key |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcFormBean` | `X31SDataBeanAccess` | The target form data access object for the Fixed IP Add-ON screen. It carries the complete form model that will be rendered to the user. It contains both the source data (ip address details list) and the destination fields where synchronized values are written. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `unyo_ymd` | `String` | Usage start date (利用開始日) as a compact YYYYMMDD string stored on the instance. This is parsed into year, month, and day components to be set individually on the form bean. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `X31SDataBeanAccess.getDataBeanArray` | X31SDataBeanAccess | - | Reads the IP address details list from svcFormBean by key |
| - | `X31SDataBeanAccess.getDataBean` | X31SDataBeanAccess | - | Gets the first element (index 0) of the IP address list as a data bean |
| - | `X31SDataBeanAccess.sendMessageString` (source) | X31SDataBeanAccess | - | Reads Fixed IP address value from the source ipAddressBean |
| - | `X31SDataBeanAccess.sendMessageString` (source) | X31SDataBeanAccess | - | Reads net mask value from the source ipAddressBean |
| - | `String.substring` | JDK | - | Parses the usage start date (unyo_ymd) into year, month, day components |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes Fixed IP address to svcFormBean |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes subnet mask to svcFormBean |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes usage start date year to svcFormBean |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes usage start date month to svcFormBean |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes usage start date day to svcFormBean |
| - | `X31SDataBeanAccess.sendMessageString` (source) | X31SDataBeanAccess | - | Reads service contract line item breakdown number from source |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes service contract line item breakdown number to target |
| - | `X31SDataBeanAccess.sendMessageString` (source) | X31SDataBeanAccess | - | Reads service contract internal number from source |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes service contract internal number to target |
| - | `X31SDataBeanAccess.sendMessageString` (source) | X31SDataBeanAccess | - | Reads KK0161 generation registration datetime from source |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes KK0161 generation registration datetime to target |
| - | `X31SDataBeanAccess.sendMessageString` (source) | X31SDataBeanAccess | - | Reads service contract internal status from source |
| - | `X31SDataBeanAccess.sendMessageString` (target) | X31SDataBeanAccess | - | Writes service contract internal status to target |

**Analysis:** This method performs **no database or SC/CBS calls**. It operates purely as an in-memory data mapper, moving string values between two `X31SDataBeanAccess` objects. All operations are read (R) or write (W) against the bean data structures, not against persistent storage.

## 5. Dependency Trace

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write), `sendMessageString` (read), `sendMessageString` (write).

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `KKW00810SFLogic.actionInitKKW00810` | `actionInitKKW00810()` -> `editServiceFormBean(svcFormBean)` | `sendMessageString [R/W] X31SDataBeanAccess (in-memory bean transfer)` |

**Notes:** This method is a private helper called during screen initialization. It does not produce its own terminal persistence operations — it only manipulates the bean data model. The actual screen entry point that calls `actionInitKKW00810()` is determined by the screen navigation framework and the KKW00810SF screen module.

## 6. Per-Branch Detail Blocks

This method contains **no conditional branches** (no if/else, switch, or loops). It is a flat sequential block. The entire method body is documented below as a single processing block.

**Block 1** — [SEQUENCE] (L262)

> Extract the Fixed IP address details list from the source form bean, then retrieve the first element as a child data bean for IP address field access.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `X31SDataBeanAccess ipAddressBean = svcFormBean.getDataBeanArray(KKW00810SFConst.FIXIPAD_HRADSI_LIST).getDataBean(0);` // Extract Fixed IP address output result details list and get first element [-> FIXIPAD_HRADSI_LIST="固定IPアウドラス出力結果明細" (KKW00810SFConst.java:194)] |

**Block 2** — [SEQUENCE] (L265-267)

> Read the Fixed IP address and net mask values from the source ipAddressBean.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `String ipAddress = ipAddressBean.sendMessageString(KKW00810SFConst.FIXIPAD_02, X31CWebConst.DATABEAN_GET_VALUE);` // Get Fixed IP address [-> FIXIPAD_02 (KKW00810SFConst.java)] |
| 2 | EXEC | `String netMask = ipAddressBean.sendMessageString(KKW00810SFConst.NETMASK_02, X31CWebConst.DATABEAN_GET_VALUE);` // Get net mask [-> NETMASK_02="ネットマスク" (KKW00810SFConst.java:269)] |

**Block 3** — [SEQUENCE] (L270-276)

> Parse the instance field `unyo_ymd` (usage start date in YYYYMMDD format) into year, month, and day string components using `String.substring`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String use_staymd_year = unyo_ymd.substring(0, 4);` // Usage start date (year) [利用開始日（年）] |
| 2 | SET | `String use_staymd_mon = unyo_ymd.substring(4, 6);` // Usage start date (month) [利用開始日（月）] |
| 3 | SET | `String use_staymd_day = unyo_ymd.substring(6, 8);` // Usage start date (day) [利用開始日（日）] |

**Block 4** — [SEQUENCE] (L279-281)

> Write the extracted Fixed IP address and subnet mask values to the target svcFormBean.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.KOTEI_IP_AD, X31CWebConst.DATABEAN_SET_VALUE, ipAddress);` // Set Fixed IP address [-> KOTEI_IP_AD="固定IPアウドラス" (KKW00810SFConst.java:34)] |
| 2 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.SUBNET_MASK, X31CWebConst.DATABEAN_SET_VALUE, netMask);` // Set subnet mask [-> SUBNET_MASK="サブネットマスク" (KKW00810SFConst.java:39)] |

**Block 5** — [SEQUENCE] (L284-286)

> Write the parsed usage start date components (year, month, day) to the target svcFormBean.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.USE_STAYMD_YEAR, X31CWebConst.DATABEAN_SET_VALUE, use_staymd_year);` // Set usage start date year [-> USE_STAYMD_YEAR="利用開始日（年）" (KKW00810SFConst.java:44)] |
| 2 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.USE_STAYMD_MON, X31CWebConst.DATABEAN_SET_VALUE, use_staymd_mon);` // Set usage start date month [-> USE_STAYMD_MON="利用開始日（月）" (KKW00810SFConst.java:49)] |
| 3 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.USE_STAYMD_DAY, X31CWebConst.DATABEAN_SET_VALUE, use_staymd_day);` // Set usage start date day [-> USE_STAYMD_DAY="利用開始日（日）" (KKW00810SFConst.java:54)] |

**Block 6** — [SEQUENCE] (L289-291)

> Read the service contract line item breakdown number from the source ipAddressBean and write it to the target svcFormBean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String svc_kei_kaisen_ucwk_no = ipAddressBean.sendMessageString(KKW00810SFConst.SVC_KEI_KAISEN_UCWK_NO_02, X31CWebConst.DATABEAN_GET_VALUE);` // Read service contract line item breakdown number [-> SVC_KEI_KAISEN_UCWK_NO_02="サービス契約回線内訳番号" (KKW00810SFConst.java:289)] |
| 2 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.SVC_KEI_KAISEN_UCWK_NO, X31CWebConst.DATABEAN_SET_VALUE, svc_kei_kaisen_ucwk_no);` // Write service contract line item breakdown number [-> SVC_KEI_KAISEN_UCWK_NO="サービス契約回線内訳番号" (KKW00810SFConst.java:79)] |

**Block 7** — [SEQUENCE] (L294-296)

> Read the service contract internal number from the source ipAddressBean and write it to the target svcFormBean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String svc_kei_ucwk_no = ipAddressBean.sendMessageString(KKW00810SFConst.SVC_KEI_UCWK_NO_02, X31CWebConst.DATABEAN_GET_VALUE);` // Read service contract internal number [-> SVC_KEI_UCWK_NO_02="サービス契約内訳番号" (KKW00810SFConst.java:279)] |
| 2 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.SVC_KEI_UCWK_NO, X31CWebConst.DATABEAN_SET_VALUE, svc_kei_ucwk_no);` // Write service contract internal number [-> SVC_KEI_UCWK_NO="サービス契約内訳番号" (KKW00810SFConst.java:219)] |

**Block 8** — [SEQUENCE] (L299-301)

> Read the KK0161 generation registration datetime from the source ipAddressBean and write it to the target svcFormBean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String kk0161_gene_add_dtm = ipAddressBean.sendMessageString(KKW00810SFConst.KK0161_GENE_ADD_DTM_02, X31CWebConst.DATABEAN_GET_VALUE);` // Read KK0161 generation registration datetime [-> KK0161_GENE_ADD_DTM_02="KK0161世代登録年月日时分秒" (KKW00810SFConst.java:284)] |
| 2 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.KK0161_GENE_ADD_DTM, X31CWebConst.DATABEAN_SET_VALUE, kk0161_gene_add_dtm);` // Write KK0161 generation registration datetime [-> KK0161_GENE_ADD_DTM="KK0161世代登録年月日时分秒" (KKW00810SFConst.java:224)] |

**Block 9** — [SEQUENCE] (L303-305)

> Read the service contract internal status from the source ipAddressBean and write it to the target svcFormBean. This block was added under change request TG1-2013-0000421 on 2013/05/30.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String svc_kei_ucwk_stat = ipAddressBean.sendMessageString(KKW00810SFConst.SVC_KEI_UCWK_STAT_02, X31CWebConst.DATABEAN_GET_VALUE);` // Read service contract internal status [-> SVC_KEI_UCWK_STAT_02="サービス契約内訳ステータス" (KKW00810SFConst.java:309)] |
| 2 | EXEC | `svcFormBean.sendMessageString(KKW00810SFConst.SVC_KEI_UCWK_STAT, X31CWebConst.DATABEAN_SET_VALUE, svc_kei_ucwk_stat);` // Write service contract internal status [-> SVC_KEI_UCWK_STAT="サービス契約内訳ステータス" (KKW00810SFConst.java:229)] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ipAddressBean` | Field | IP address details data bean — child bean holding Fixed IP address configuration details extracted from the main form bean |
| `unyo_ymd` | Field | Usage start date (利用開始日) — a date field stored in compact YYYYMMDD string format on the instance, representing when the service begins |
| `FIXIPAD_HRADSI_LIST` | Constant | Fixed IP address output result details — the key used to retrieve the IP address details list from the form bean |
| `KOTEI_IP_AD` | Field | Fixed IP address (固定IPアウドラス) — the static IP address assigned to the service |
| `SUBNET_MASK` | Field | Subnet mask (サブネットマスク) — the network subnet mask for the Fixed IP address |
| `USE_STAYMD_YEAR` | Field | Usage start date year (利用開始日（年）) — the year component of the service start date |
| `USE_STAYMD_MON` | Field | Usage start date month (利用開始日（月）) — the month component of the service start date |
| `USE_STAYMD_DAY` | Field | Usage start date day (利用開始日（日）) — the day component of the service start date |
| `SVC_KEI_KAISEN_UCWK_NO` | Field | Service contract line item breakdown number (サービス契約回線内訳番号) — internal tracking number for a specific line item within a service contract |
| `SVC_KEI_UCWK_NO` | Field | Service contract internal number (サービス契約内訳番号) — internal identification number for a service contract line item |
| `KK0161_GENE_ADD_DTM` | Field | KK0161 generation registration datetime (KK0161世代登録年月日时分秒) — timestamp of when the KK0161 service generation was registered |
| `SVC_KEI_UCWK_STAT` | Field | Service contract internal status (サービス契約内訳ステータス) — current status of the service contract line item (added via change TG1-2013-0000421) |
| `X31SDataBeanAccess` | Class | Service data bean access — the data transfer object used to carry form data between screen layers in the web presentation framework |
| `actionInitKKW00810` | Method | Screen initialization action — the entry point that calls `editServiceFormBean` to prepare the form data model before the Fixed IP Add-ON screen is rendered |
| `TG1-2013-0000421` | Change request | Internal change tracking ID — the ticket/issue number under which the service contract internal status field was added to this method on 2013/05/30 |
| `X31CWebConst.DATABEAN_GET_VALUE` | Constant | Data bean get value operation code — indicates a read operation on a data bean field |
| `X31CWebConst.DATABEAN_SET_VALUE` | Constant | Data bean set value operation code — indicates a write operation on a data bean field |
| Fixed IP Add-ON | Business term | A service add-on module that assigns a static IP address and subnet mask to a telecom service line item |
