# Business Logic — KKW14901SFLogic.actionClear() [52 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW14901SF.KKW14901SFLogic` |
| Layer | Controller (Web Business Logic — extends JCCWebBusinessLogic) |
| Module | `KKW14901SF` (Package: `eo.web.webview.KKW14901SF`) |

## 1. Role

### KKW14901SFLogic.actionClear()

This method implements the **clear processing** (クリア処理) operation for the KKW14901SF search screen — a service contract inquiry screen in the K-Opticom telecom service management system. When a user navigates away from search results or clicks a clear/reset button, this method resets all search criteria fields, pulldown selections, and checkbox states back to their initial defaults, and hides the result list display area. Specifically, it resets input fields (service contract number, data extraction date range, submission number, customer name), search fields (search key equivalents of the above plus send exclusion flag and unsent flag), sort options (sort number, sort item, sort order), the list display flag, and related auxiliary fields (banpo no-advance notice selection, addition thank-you letter issue number, banpo no-advance notice list). The method follows a linear, sequential processing pattern with no conditional branches — it unconditionally iterates through all screen fields and resets each one to an empty string or the initial list display flag value. As a pure UI state reset, it has no create/read/update/delete (CRUD) database operations; it only manipulates in-memory DataBean values via the `X31SDataBeanAccess` abstraction and clears an array-based list bean.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionClear()"])
    START --> LOG1["debugLog: -- actionClear[START] --"]

    LOG1 --> GET_BEAN["getServiceFormBean - Get ServiceFormBean"]
    GET_BEAN --> SET_PULLDOWN["setPulldownChkboxSelected bean SEARCH_FLG_N equals 0"]

    SET_PULLDOWN --> SET_SYSID["sendMessageString SYSID set empty"]
    SET_SYSID --> SET_SVC_KEI_NO["sendMessageString SVC_KEI_NO set empty"]
    SET_SVC_KEI_NO --> SET_DATA_YF["sendMessageString DATA_CHSHT_YEAR_FROM set empty"]
    SET_DATA_YF --> SET_DATA_MF["sendMessageString DATA_CHSHT_MON_FROM set empty"]
    SET_DATA_MF --> SET_DATA_DF["sendMessageString DATA_CHSHT_DAY_FROM set empty"]
    SET_DATA_DF --> SET_DATA_YT["sendMessageString DATA_CHSHT_YEAR_TO set empty"]
    SET_DATA_YT --> SET_DATA_MT["sendMessageString DATA_CHSHT_MON_TO set empty"]
    SET_DATA_MT --> SET_DATA_DT["sendMessageString DATA_CHSHT_DAY_TO set empty"]
    SET_DATA_DT --> SET_MSKMSHO["sendMessageString MSKMSHO_NO set empty"]
    SET_MSKMSHO --> SET_CUST_NM["sendMessageString CUST_NM set empty"]

    SET_CUST_NM --> SET_SEARCH_SYSID["sendMessageString SEARCH_SYSID set empty"]
    SET_SEARCH_SYSID --> SET_SEARCH_SVC["sendMessageString SEARCH_SVC_KEI_NO set empty"]
    SET_SEARCH_SVC --> SET_SEARCH_DATE_FROM["sendMessageString SEARCH_DATA_CHSHTYMD_FROM set empty"]
    SET_SEARCH_DATE_FROM --> SET_SEARCH_DATE_TO["sendMessageString SEARCH_DATA_CHSHTYMD_TO set empty"]
    SET_SEARCH_DATE_TO --> SET_SEARCH_MSKMSHO["sendMessageString SEARCH_MSKMSHO_NO set empty"]
    SET_SEARCH_MSKMSHO --> SET_SEARCH_CUST["sendMessageString SEARCH_CUST_NM set empty"]
    SET_SEARCH_CUST --> SET_SEARCH_SEND["sendMessageString SEARCH_SEND_JGI_FLG set empty"]
    SET_SEARCH_SEND --> SET_SEARCH_MI["sendMessageString SEARCH_MI_SEND set empty"]

    SET_SEARCH_MI --> SET_SORT["sendMessageString SORT_NUM set empty"]
    SET_SORT --> SET_ORDER_N["sendMessageString ORDER_NUM set empty"]
    SET_ORDER_N --> SET_ORDER_T["sendMessageString ORDER_TYPE set empty"]

    SET_ORDER_T --> SET_LIST["sendMessageBoolean LIST_DISP_FLG set false"]
    SET_LIST --> SET_BMP["sendMessageString BMPNONNOPRETCHI_CHOICE set empty"]
    SET_BMP --> SET_KANUO["sendMessageString KANUORESO_HAKKO_NO set empty"]

    SET_KANUO --> CALL_CLEAR["getDataBeanArray BMPNONNOPRETCHI_LIST clearArray"]
    CALL_CLEAR --> DUMP["dumpDatabean DataBean dump to log"]

    DUMP --> LOG2["debugLog: -- actionClear[END] --"]
    LOG2 --> RETURN_TRUE["return true"]
    RETURN_TRUE --> END_NODE(["Return true"])
