# Business Logic — ZMW01904SFLogic.creanBean() [61 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.ZMW01904SF.ZMW01904SFLogic` |
| Layer | Controller (Web View Logic — front-tier screen data preparation) |
| Module | `ZMW01904SF` (Package: `eo.web.webview.ZMW01904SF`) |

## 1. Role

### ZMW01904SFLogic.creanBean()

This method performs the bean initialization routine for the ZMW01904SF screen, which is a telecommunications number portability / service switching (NPS: Number Portability Service) screen. Its Javadoc states "bean project initialization processing" (bean project initialization processing — bean itemo shoki kaishori). Specifically, it resets the screen's data model (`X31SDataBeanAccess`) to a clean state so that stale data from a previous screen operation or a page-back scenario does not leak into the current display. It clears all display fields, all list/array data beans, and resets control values such as the registration confirm button's disable flag. The method uses a batch-reset design pattern — it is not conditional; it executes every call path unconditionally, always performing the same sequence of null-clears and list-cleans. It is called by `ZMW01904SFLogic.fin()`, the screen's entry point, confirming its role as a shared initialization shim that prepares the view model before the screen renders.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["creanBean(bean, viewLogic)"])
    START --> CLEAR_PAGE["Clear Page Link Info<br/>JZMWebCommon.clearPageLinkInfo"]
    CLEAR_PAGE --> SET_GROUP1["Set Null to Bean Fields Group 1<br/>TelNo, KojinHojin, BngShutk, Itnmt, Sinsei, Kirikaeshori, CngbfItnsk"]
    SET_GROUP1 --> SET_PULLDOWN["Set PullDown Index<br/>CNGAF_ITNSK_JGS_CD_INFO"]
    SET_PULLDOWN --> SET_GROUP2["Set Null to Bean Fields Group 2<br/>DSP_CNGAF_ITNSK_JGS_CD, DSP_CNGAF_ITNSK_DOMAIN"]
    SET_GROUP2 --> CLEAR_LIST1["Clear EZM0541B010CBSMSG1LIST<br/>ENUM Switch History Detail"]
    CLEAR_LIST1 --> REMOVE_LOOP1{"For i=0 to dataList2.getCount()-1"}
    REMOVE_LOOP1 --> REMOVE1["dataList2.removeDataBean(i)"]
    REMOVE1 --> INC1["i++"]
    INC1 --> CHECK1{"i < dataList2.getCount()"}
    CHECK1 -->|true| REMOVE_LOOP1
    CHECK1 -->|false| SET_DSBL["Set Null DSBL_CTL_HTML_BTN_ADD_CFM<br/>Registration Confirm Button Disable Control"]
    SET_DSBL --> CLEAR_LIST2["Clear EZM0121A010CBSMSG1LIST<br/>Phone Number Consent Detail"]
    CLEAR_LIST2 --> REMOVE_LOOP2{"For i=0 to dataList3.getCount()-1"}
    REMOVE_LOOP2 --> REMOVE2["dataList3.removeDataBean(i)"]
    REMOVE2 --> INC2["i++"]
    INC2 --> CHECK2{"i < dataList3.getCount()"}
    CHECK2 -->|true| REMOVE_LOOP2
    CHECK2 -->|false| SET_JISHA["Set Null JISHA_JGS_CD, JISHA_JGS_CD_NM<br/>Company Provider Code/Name"]
    SET_JISHA --> CLEAR_LIST3["Clear ETU0151B040CBSMSG1LIST<br/>Port-Out Receipt List Detail"]
    CLEAR_LIST3 --> REMOVE_LOOP3{"For i=0 to dataList4.getCount()-1"}
    REMOVE_LOOP3 --> REMOVE3["dataList4.removeDataBean(i)"]
    REMOVE3 --> INC3["i++"]
    INC3 --> CHECK3{"i < dataList4.getCount()"}
    CHECK3 -->|true| REMOVE_LOOP3
    CHECK3 -->|false| CLEAR_LIST4["Clear EZM0111A010CBSMSG1LIST<br/>Engineering Consent Detail"]
    CLEAR_LIST4 --> REMOVE_LOOP4{"For i=0 to dataList5.getCount()-1"}
    REMOVE_LOOP4 --> REMOVE4["dataList5.removeDataBean(i)"]
    REMOVE_LOOP4 --> INC4["i++"]
    INC4 --> CHECK4{"i < dataList5.getCount()"}
    CHECK4 -->|true| REMOVE_LOOP4
    CHECK4 -->|false| SET_GROUP3["Set Null to Bean Fields Group 3<br/>Enumsod, Newtshin, Znkishin fields"]
    SET_GROUP3 --> END_NODE(["Return / Next"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `bean` | `X31SDataBeanAccess` | The screen's central data bean — a hierarchical key-value store holding all form fields, list data beans, and UI control values displayed on the ZMW01904SF number portability screen. All 30+ fields within this bean are reset to null/empty during initialization. |
| 2 | `viewLogic` | `JCCWebBusinessLogic` | The ViewLogic instance for the current screen request, passed to `clearPageLinkInfo` for page link management. Not directly mutated by `creanBean`; serves as the page-scoped business logic handle. |

**Instance fields read:** `this` (reference to `ZMW01904SFLogic` instance — used as the first argument to `JZMWebCommon.clearPageLinkInfo`).

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JZMWebCommon.clearPageLinkInfo` | JZMWebCommon | - | Clears page link information for screen ZMW01904 |
| R | `X31SDataBeanAccessArray.getCount` | - | - | Reads the count of items in a data bean array |
| - | `X31SDataBeanAccessArray.removeDataBean` | - | - | Removes a data bean item by index (in-memory list cleanup) |
| R | `X31SDataBeanAccess.getDataBeanArray` | - | - | Retrieves a nested data bean array from the parent bean by key |
| - | `JZMWebCommon.setNullToBeanClm` | JZMWebCommon | - | Sets a bean field to null (clears display fields) |
| - | `JZMWebCommon.setPullDownIndex` | JZMWebCommon | - | Sets the default selected index for a pull-down UI component |

**Note:** This method performs **zero database operations**. It is a pure front-end data bean reset — it clears in-memory fields and list structures. No SC (Service Component) or CBS (CBS service) calls reach the persistence layer.

## 5. Dependency Trace

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

Direct callers: 1 method. No screen/batch entry points found within 8 hops.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `ZMW01904SFLogic.fin()` | `ZMW01904SFLogic.fin` -> `creanBean` | `setNullToBeanClm [-]`, `setPullDownIndex [-]`, `clearPageLinkInfo [-]`, `getCount [R]`, `getDataBeanArray [R]`, `removeDataBean [-]` |

`fin()` is the screen entry/initial load method of the ZMW01904SF module. It calls `creanBean` to ensure the data bean is clean before any subsequent initialization or data fetch proceeds. This method itself performs no terminal SC/CRUD operations — its terminal operations are all in-memory bean manipulations.

## 6. Per-Branch Detail Blocks

**Block 1** — [EXEC] (L1368)
Clear page link info to reset navigation state for this screen.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.clearPageLinkInfo(this, JZMScreenConst.SCREEN_ID_ZMW01904)` // Reset page navigation state for screen ZMW01904 |

**Block 2** — [EXEC batch] (L1370–L1381)
Clear display-side bean fields in groups. Each call to `setNullToBeanClm` nullifies a specific form field to prevent stale data leakage.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_TELNO)` // [-> DSP_TELNO="電話番号（表示用）"] Phone number (for display) |
| 2 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_KOJIN_HOJIN_TLN_TAI_CD)` // [-> DSP_KOJIN_HOJIN_TLN_TAI_CD="個人法人番号帯コード（表示用）"] Individual/legal entity number block code (for display) |
| 3 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.KOJIN_HOJIN_TLN_TAI_CD)` // [-> KOJIN_HOJIN_TLN_TAI_CD="個人法人番号帯コード"] Individual/legal entity number block code |
| 4 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_BNGSHUTK_JGS_CD)` // [-> DSP_BNGSHUTK_JGS_CD="番号取得事業者コード（表示用）"] Number acquisition provider code (for display) |
| 5 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.BNGSHUTK_JGS_CD)` // [-> BNGSHUTK_JGS_CD="番号取得事業者コード"] Number acquisition provider code |
| 6 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_ITNMT_JGS_CD)` // [-> DSP_ITNMT_JGS_CD="移転元事業者コード（表示用）"] Transfer-source provider code (for display) |
| 7 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.ITNMT_JGS_CD)` // [-> ITNMT_JGS_CD="移転元事業者コード"] Transfer-source provider code |
| 8 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_SINSEI_NAIYO)` // [-> DSP_SINSEI_NAIYO="申請内容（表示用）"] Application content (for display) |
| 9 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_KIRIKAESHORI)` // [-> DSP_KIRIKAESHORI="切替処理（表示用）"] Switching process (for display) |
| 10 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_CNGBF_ITNSK_JGS_CD)` // [-> DSP_CNGBF_ITNSK_JGS_CD="変更前・移転先事業者コード（表示用）"] Pre-change/post-transfer provider code (for display) |
| 11 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.CNGBF_ITNSK_JGS_CD)` // [-> CNGBF_ITNSK_JGS_CD="変更前・移転先事業者コード"] Pre-change/post-transfer provider code |
| 12 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_CNGBF_ITNSK_DOMAIN)` // [-> DSP_CNGBF_ITNSK_DOMAIN="変更前・移転先ドメイン（表示用）"] Pre-change/post-transfer domain (for display) |

