# Business Logic — KKW00846SF03DBean.storeModelData() [101 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKA18001SF.KKW00846SF03DBean` |
| Layer | View / Data Binding Bean (webview layer — Model-View data synchronization) |
| Module | `KKA18001SF` (Package: `eo.web.webview.KKA18001SF`) |

## 1. Role

### KKW00846SF03DBean.storeModelData()

This method is a generic model-data setter that serves as the centralized data-binding mechanism for the web view layer. It enables the UI screen to push arbitrary field values into the bean instance by matching a human-readable Japanese field label (`key`) against a predefined set of option service and date-related fields. It implements a **key-to-field routing pattern** — the method dispatches incoming `(key, subkey, in_value)` tuples to the appropriate typed setter method based on the business field identified by `key`. There are 9 supported field categories: option service contract number, contract status, service code, service code name, service start desired date, reservation apply date, service start date, service charge start date, and first payment calculation date. For each field, the method further dispatches by `subkey` — `"value"` routes to a `*value` setter and `"state"` routes to a `*state` setter. The `isSetAsString` flag is accepted for interface compatibility (Long-type item value property string-value configuration) but is not consumed within the body of this method. This pattern is a standard JSP bean model-binding approach in the enterprise architecture, mirroring the parent class `X31CBaseBean.storeModelData` contract while providing domain-specific field routing for the option service configuration screen.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["storeModelData"])
    CHECK_NULL["key or subkey is null"]
    EARLY_EXIT(["Return"])
    SEP_CHECK["separaterPoint = key.indexOf('/')"]
    BRANCH1{"key equals<br/>Option Service Contract No."}
    SUBKEY_S1{"subkey equals<br/>value"}
    SET1["setOp_svc_kei_no_value"]
    SET2["setOp_svc_kei_no_state"]
    BRANCH2{"key equals<br/>Option Service Contract Status"}
    SUBKEY_S2{"subkey equals<br/>value"}
    SET3["setOp_svc_kei_stat_value"]
    SET4["setOp_svc_kei_stat_state"]
    BRANCH3{"key equals<br/>Option Service Code"}
    SUBKEY_S3{"subkey equals<br/>value"}
    SET5["setOp_svc_cd_value"]
    SET6["setOp_svc_cd_state"]
    BRANCH4{"key equals<br/>Option Service Code Name"}
    SUBKEY_S4{"subkey equals<br/>value"}
    SET7["setOp_svc_cd_nm_value"]
    SET8["setOp_svc_cd_nm_state"]
    BRANCH5{"key equals<br/>Service Start Desired Date"}
    SUBKEY_S5{"subkey equals<br/>value"}
    SET9["setSvc_use_sta_kibo_ymd_value"]
    SET10["setSvc_use_sta_kibo_ymd_state"]
    BRANCH6{"key equals<br/>Reservation Apply Date"}
    SUBKEY_S6{"subkey equals<br/>value"}
    SET11["setRsv_aply_ymd_value"]
    SET12["setRsv_aply_ymd_state"]
    BRANCH7{"key equals<br/>Service Start Date"}
    SUBKEY_S7{"subkey equals<br/>value"}
    SET13["setSvc_sta_ymd_value"]
    SET14["setSvc_sta_ymd_state"]
    BRANCH8{"key equals<br/>Service Charge Start Date"}
    SUBKEY_S8{"subkey equals<br/>value"}
    SET15["setSvc_chrg_staymd_value"]
    SET16["setSvc_chrg_staymd_state"]
    BRANCH9{"key equals<br/>First Payment Calculation Date"}
    SUBKEY_S9{"subkey equals<br/>value"}
    SET17["setFirst_prc_calc_ymd_value"]
    SET18["setFirst_prc_calc_ymd_state"]
    END_NODE(["Return / Next"])

    START --> CHECK_NULL
    CHECK_NULL -- true --> EARLY_EXIT
    CHECK_NULL -- false --> BRANCH1
    BRANCH1 -- true --> SUBKEY_S1
    SUBKEY_S1 -- true --> SET1
    SUBKEY_S1 -- false --> SET2
    SET1 --> BRANCH2
    SET2 --> BRANCH2
    BRANCH2 -- true --> SUBKEY_S2
    SUBKEY_S2 -- true --> SET3
    SUBKEY_S2 -- false --> SET4
    SET3 --> BRANCH3
    SET4 --> BRANCH3
    BRANCH3 -- true --> SUBKEY_S3
    SUBKEY_S3 -- true --> SET5
    SUBKEY_S3 -- false --> SET6
    SET5 --> BRANCH4
    SET6 --> BRANCH4
    BRANCH4 -- true --> SUBKEY_S4
    SUBKEY_S4 -- true --> SET7
    SUBKEY_S4 -- false --> SET8
    SET7 --> BRANCH5
    SET8 --> BRANCH5
    BRANCH5 -- true --> SUBKEY_S5
    SUBKEY_S5 -- true --> SET9
    SUBKEY_S5 -- false --> SET10
    SET9 --> BRANCH6
    SET10 --> BRANCH6
    BRANCH6 -- true --> SUBKEY_S6
    SUBKEY_S6 -- true --> SET11
    SUBKEY_S6 -- false --> SET12
    SET11 --> BRANCH7
    SET12 --> BRANCH7
    BRANCH7 -- true --> SUBKEY_S7
    SUBKEY_S7 -- true --> SET13
    SUBKEY_S7 -- false --> SET14
    SET13 --> BRANCH8
    SET14 --> BRANCH8
    BRANCH8 -- true --> SUBKEY_S8
    SUBKEY_S8 -- true --> SET15
    SUBKEY_S8 -- false --> SET16
    SET15 --> BRANCH9
    SET16 --> BRANCH9
    BRANCH9 -- true --> SUBKEY_S9
    SUBKEY_S9 -- true --> SET17
    SUBKEY_S9 -- false --> SET18
    SET17 --> END_NODE
    SET18 --> END_NODE
    BRANCH2 -- false --> BRANCH3
    BRANCH3 -- false --> BRANCH4
    BRANCH4 -- false --> BRANCH5
    BRANCH5 -- false --> BRANCH6
    BRANCH6 -- false --> BRANCH7
    BRANCH7 -- false --> BRANCH8
    BRANCH8 -- false --> BRANCH9
    BRANCH9 -- false --> END_NODE