```

**CRITICAL — Constant Resolution:**
- `SEARCH_FLG_N` = `"0"` — Search flag "No" (i.e., not searching; initial default state for pulldown/checkbox reset).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It operates entirely on the instance-level DataBean obtained via `super.getServiceFormBean()`. |
| - | `bean` (implicit) | `X31SDataBeanAccess` | The screen's data access object holding all form input values, search criteria, sort options, and list state for the KKW14901SF screen. All field values are reset via this object. |
| - | `super.getServiceFormBean()` | `X31SDataBeanAccess` | The inherited method that returns the current screen's DataBean from the X31 framework. Provides the single mutable state handle for all field resets. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `OneStopDataBeanAccessArray.clearArray` | OneStopDataBeanAccessArray | - | Calls `clearArray` on the `BMPNONNOPRETCHI_LIST` DataBean array, clearing the banpo no-advance notice list items from memory |
| R | `OneStopDataBeanAccess.getDataBeanArray` | OneStopDataBeanAccess | - | Calls `getDataBeanArray(KKW14901SFConst.BMPNONNOPRETCHI_LIST)` to retrieve the list DataBean reference for subsequent clearing |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Called 21 times with `DATABEAN_SET_VALUE` and empty string `""` to reset individual string fields on the form bean |
| - | `OneStopDataBeanAccess.sendMessageBoolean` | OneStopDataBeanAccess | - | Called once with `DATABEAN_SET_VALUE` and `false` to reset the list display flag |
| - | `KKW14901SFLogic.setPulldownChkboxSelected` | KKW14901SFLogic | - | Resets pulldown dropdown selections and checkbox states to initial defaults based on search flag value |
| - | `KKW14901SFLogic.debugLog` | KKW14901SFLogic | - | Emits START and END debug log markers for traceability |
| - | `KKW14901SFLogic.dumpDatabean` | KKW14901SFLogic | - | Dumps the current DataBean state to the log output for debugging purposes |

All operations are in-memory DataBean manipulations. No actual database CRUD (Create/Read/Update/Delete) is performed — this method purely resets screen state.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | KKW14901SF Logic | `KKW14901SFLogic.actionClear` | N/A (no database calls) |

**Notes on callers:** The `actionClear` method is a standard screen action method that would be invoked by the KKW14901SF screen's request handler (typically via the X31 framework's action dispatching mechanism). No direct Java callers were found in the search — this is typical for framework-driven dispatch where the action method name matches a screen request parameter (e.g., `action=actionClear`). The method has no database terminals since it exclusively manipulates in-memory DataBean values.

Related mapping screens that reference `KKW14901SFLogic` constants:
- `KKSV0696` (delayed transmission request data extraction) — uses `KKW14901SFLogic.DLYD_TRN_REQ_SBT_DATA_CHSHT` and `REQ_JOB_ID_DATA_CHSHT`
- `KKSV0697` (delayed transmission request Yamato shipping) — uses `KKW14901SFLogic.DLYD_TRN_REQ_SBT_YAMATO_SEND` and `REQ_JOB_ID_YAMATO_SEND`

## 6. Per-Branch Detail Blocks

**Block 1** — [DEBUG LOG] `(L397)`

> Logs the method entry point for traceability.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `debugLog("-- actionClear[START] --")` // Debug log entry marker |

**Block 2** — [METHOD CALL] `(L401)`

> Retrieves the screen's DataBean access object from the X31 framework parent class.

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess bean = super.getServiceFormBean()` // Get the screen DataBean access handle |

**Block 3** — [METHOD CALL] `(L404)`