**Block 3** — [EXEC] (L1383)
Set the default pull-down selection index for the post-change provider code selector.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.setPullDownIndex(bean, ZMW01904SFConst.CNGAF_ITNSK_JGS_CD_INFO, ZMW01904SFConst.CNGAF_ITNSK_JGS_CD_SEL_01, JZMWebConst.ZERO)` // [-> CNGAF_ITNSK_JGS_CD_SEL_01] [-> JZMWebConst.ZERO=0] Set pull-down default to first option |

**Block 4** — [EXEC batch] (L1385–L1386)
Clear additional post-change fields.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_CNGAF_ITNSK_JGS_CD)` // [-> DSP_CNGAF_ITNSK_JGS_CD="変更後・移転先事業者コード（表示用）"] Post-change provider code (for display) |
| 2 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSP_CNGAF_ITNSK_DOMAIN)` // [-> DSP_CNGAF_ITNSK_DOMAIN="変更後・移転先ドメイン（表示用）"] Post-change domain (for display) |

**Block 5** — [EXEC + LOOP] (L1388–L1391)
Clear the ENUM (ENUM) switching history detail list. This removes all previously cached ENUM switch history records from the data bean.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataList2 = bean.getDataBeanArray(ZMW01904SFConst.EZM0541B010CBSMSG1LIST)` // [-> EZM0541B010CBSMSG1LIST="ENUM切替履歴一覧照会明細"] Retrieve ENUM switching history list data bean |
| 2 | LOOP | `for (int i = 0; i < dataList2.getCount(); i++)` // Loop through all items in the list |
| 3 | EXEC | `dataList2.removeDataBean(i)` // Remove item at index i |