```

**CRITICAL — Constant Resolution:**

No external constant files are referenced in this method. All field labels are hard-coded as Japanese string literals (e.g., `"オプションサービス契約番号"`). The dispatch uses direct `String.equals()` comparisons against these literals.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `key` | `String` | Japanese field label identifying which business field to update. Values include: `"オプションサービス契約番号"` (Option Service Contract Number), `"オプションサービス契約ステータス"` (Option Service Contract Status), `"オプションサービスコード"` (Option Service Code), `"オプションサービスコード名称"` (Option Service Code Name), `"サービス利用開始希望年月日"` (Service Start Desired Date), `"予約適用年月日"` (Reservation Apply Date), `"サービス開始年月日"` (Service Start Date), `"サービス課金開始年月日"` (Service Charge Start Date), `"初回料金計算日"` (First Payment Calculation Date). Determines which setter branch is taken. |
| 2 | `subkey` | `String` | Property accessor type — either `"value"` (to set the field's data value) or `"state"` (to set the field's metadata/state). Case-insensitive comparison (`equalsIgnoreCase`). Determines whether `*value` or `*state` setter is invoked for the matched field. |
| 3 | `in_value` | `Object` | The data payload to store into the matched field. Cast to `String` before passing to the setter. Carries the actual business data (e.g., contract number string, status flag, date string in YYYYMMDD format). |
| 4 | `isSetAsString` | `boolean` | Flag indicating whether to set a Long-type item's Value property as a String value. In this method, the flag is accepted for interface compatibility but is not consumed — all setters receive `String`-typed values regardless. |

**Instance fields read by the method:** None directly — all operations are outgoing setter calls on the bean's own fields.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `KKW00846SF03DBean.setOp_svc_kei_no_value` | KKW00846SF03DBean | - | Sets option service contract number value field |
| U | `KKW00846SF03DBean.setOp_svc_kei_no_state` | KKW00846SF03DBean | - | Sets option service contract number state metadata field |
| U | `KKW00846SF03DBean.setOp_svc_kei_stat_value` | KKW00846SF03DBean | - | Sets option service contract status value field |
| U | `KKW00846SF03DBean.setOp_svc_kei_stat_state` | KKW00846SF03DBean | - | Sets option service contract status state metadata field |
| U | `KKW00846SF03DBean.setOp_svc_cd_value` | KKW00846SF03DBean | - | Sets option service code value field |
| U | `KKW00846SF03DBean.setOp_svc_cd_state` | KKW00846SF03DBean | - | Sets option service code state metadata field |
| U | `KKW00846SF03DBean.setOp_svc_cd_nm_value` | KKW00846SF03DBean | - | Sets option service code name value field |
| U | `KKW00846SF03DBean.setOp_svc_cd_nm_state` | KKW00846SF03DBean | - | Sets option service code name state metadata field |
| U | `KKW00846SF03DBean.setSvc_use_sta_kibo_ymd_value` | KKW00846SF03DBean | - | Sets service start desired date value field |
| U | `KKW00846SF03DBean.setSvc_use_sta_kibo_ymd_state` | KKW00846SF03DBean | - | Sets service start desired date state metadata field |
| U | `KKW00846SF03DBean.setRsv_aply_ymd_value` | KKW00846SF03DBean | - | Sets reservation apply date value field |
| U | `KKW00846SF03DBean.setRsv_aply_ymd_state` | KKW00846SF03DBean | - | Sets reservation apply date state metadata field |
| U | `KKW00846SF03DBean.setSvc_sta_ymd_value` | KKW00846SF03DBean | - | Sets service start date value field |
| U | `KKW00846SF03DBean.setSvc_sta_ymd_state` | KKW00846SF03DBean | - | Sets service start date state metadata field |
| U | `KKW00846SF03DBean.setSvc_chrg_staymd_value` | KKW00846SF03DBean | - | Sets service charge start date value field |
| U | `KKW00846SF03DBean.setSvc_chrg_staymd_state` | KKW00846SF03DBean | - | Sets service charge start date state metadata field |
| U | `KKW00846SF03DBean.setFirst_prc_calc_ymd_value` | KKW00846SF03DBean | - | Sets first payment calculation date value field |
| U | `KKW00846SF03DBean.setFirst_prc_calc_ymd_state` | KKW00846SF03DBean | - | Sets first payment calculation date state metadata field |

**CRUD Classification:** All 18 operations are **U** (Update) — this method exclusively writes to local bean fields via setter invocations. No database reads, creates, or deletes occur. No SC/CBS service components or Entity/DB tables are accessed directly.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods (overloaded variants within the same class).

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `KKW00846SF03DBean.storeModelData(String gamenId, String key, String subkey, Object in_value)` | Same-class overload: passes `key, subkey, in_value` | 18 setter calls [-] |
| 2 | Method: `KKW00846SF03DBean.storeModelData(String key, String subkey, Object in_value)` | Same-class overload: delegates to `storeModelData(key, subkey, in_value, false)` | 18 setter calls [-] |

**Terminal operations** from this method: `setFirst_prc_calc_ymd_state`, `setFirst_prc_calc_ymd_value`, `setSvc_chrg_staymd_state`, `setSvc_chrg_staymd_value`, `setSvc_sta_ymd_state`, `setSvc_sta_ymd_value`, `setRsv_aply_ymd_state`, `setRsv_aply_ymd_value`, `setSvc_use_sta_kibo_ymd_state`, `setSvc_use_sta_kibo_ymd_value`, `setOp_svc_cd_nm_state`, `setOp_svc_cd_nm_value`, `setOp_svc_cd_state`, `setOp_svc_cd_value`, `setOp_svc_kei_stat_state`, `setOp_svc_kei_stat_value`, `setOp_svc_kei_no_state`, `setOp_svc_kei_no_value`.

**Notes:** This method is called indirectly by many other beans in the broader system (e.g., `FUW00912SFBean`, `FUW00926SFBean`, `FUW00959SF01DBean` etc.) which invoke `storeModelData` on list items for dynamic data-type beans. The primary callers within KKW00846SF03DBean itself are overloaded variants that provide convenience signatures.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF] `(key == null || subkey == null)` (L450)

> Early exit guard: if either key or subkey is null, processing stops immediately. This prevents NPE on subsequent `key.equals()` calls.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `key.indexOf("/")` — checks for separator character in key (L453, result stored but unused in method body) |
| 2 | RETURN | `return;` — early exit on null key or subkey |

**Block 2** — [ELSE-IF] `(key.equals("オプションサービス契約番号"))` — Option Service Contract Number (Item ID: op_svc_kei_no) (L457)

> Routes to option service contract number field setters. Japanese literal `"オプションサービス契約番号"` means "Option Service Contract Number".

**Block 2.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L458)

> Sets the data value for option service contract number.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_kei_no_value((String)in_value)` — casts in_value to String and sets contract number |