> Resets pulldown dropdown selections and checkbox states to initial defaults. Uses `SEARCH_FLG_N = "0"` indicating the screen is in non-search initial state.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setPulldownChkboxSelected(bean, SEARCH_FLG_N)` // [CONSTANT: SEARCH_FLG_N="0"] Reset pulldown/checkbox to initial defaults |

**Block 4** — [METHOD CALLS x10] `(L407–L416)`

> Resets all input (画面入力項目) fields to empty strings. These are the actual input values on the screen (as opposed to search criteria).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `bean.sendMessageString(SYSID, DATABEAN_SET_VALUE, "")` // [CONSTANT: SYSID="SYSID"] Reset SYSID field |
| 2 | CALL | `bean.sendMessageString(SVC_KEI_NO, DATABEAN_SET_VALUE, "")` // [CONSTANT: SVC_KEI_NO="サービス契約番号"] Reset service contract number |
| 3 | CALL | `bean.sendMessageString(DATA_CHSHT_YEAR_FROM, DATABEAN_SET_VALUE, "")` // [CONSTANT: DATA_CHSHT_YEAR_FROM="データ抽出日(自)(年)"] Reset extraction date range start year |
| 4 | CALL | `bean.sendMessageString(DATA_CHSHT_MON_FROM, DATABEAN_SET_VALUE, "")` // [CONSTANT: DATA_CHSHT_MON_FROM="データ抽出日(自)(月)"] Reset extraction date range start month |
| 5 | CALL | `bean.sendMessageString(DATA_CHSHT_DAY_FROM, DATABEAN_SET_VALUE, "")` // [CONSTANT: DATA_CHSHT_DAY_FROM="データ抽出日(自)(日)"] Reset extraction date range start day |
| 6 | CALL | `bean.sendMessageString(DATA_CHSHT_YEAR_TO, DATABEAN_SET_VALUE, "")` // [CONSTANT: DATA_CHSHT_YEAR_TO="データ抽出日(至)(年)"] Reset extraction date range end year |
| 7 | CALL | `bean.sendMessageString(DATA_CHSHT_MON_TO, DATABEAN_SET_VALUE, "")` // [CONSTANT: DATA_CHSHT_MON_TO="データ抽出日(至)(月)"] Reset extraction date range end month |
| 8 | CALL | `bean.sendMessageString(DATA_CHSHT_DAY_TO, DATABEAN_SET_VALUE, "")` // [CONSTANT: DATA_CHSHT_DAY_TO="データ抽出日(至)(日)"] Reset extraction date range end day |
| 9 | CALL | `bean.sendMessageString(MSKMSHO_NO, DATABEAN_SET_VALUE, "")` // [CONSTANT: MSKMSHO_NO="申込番号"] Reset submission number |
| 10 | CALL | `bean.sendMessageString(CUST_NM, DATABEAN_SET_VALUE, "")` // [CONSTANT: CUST_NM="お客様名（漢字）"] Reset customer name (kanji) |

**Block 5** — [METHOD CALLS x7] `(L419–L425)`

> Resets all search criteria (検索項目) fields to empty strings. These are the search input fields used for querying the result list.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `bean.sendMessageString(SEARCH_SYSID, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_SYSID="検索用SYSID"] Reset search SYSID |
| 2 | CALL | `bean.sendMessageString(SEARCH_SVC_KEI_NO, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_SVC_KEI_NO="検索用サービス契約番号"] Reset search service contract number |
| 3 | CALL | `bean.sendMessageString(SEARCH_DATA_CHSHTYMD_FROM, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_DATA_CHSHTYMD_FROM="検索用データ抽出日(自)"] Reset search date range start |
| 4 | CALL | `bean.sendMessageString(SEARCH_DATA_CHSHTYMD_TO, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_DATA_CHSHTYMD_TO="検索用データ抽出日(至)"] Reset search date range end |
| 5 | CALL | `bean.sendMessageString(SEARCH_MSKMSHO_NO, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_MSKMSHO_NO="検索用申込書番号"] Reset search submission number |
| 6 | CALL | `bean.sendMessageString(SEARCH_CUST_NM, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_CUST_NM="検索用お客様名（漢字）"] Reset search customer name |
| 7 | CALL | `bean.sendMessageString(SEARCH_SEND_JGI_FLG, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_SEND_JGI_FLG="検索用送信除外フラグ"] Reset search send exclusion flag |
| 8 | CALL | `bean.sendMessageString(SEARCH_MI_SEND, DATABEAN_SET_VALUE, "")` // [CONSTANT: SEARCH_MI_SEND="検索用未送信"] Reset search unsent flag |