**Block 6** — [EXEC] (L1393)
Clear the registration confirm button disable control value.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.DSBL_CTL_HTML_BTN_ADD_CFM)` // [-> DSBL_CTL_HTML_BTN_ADD_CFM="登録確認ボタン非活性制御値"] Registration confirmation button disable control value |

**Block 7** — [EXEC + LOOP] (L1395–L1398)
Clear the phone number consent detail list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataList3 = bean.getDataBeanArray(ZMW01904SFConst.EZM0121A010CBSMSG1LIST)` // [-> EZM0121A010CBSMSG1LIST="電話番号一覧照会明細"] Retrieve phone number list data bean |
| 2 | LOOP | `for (int i = 0; i < dataList3.getCount(); i++)` // Loop through all items |
| 3 | EXEC | `dataList3.removeDataBean(i)` // Remove item at index i |

**Block 8** — [EXEC batch] (L1400–L1401)
Clear internal company provider fields.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.JISHA_JGS_CD)` // [-> JISHA_JGS_CD="自社事業者コード"] Company provider code |
| 2 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.JISHA_JGS_CD_NM)` // [-> JISHA_JGS_CD_NM="自社事業者コード名称"] Company provider code name |

**Block 9** — [EXEC + LOOP] (L1403–L1406)
Clear the port-out receipt list detail.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataList4 = bean.getDataBeanArray(ZMW01904SFConst.ETU0151B040CBSMSG1LIST)` // [-> ETU0151B040CBSMSG1LIST="ポートアウト受領情報一覧照会（電話番号）明細"] Port-out receipt list detail |
| 2 | LOOP | `for (int i = 0; i < dataList4.getCount(); i++)` // Loop through all items |
| 3 | EXEC | `dataList4.removeDataBean(i)` // Remove item at index i |

**Block 10** — [EXEC + LOOP] (L1408–L1411)
Clear the engineering consent detail list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataList5 = bean.getDataBeanArray(ZMW01904SFConst.EZM0111A010CBSMSG1LIST)` // [-> EZM0111A010CBSMSG1LIST="エンジニアリング同意照会明細"] Engineering consent detail list |
| 2 | LOOP | `for (int i = 0; i < dataList5.getCount(); i++)` // Loop through all items |
| 3 | EXEC | `dataList5.removeDataBean(i)` // Remove item at index i |