**Block 2.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L461)

> Japanese comment: `"subkeyが'state'の場合、ステータスを返す。"` — English: "When subkey is 'state', returns/sets the status."

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_kei_no_state((String)in_value)` — casts in_value to String and sets contract number state |

**Block 3** — [ELSE-IF] `(key.equals("オプションサービス契約ステータス"))` — Option Service Contract Status (Item ID: op_svc_kei_stat) (L468)

> Routes to option service contract status field setters. Japanese literal `"オプションサービス契約ステータス"` means "Option Service Contract Status".

**Block 3.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L469)

> Sets the data value for option service contract status.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_kei_stat_value((String)in_value)` — casts in_value to String and sets contract status |

**Block 3.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L472)

> Sets the state metadata for option service contract status.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_kei_stat_state((String)in_value)` — casts in_value to String and sets contract status state |

**Block 4** — [ELSE-IF] `(key.equals("オプションサービスコード"))` — Option Service Code (Item ID: op_svc_cd) (L479)

> Routes to option service code field setters. Japanese literal `"オプションサービスコード"` means "Option Service Code".

**Block 4.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L480)

> Sets the data value for option service code.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_cd_value((String)in_value)` — casts in_value to String and sets service code |

**Block 4.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L483)

> Sets the state metadata for option service code.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_cd_state((String)in_value)` — casts in_value to String and sets service code state |

**Block 5** — [ELSE-IF] `(key.equals("オプションサービスコード名称"))` — Option Service Code Name (Item ID: op_svc_cd_nm) (L490)

> Routes to option service code name field setters. Japanese literal `"オプションサービスコード名称"` means "Option Service Code Name".

**Block 5.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L491)

> Sets the data value for option service code name.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_cd_nm_value((String)in_value)` — casts in_value to String and sets service code name |