**Block 6** — [METHOD CALLS x3] `(L428–L430)`

> Resets all sort (ソート) option fields to empty strings. These determine how the result list is sorted.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `bean.sendMessageString(SORT_NUM, DATABEAN_SET_VALUE, "")` // [CONSTANT: SORT_NUM="ソート番号"] Reset sort number |
| 2 | CALL | `bean.sendMessageString(ORDER_NUM, DATABEAN_SET_VALUE, "")` // [CONSTANT: ORDER_NUM="ソート項目№"] Reset sort item number |
| 3 | CALL | `bean.sendMessageString(ORDER_TYPE, DATABEAN_SET_VALUE, "")` // [CONSTANT: ORDER_TYPE="ソート順"] Reset sort order |

**Block 7** — [METHOD CALL] `(L433)`

> Hides the result list display area by setting the list display flag to `false`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `bean.sendMessageBoolean(LIST_DISP_FLG, DATABEAN_SET_VALUE, false)` // [CONSTANT: LIST_DISP_FLG="一覧表示フラグ"] Hide the result list |

**Block 8** — [METHOD CALLS x3] `(L435–L437)`

> Resets auxiliary fields: banpo no-advance notice selection, addition thank-you letter issue number, and clears the banpo no-advance notice list array.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `bean.sendMessageString(BMPNONNOPRETCHI_CHOICE, DATABEAN_SET_VALUE, "")` // [CONSTANT: BMPNONNOPRETCHI_CHOICE="番ポなし番号事前通知選択行"] Reset banpo no-advance notice selection row |
| 2 | CALL | `bean.sendMessageString(KANUORESO_HAKKO_NO, DATABEAN_SET_VALUE, "")` // [CONSTANT: KANUORESO_HAKKO_NO="加入御礼書発行番号"] Reset addition thank-you letter issue number |
| 3 | CALL | `bean.getDataBeanArray(BMPNONNOPRETCHI_LIST).clearArray()` // [CONSTANT: BMPNONNOPRETCHI_LIST="番ポなし番号事前通知一覧"] Clear the banpo no-advance notice list array from memory |

**Block 9** — [METHOD CALL] `(L440)`

> Dumps the DataBean state to the log for debugging purposes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // DataBean dump output for debugging |

**Block 10** — [DEBUG LOG + RETURN] `(L443–L445)`