**Block 11** — [EXEC batch] (L1413–L1425)
Clear ENUM SOD fields and port-related tracking fields. These cover previous application port numbers, generation timestamps, provider codes, and service contract numbers.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.ENUMSOD_DOMAIN)` // [-> ENUMSOD_DOMAIN="ENUMSOD自社ドメイン"] ENUM SOD company domain |
| 2 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.ENUMSOD_DMSKNO_KN)` // [-> ENUMSOD_DMSKNO_KN="デミーサ－ビス契約番号（個人）"] Dummy service contract number (individual) |
| 3 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.ENUMSOD_DMSKNO_HN)` // [-> ENUMSOD_DMSKNO_HN="デミーサ－ビス契約番号（法人）"] Dummy service contract number (legal entity) |
| 4 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.NEWTSHIN_PORT_OUT_NO)` // [-> NEWTSHIN_PORT_OUT_NO="最新申請ポートアウト番号"] Latest application port-out number |
| 5 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.NEWTSHIN_GENE_ADD_DTM)` // [-> NEWTSHIN_GENE_ADD_DTM="最新申請世代登録年月日時分秒"] Latest application generation registration date/time |
| 6 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.NEWTSHIN_ITNSK_JGS_CD)` // [-> NEWTSHIN_ITNSK_JGS_CD="最新申請移転先事業者コード"] Latest application transfer provider code |
| 7 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.NEWTSHIN_SVC_KEI_NO)` // [-> NEWTSHIN_SVC_KEI_NO="最新申請サービス契約番号"] Latest application service contract number |
| 8 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.NEWTSHIN_EZM0541_SVC_KEI_NO)` // [-> NEWTSHIN_EZM0541_SVC_KEI_NO="最新申請ENUM切替履歴サービス契約番号"] Latest application ENUM switching history service contract number |
| 9 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.ZNKISHIN_PORT_OUT_NO)` // [-> ZNKISHIN_PORT_OUT_NO="前回申請ポートアウト番号"] Previous application port-out number |
| 10 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.ZNKISHIN_GENE_ADD_DTM)` // [-> ZNKISHIN_GENE_ADD_DTM="前回申請世代登録年月日時分秒"] Previous application generation registration date/time |
| 11 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.SINSEI_NAIYO_FLG)` // Application content flag |
| 12 | EXEC | `JZMWebCommon.setNullToBeanClm(bean, ZMW01904SFConst.KIRIKAESHORI_FLG)` // Switching process flag |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `DSP_TELNO` | Field | Phone number (for display) — the telephone number shown on the screen |
| `DSP_KOJIN_HOJIN_TLN_TAI_CD` | Field | Individual/legal entity number block code (for display) — categorizes whether the customer is an individual (個人) or corporate/legal entity (法人) |
| `KOJIN_HOJIN_TLN_TAI_CD` | Field | Individual/legal entity number block code — internal processing version |
| `DSP_BNGSHUTK_JGS_CD` | Field | Number acquisition provider code (for display) — the provider from which the phone number was originally acquired |
| `BNGSHUTK_JGS_CD` | Field | Number acquisition provider code — internal processing version |
| `DSP_ITNMT_JGS_CD` | Field | Transfer-source provider code (for display) — the provider the number is transferring from |
| `ITNMT_JGS_CD` | Field | Transfer-source provider code — internal processing version |
| `DSP_SINSEI_NAIYO` | Field | Application content (for display) — describes the type of application being made |
| `DSP_KIRIKAESHORI` | Field | Switching process (for display) — indicates what type of service switching is occurring |
| `DSP_CNGBF_ITNSK_JGS_CD` | Field | Pre-change/post-transfer provider code (for display) — the provider before and after the change |
| `CNGBF_ITNSK_JGS_CD` | Field | Pre-change/post-transfer provider code — internal processing version |
| `DSP_CNGBF_ITNSK_DOMAIN` | Field | Pre-change/post-transfer domain (for display) — domain associated with the provider before and after the change |
| `CNGAF_ITNSK_JGS_CD_INFO` | Field | Post-change/post-transfer provider code information — metadata for the pull-down selector |
| `DSP_CNGAF_ITNSK_JGS_CD` | Field | Post-change/post-transfer provider code (for display) — the provider after the change |
| `DSP_CNGAF_ITNSK_DOMAIN` | Field | Post-change/post-transfer domain (for display) — domain after the change |
| `EZM0541B010CBSMSG1LIST` | Field | ENUM switching history list inquiry detail — list of past ENUM (ENUM: Electronic Number Utility Management) switching records |
| `DSBL_CTL_HTML_BTN_ADD_CFM` | Field | Registration confirm button disable control value — controls whether the submit/confirm button is enabled or disabled |
| `EZM0121A010CBSMSG1LIST` | Field | Phone number list inquiry detail — list of phone numbers presented for user consent |
| `JISHA_JGS_CD` | Field | Company provider code — identifies the K-Opticom (own company) provider code |
| `JISHA_JGS_CD_NM` | Field | Company provider code name — display name of the own company provider |
| `ETU0151B040CBSMSG1LIST` | Field | Port-out receipt information list inquiry (phone number) detail — list of port-out receipt records |
| `EZM0111A010CBSMSG1LIST` | Field | Engineering consent inquiry detail — records of engineering work consents |
| `ENUMSOD_DOMAIN` | Field | ENUM SOD own company domain — the ENUM SOD domain used by the company |
| `ENUMSOD_DMSKNO_KN` | Field | Dummy service contract number (individual) — contract number for individual dummy services |
| `ENUMSOD_DMSKNO_HN` | Field | Dummy service contract number (legal entity) — contract number for corporate dummy services |
| `NEWTSHIN_PORT_OUT_NO` | Field | Latest application port-out number — the port-out number from the most recent application |
| `NEWTSHIN_GENE_ADD_DTM` | Field | Latest application generation registration date/time — when the latest application record was generated |
| `NEWTSHIN_ITNSK_JGS_CD` | Field | Latest application transfer provider code — the transfer provider from the latest application |
| `NEWTSHIN_SVC_KEI_NO` | Field | Latest application service contract number — service contract number from the latest application |
| `NEWTSHIN_EZM0541_SVC_KEI_NO` | Field | Latest application ENUM switching history service contract number — service contract number for ENUM switching in latest application |
| `ZNKISHIN_PORT_OUT_NO` | Field | Previous application port-out number — the port-out number from the prior application |
| `ZNKISHIN_GENE_ADD_DTM` | Field | Previous application generation registration date/time — when the previous application was generated |
| `SINSEI_NAIYO_FLG` | Field | Application content flag — flag indicating the type/content of application |
| `KIRIKAESHORI_FLG` | Field | Switching process flag — flag indicating the type of service switching |
| NPS | Business term | Number Portability Service — allowing customers to retain their phone number when switching providers |
| ENUM | Acronym | Electronic Number Utility Management — K-Opticom's internal number management system |
| SOD | Acronym | Service Order Data — telecom service order management entity |
| SCREEN_ID_ZMW01904 | Constant | Screen identifier for the number portability screen |
| JCCWebBusinessLogic | Type | Base class for web business logic — provides the screen-scoped context handle |
| X31SDataBeanAccess | Type | Screen data bean — hierarchical key-value store for all form fields and list data on a web screen |
| X31SDataBeanAccessArray | Type | Array container for nested data bean collections — used to manage repeating list items on a screen |
| JZMWebCommon | Type | Web UI common utility class — provides shared display helpers like `setNullToBeanClm` and `clearPageLinkInfo` |