**Block 5.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L494)

> Sets the state metadata for option service code name.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setOp_svc_cd_nm_state((String)in_value)` — casts in_value to String and sets service code name state |

**Block 6** — [ELSE-IF] `(key.equals("サービス利用開始希望年月日"))` — Service Start Desired Date (Item ID: svc_use_sta_kibo_ymd) (L501)

> Routes to service start desired date field setters. Japanese literal `"サービス利用開始希望年月日"` means "Desired Service Start Year-Month-Day".

**Block 6.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L502)

> Sets the data value for service start desired date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSvc_use_sta_kibo_ymd_value((String)in_value)` — casts in_value to String and sets service start desired date |

**Block 6.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L505)

> Sets the state metadata for service start desired date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSvc_use_sta_kibo_ymd_state((String)in_value)` — casts in_value to String and sets service start desired date state |

**Block 7** — [ELSE-IF] `(key.equals("予約適用年月日"))` — Reservation Apply Date (Item ID: rsv_aply_ymd) (L512)

> Routes to reservation apply date field setters. Japanese literal `"予約適用年月日"` means "Reservation Apply Year-Month-Day".

**Block 7.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L513)

> Sets the data value for reservation apply date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setRsv_aply_ymd_value((String)in_value)` — casts in_value to String and sets reservation apply date |

**Block 7.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L516)