> Logs the method exit and returns success.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `debugLog("-- actionClear[END] --")` // Debug log exit marker |
| 2 | RETURN | `return true` // Returns true indicating successful completion |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `SYSID` | Field | System ID — internal system identifier for the service contract |
| `SVC_KEI_NO` | Field | Service contract number — `サービス契約番号`, the unique identifier for a telecom service contract line item |
| `DATA_CHSHT_YEAR_FROM` / `MON_FROM` / `DAY_FROM` | Field | Data extraction date range start (year/month/day) — `データ抽出日(自)(年/月/日)`, the from-date components for filtering service records |
| `DATA_CHSHT_YEAR_TO` / `MON_TO` / `DAY_TO` | Field | Data extraction date range end (year/month/day) — `データ抽出日(至)(年/月/日)`, the to-date components for filtering service records |
| `MSKMSHO_NO` | Field | Submission number — `申込番号`, the application/submission tracking number for a service order |
| `CUST_NM` | Field | Customer name (kanji) — `お客様名（漢字）`, the registered customer's full name in kanji characters |
| `SEARCH_SYSID` | Field | Search SYSID — `検索用SYSID`, the search form key for SYSID |
| `SEARCH_SVC_KEI_NO` | Field | Search service contract number — `検索用サービス契約番号`, the search form key for service contract number |
| `SEARCH_DATA_CHSHTYMD_FROM` / `TO` | Field | Search data extraction date range (from/to) — `検索用データ抽出日(自)/(至)`, the search form's date range filter key |
| `SEARCH_MSKMSHO_NO` | Field | Search submission number — `検索用申込書番号`, the search form key for submission number |
| `SEARCH_CUST_NM` | Field | Search customer name (kanji) — `検索用お客様名（漢字）`, the search form key for customer name |
| `SEARCH_SEND_JGI_FLG` | Field | Search send exclusion flag — `検索用送信除外フラグ`, whether to filter by excluded send status |
| `SEARCH_MI_SEND` | Field | Search unsent — `検索用未送信`, whether to filter by unsent status |
| `SEND_JGI_INFO` | Field | Send exclusion information — `送信除外情報`, info about messages that have been excluded from sending |
| `MI_SEND` | Field | Unsent — `未送信`, flag indicating a message has not yet been sent |
| `SEND_JGI_CD` | Field | Send exclusion flag code — `送信除外フラグコード`, the code for the send exclusion flag |
| `SORT_NUM` | Field | Sort number — `ソート番号`, the sort sequence number for result ordering |
| `ORDER_NUM` | Field | Sort item number — `ソート項目№`, the column/item number used for sorting |
| `ORDER_TYPE` | Field | Sort order — `ソート順`, the sort direction (ascending/descending) |
| `SEARCH_FLG` | Field | Search flag — `検索フラグ`, indicates whether a search is active |
| `SEARCH_FLG_N` | Constant | Search flag "No" = `"0"`, the initial/default value indicating no search is active |
| `LIST_DISP_FLG` | Field | List display flag — `一覧表示フラグ`, controls visibility of the result list on the screen |
| `BMPNONNOPRETCHI_CHOICE` | Field | Banpo no-advance notice selection row — `番ポなし番号事前通知選択行`, selection row for phoneless number advance notifications |
| `BMPNONNOPRETCHI_LIST` | Field | Banpo no-advance notice list — `番ポなし番号事前通知一覧`, the array/list of phoneless number advance notification items |
| `KANUORESO_HAKKO_NO` | Field | Addition thank-you letter issue number — `加入御礼書発行番号`, the issue number for the service addition thank-you letter |
| `RTN_BTN_DISP_FLG` | Field | Return button display flag — `戻るボタン表示フラグ`, controls visibility of the return/back button |
| `INDEX_01` | Constant | "添え字" (index/subscript) — pulldown index label |
| `CD_DIV_LIST_01` | Constant | "コードリスト" (code list) — pulldown code list category |
| `CD_DIV_NM_LIST_01` | Constant | "コード名リスト" (code name list) — pulldown code name list category |
| `KANUORESO_HAKKO_NO_02` | Constant | "加入御礼書発行番号" (addition thank-you letter issue number) — duplicate key for banpo notice info |
| X31SDataBeanAccess | Class | X31 Framework DataBean access object — the abstraction for reading/writing form field values on the screen |
| DATABEAN_SET_VALUE | Constant | DataBean set value flag — used with `sendMessageString` to set a field's value |
| DATABEAN_GET_VALUE | Constant | DataBean get value flag — used with `sendMessageString` to read a field's value |
| KKW14901SF | Module | The service contract inquiry/search screen module — the "SF" suffix denotes "Screen Function" |
| KKW14901SFLogic | Class | Business logic class for KKW14901SF — extends `JCCWebBusinessLogic`, handles screen-specific processing |
| KKW14901SFConst | Class | Constants class for KKW14901SF — defines all field IDs, constant strings, and lookup keys for this screen |
| KKW14901SFBean | Class | Form DataBean for KKW14901SF — holds all screen input/output data fields |
| KKW14901SF01DBean | Class | Detail DataBean 01 — holds data for send exclusion information items |
| KKW14901SF02DBean | Class | Detail DataBean 02 — holds data for banpo no-advance notice list items |
| KKW14901SFChecker | Class | Validation/checker class for KKW14901SF — implements `X31SGuiCheckBase` for input validation |
| X31 Framework | Platform | K-Opticom's proprietary web application framework — provides DataBean, BusinessLogic, and screen lifecycle management |
| JCCWebBusinessLogic | Parent Class | Common base class for web business logic — provides shared methods like `getServiceFormBean()` and `debugLog()` |
| DataBean | Concept | A data transfer object holding screen input/output values — in this context, `X31SDataBeanAccess` provides the get/set API |
| OneStopDataBeanAccess | Class | Shared DataBean access utility — provides `sendMessageString`, `sendMessageBoolean`, `getDataBeanArray`, and `clearArray` methods |
| clearArray | Method | Clears all items from a DataBean array/list — used to reset list-type screen fields |
| debugLog | Method | Emits a debug-level log message — used for traceability and troubleshooting |
| dumpDatabean | Method | Returns a string dump of the current DataBean state — used for logging the full screen state |
