# Business Logic — JKKStringUtil.isNullBlank() [8 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.common.util.JKKStringUtil` |
| Layer | Utility |
| Module | `util` (Package: `eo.common.util`) |

## 1. Role

### JKKStringUtil.isNullBlank()

`isNullBlank()` is a shared utility method that performs a null-or-empty string check, returning `true` when the input string is either `null` or an empty string (`""`), and `false` otherwise. Its Javadoc states: "Returns `true` if null or blank" (null又は空文字の場合、trueを返却する). This method serves as a foundational input-validation primitive used across the telecom order-fulfillment domain — specifically, it is called extensively from `JKKHakkoSODCC` (Service Order Data Common Component) to guard against null or empty values on telecom service fields such as telephone numbers, service content codes, and order control flags. Its role in the larger system is that of a safety-net validation: any caller that requires a non-empty string can delegate this check to `isNullBlank()` before proceeding with business logic. It implements a simple conditional-branch design pattern with two exhaustive paths.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["isNullBlank(params)"])

    START --> CHECK_NULL

    CHECK_NULL{"str == null ||
str equals empty"} -->|True| RET_TRUE(["return true"])

    CHECK_NULL -->|False| RET_FALSE(["return false"])

    RET_TRUE --> END_N(["End"])

    RET_FALSE --> END_N
```

The method performs a single combined condition check: it evaluates whether the input `str` is `null` or equals the empty string literal `""` (which corresponds to `STRING_BLANK` — defined as `""` in `JKKSvcConst.java:27`). If either sub-condition is true, the method returns `true`, signaling that the string is considered blank. If neither condition holds, the method returns `false`, indicating the string contains at least one character.

**CRITICAL — Constant Resolution:**
- The literal `""` used in `"".equals(str)` resolves to `STRING_BLANK = ""` (defined in `JKKSvcConst.java:27`). This is the canonical blank-string constant for the service layer.

**Requirements:**
- The single condition node evaluates both `null` and empty-string checks as a combined boolean OR.
- Diamond node for condition, rectangular nodes for each return path.
- Both branches are shown: `true` (null or blank) and `false` (non-blank).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `str` | `String` | The target string to validate. This represents any textual business data field — such as a telephone number, service content code, order reference, or free-form input — that must not be null or empty before further processing. If `str` is `null` or `""`, the method returns `true` (blank); otherwise it returns `false` (valid). |

No instance fields or external state are read by this method. It is fully stateless and side-effect-free.

## 4. CRUD Operations / Called Services

This method does not call any other methods (other than `String.equals()`, which is a JDK built-in). It is a pure predicate function with no database, entity, or service-component interactions.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | — | — | — | No CRUD operations. This is a pure string-validation utility with no data access. |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 16 methods.

`isNullBlank()` is a leaf-level utility method — it is called by business logic classes but does not call further business methods itself. The terminal operations column is therefore empty (no downstream SC/CRUD entities are reached from this method).

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Component: `JKKHakkoSODCC.checkTakinoRT()` | `checkTakinoRT()` -> `isNullBlank()` | — |
| 2 | Component: `JKKHakkoSODCC.editInMsgEDK0301B060()` | `editInMsgEDK0301B060()` -> `isNullBlank()` | — |
| 3 | Component: `JKKHakkoSODCC.editInMsgEKK0341B001()` | `editInMsgEKK0341B001()` -> `isNullBlank()` | — |
| 4 | Component: `JKKHakkoSODCC.editInMsgEKK0341B008()` | `editInMsgEKK0341B008()` -> `isNullBlank()` | — |
| 5 | Component: `JKKHakkoSODCC.editInMsgEKK0341B021()` | `editInMsgEKK0341B021()` -> `isNullBlank()` | — |
| 6 | Component: `JKKHakkoSODCC.editInMsgEKK0341B029()` | `editInMsgEKK0341B029()` -> `isNullBlank()` | — |
| 7 | Component: `JKKHakkoSODCC.getShuriKokanBfKiki()` | `getShuriKokanBfKiki()` -> `isNullBlank()` | — |
| 8 | Component: `JKKHakkoSODCC.htelNoDslOdrCtrl()` | `htelNoDslOdrCtrl()` -> `isNullBlank()` | — |
| 9 | Component: `JKKHakkoSODCC.htelNoKaihkOdrCtrl()` | `htelNoKaihkOdrCtrl()` -> `isNullBlank()` | — |
| 10 | Component: `JKKHakkoSODCC.kaihkOdrCtrl()` | `kaihkOdrCtrl()` -> `isNullBlank()` | — |
| 11 | Component: `JKKHakkoSODCC.mappingEKK1041B001SCInMsg()` | `mappingEKK1041B001SCInMsg()` -> `isNullBlank()` | — |
| 12 | Component: `JKKHakkoSODCC.searchOpSvcKei()` | `searchOpSvcKei()` -> `isNullBlank()` | — |
| 13 | Component: `JKKHakkoSODCC.searchSvcKeiUcwk()` | `searchSvcKeiUcwk()` -> `isNullBlank()` | — |
| 14 | Component: `JKKHakkoSODCC.searchSvcKeiUcwkEohtl()` | `searchSvcKeiUcwkEohtl()` -> `isNullBlank()` | — |
| 15 | Component: `JKKHakkoSODCC.telNoChge()` | `telNoChge()` -> `isNullBlank()` | — |

**Additional caller:**
- `JKKStringUtil.nullBlankToSpace()` — internal self-call within `JKKStringUtil` (utility-to-utility delegation).

**Summary:** All 16 direct callers belong to `JKKHakkoSODCC` (Service Order Data Common Component), a shared component in the telecom order-fulfillment domain. The method is used to validate input strings before processing telephone number operations, service content lookups, order controls, and message population. No screen or batch entry points were found within 8 hops — callers are intermediate utility components, not direct UI/batch entry points.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (combined null OR empty check) (L38)

> Evaluates whether the input string is null or equals the empty string. This is the sole conditional branch in the method. The `null` check uses reference comparison (`==`), and the empty check uses `String.equals("")` to safely handle a non-null but empty string (the `"".equals(str)` form prevents `NullPointerException` when `str` is non-null but we still want to catch the empty case).

| # | Type | Code |
|---|------|------|
| 1 | SET | `result = (str == null || "".equals(str))` // Combined null + empty check [-> `"".equals(str)` resolves to `STRING_BLANK = ""` per `JKKSvcConst.java:27`] |
| 2 | RETURN | `return true;` // If result is true: the string is null or empty |

**Block 1.1** — ELSE-IMPLICIT (fall-through) (L42)

> When the condition in Block 1 evaluates to `false` — meaning `str` is neither `null` nor equal to `""` — the method falls through to this implicit else branch and returns `false`, indicating the string is non-blank.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return false;` // If the string is neither null nor empty, it is considered valid (non-blank) |

**Block numbering:**
- Block 1: The `if` branch (null or empty → `true`)
- Block 1.1: The implicit `else` branch (non-blank → `false`)

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `isNullBlank` | Method | Null-or-blank check — returns true if the input string is null or an empty string |
| `STRING_BLANK` | Constant | The empty string literal `""` — canonical blank-string value defined in `JKKSvcConst.java:27` |
| SOD | Acronym | Service Order Data — the domain entity/model used in telecom order fulfillment |
| JKKHakkoSODCC | Component | Service Order Data Common Component — a shared business component that handles order-related operations for telecom services |
| Utility | Layer | Stateless helper class providing common string operations (validation, transformation) used across the application |