> Sets the state metadata for reservation apply date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setRsv_aply_ymd_state((String)in_value)` — casts in_value to String and sets reservation apply date state |

**Block 8** — [ELSE-IF] `(key.equals("サービス開始年月日"))` — Service Start Date (Item ID: svc_sta_ymd) (L523)

> Routes to service start date field setters. Japanese literal `"サービス開始年月日"` means "Service Start Year-Month-Day".

**Block 8.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L524)

> Sets the data value for service start date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSvc_sta_ymd_value((String)in_value)` — casts in_value to String and sets service start date |

**Block 8.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L527)

> Sets the state metadata for service start date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSvc_sta_ymd_state((String)in_value)` — casts in_value to String and sets service start date state |

**Block 9** — [ELSE-IF] `(key.equals("サービス課金開始年月日"))` — Service Charge Start Date (Item ID: svc_chrg_staymd) (L534)

> Routes to service charge start date field setters. Japanese literal `"サービス課金開始年月日"` means "Service Charge Start Year-Month-Day".

**Block 9.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L535)

> Sets the data value for service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSvc_chrg_staymd_value((String)in_value)` — casts in_value to String and sets service charge start date |

**Block 9.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L538)

> Sets the state metadata for service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSvc_chrg_staymd_state((String)in_value)` — casts in_value to String and sets service charge start date state |

**Block 10** — [ELSE-IF] `(key.equals("初回料金計算日"))` — First Payment Calculation Date (Item ID: first_prc_calc_ymd) (L545)

> Routes to first payment calculation date field setters. Japanese literal `"初回料金計算日"` means "First Payment Calculation Date".

**Block 10.1** — [IF] `(subkey.equalsIgnoreCase("value"))` (L546)

> Sets the data value for first payment calculation date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setFirst_prc_calc_ymd_value((String)in_value)` — casts in_value to String and sets first payment calculation date |

**Block 10.2** — [ELSE-IF] `(subkey.equalsIgnoreCase("state"))` (L549)

> Sets the state metadata for first payment calculation date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setFirst_prc_calc_ymd_state((String)in_value)` — casts in_value to String and sets first payment calculation date state |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `op_svc_kei_no` | Field | Option Service Contract Number — internal identifier for an optional service line item within a main service contract |
| `op_svc_kei_stat` | Field | Option Service Contract Status — current lifecycle status of the option service contract (e.g., active, cancelled) |
| `op_svc_cd` | Field | Option Service Code — short code identifying a specific optional service type |
| `op_svc_cd_nm` | Field | Option Service Code Name — human-readable name of the optional service code |
| `svc_use_sta_kibo_ymd` | Field | Service Start Desired Date — the customer's requested date for when the service should begin (YYYYMMDD format) |
| `rsv_aply_ymd` | Field | Reservation Apply Date — the date on which a reservation was applied/processed (YYYYMMDD format) |
| `svc_sta_ymd` | Field | Service Start Date — the actual date when the service was started (YYYYMMDD format) |
| `svc_chrg_staymd` | Field | Service Charge Start Date — the date when billing/charging for the service begins (YYYYMMDD format) |
| `first_prc_calc_ymd` | Field | First Payment Calculation Date — the date when the initial payment amount is calculated (YYYYMMDD format) |
| `key` | Field | Item Name — Japanese-language field label used as the dispatch key for model binding |
| `subkey` | Field | Subkey — property accessor indicating whether to set "value" (data) or "state" (metadata) |
| `in_value` | Field | Input Data — the actual data payload to be stored, cast to String |
| `isSetAsString` | Field | Boolean flag for Long-type item property string-value setting (accepted but unused in this method) |
| X31CBaseBean | Class | Parent base bean class that defines the `storeModelData` contract for JSP model binding |
| KKW00846SF03DBean | Class | Data bean for screen KKW00846SF03 — option service configuration screen data holder |
| KKA18001SF | Module | Service module — KKA18001SF handles option service related processing |
| model binding | Pattern | JSP-to-Bean data synchronization — JSP views push model data into beans via `storeModelData` and read back via `getModelData` |
| state | Concept | Metadata flag tracking the state of a field (e.g., whether it has been modified, its current lifecycle state) |
| value | Concept | The actual business data value stored in a field |
