---
title: "Detailed Design — SvcKeiFinderWithTrgtSvc.isAllEmptyTarget()"
fqn: "com.fujitsu.futurity.bp.custom.common.SvcKeiFinderWithTrgtSvc.isAllEmptyTarget"
source_file: "JKKWribSvcKeiOperateCC.java"
source_line: "16879-16884"
---

# Business Logic — SvcKeiFinderWithTrgtSvc.isAllEmptyTarget() [6 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.SvcKeiFinderWithTrgtSvc.isAllEmptyTarget(String, String, String, String)` |
| Layer | Common / Utility (inner class within CC component) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |
| Source File | `JKKWribSvcKeiOperateCC.java` (Lines 16879–16884) |

## 1. Role

`isAllEmptyTarget` is a private utility method that determines whether **all four service target fields** (service code, processing group code, contract code, and plan code) are empty — either `null` or blank string (`""`). It serves as a gatekeeper in the predicate evaluation logic used by the **write-back service targeting** system. The broader `SvcKeiFinderWithTrgtSvc` class is an inner class implementing the `Predicater<CAANMsg>` interface, meaning it acts as a **filter/predicate** in a stream-like evaluation pipeline that selects or rejects `CAANMsg` objects based on whether they match a service target profile. When `isAllEmptyTarget` returns `true` (meaning all target fields are empty), the calling `evaluate` method short-circuits to `false`, effectively rejecting the message from the result set. The business intent is to ensure that a filter predicate cannot match against a service specification that defines no concrete targeting criteria — a message should not be collected if the user's filter has no specific service fields to match on. This is a data-quality gate preventing ambiguous or meaningless service targeting matches.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["isAllEmptyTarget(svcCd, prcGrpCd, pcrsCd, pplanCd)"])
    CHECK1["isEmpty(svcCd)"]
    CHECK2["isEmpty(prcGrpCd)"]
    CHECK3["isEmpty(pcrsCd)"]
    CHECK4["isEmpty(pplanCd)"]
    AND_RESULT["result = all four checks ANDed together"]
    RETURN(["Return result"])

    START --> CHECK1
    CHECK1 -- false --> RETURN
    CHECK1 -- true --> CHECK2
    CHECK2 -- false --> RETURN
    CHECK2 -- true --> CHECK3
    CHECK3 -- false --> RETURN
    CHECK3 -- true --> CHECK4
    CHECK4 -- false --> RETURN
    CHECK4 -- true --> AND_RESULT
    AND_RESULT --> RETURN
```

**Processing Description:**

The method performs a **short-circuit conjunction** across four empty-check conditions:

1. **Check `svcCd` (Service Code):** Delegates to `isEmpty(svcCd)`. If `svcCd` is `null` or `""`, the check passes; otherwise, the method immediately returns `false` (not all empty).
2. **Check `prcGrpCd` (Processing Group Code):** Delegates to `isEmpty(prcGrpCd)`. Same logic — if non-empty, returns `false`.
3. **Check `pcrsCd` (Contract Code):** Delegates to `isEmpty(pcrsCd)`. Same logic.
4. **Check `pplanCd` (Plan Code):** Delegates to `isEmpty(pplanCd)`. Same logic.
5. **Result aggregation:** If all four checks pass (all are empty), `result` is set to `true` and returned. If any single field is non-empty, the short-circuit returns `false` at the first failing check.

The method is called from the `evaluate` method of `SvcKeiFinderWithTrgtSvc`, which wraps this result with additional logic: if all targets are empty, the predicate evaluates to `false` (reject). Otherwise, it continues to check whether each individual field should be collected via `isCollect` comparisons.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcCd` | `String` | Service code extracted from the write-back service target message (`CAANMsg.getString("svc_cd")`). Identifies the broad service category (e.g., internet, phone, TV). Empty value means no specific service filter was set. |
| 2 | `prcGrpCd` | `String` | Processing group code extracted from the write-back service target message (`CAANMsg.getString("prc_grp_cd")`). Groups related processing operations. Empty value means no specific processing group filter was set. |
| 3 | `pcrsCd` | `String` | Contract code extracted from the write-back service target message (`CAANMsg.getString("pcrs_cd")`). Represents the contract/subscription type. Empty value means no specific contract filter was set. |
| 4 | `pplanCd` | `String` | Plan code extracted from the write-back service target message (`CAANMsg.getString("pplan_cd")`). Identifies the specific pricing/service plan. Empty value means no specific plan filter was set. |

**External state accessed:** None. This method is stateless and reads no instance fields.

## 4. CRUD Operations / Called Services

This method performs no database or SC (Service Component) operations. It only calls a local private helper method:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| — | `isEmpty(String)` | N/A | N/A | Local utility — checks if a string is `null` or empty. Not a data operation; pure in-memory validation. |

## 5. Dependency Trace

### Direct Callers:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class: `SvcKeiFinderWithTrgtSvc.evaluate(CAANMsg)` | `SvcKeiFinderWithTrgtSvc.evaluate` → `isAllEmptyTarget` (private method within same class) | None (predicate utility, no data operations) |

**Caller Context:**
- `SvcKeiFinderWithTrgtSvc` is an **inner class** defined within `JKKWribSvcKeiOperateCC.java`.
- It implements the `Predicater<CAANMsg>` interface, acting as a **filter/predicate** in the service targeting system.
- The class is instantiated during write-back processing and used to evaluate whether a `CAANMsg` (service specification message) should match a predefined service target.
- The `evaluate` method calls `isAllEmptyTarget` as the first gate: if all target criteria are empty, the message is immediately rejected (`false`), and evaluation proceeds only if at least one criterion is set.

## 6. Per-Branch Detail Blocks

**Block 1** — [METHOD] Entry point (L16879)

| # | Type | Code |
|---|------|------|
| 1 | PARAM | `String svcCd` — Service code to check |
| 2 | PARAM | `String prcGrpCd` — Processing group code to check |
| 3 | PARAM | `String pcrsCd` — Contract code to check |
| 4 | PARAM | `String pplanCd` — Plan code to check |

**Block 1.1** — [IF/AND-chain] Short-circuit conjunction of four isEmpty checks (L16880–16883)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `isEmpty(svcCd)` — Checks if service code is null or blank |
| 2 | CALL | `isEmpty(prcGrpCd)` — Checks if processing group code is null or blank |
| 3 | CALL | `isEmpty(pcrsCd)` — Checks if contract code is null or blank |
| 4 | CALL | `isEmpty(pplanCd)` — Checks if plan code is null or blank |
| 5 | AND | All four results are combined with logical AND (`&&`) — Java short-circuit semantics apply |
| 6 | SET | `result` = outcome of the conjunction |

> Business meaning: Returns `true` only when the user has set **no filtering criteria** at all (all four target fields are empty). Returns `false` if **any** field has a value (meaning there is at least one meaningful targeting criterion).

**Block 1.2** — [RETURN] Return result (L16883–16884)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `result` — `true` if all four parameters are empty; `false` if any is non-empty |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcCd` | Field | Service Code — identifies the broad service category (e.g., FTTH, Phone, TV) in write-back service targeting |
| `prcGrpCd` | Field | Processing Group Code — groups related processing operations for service targeting evaluation |
| `pcrsCd` | Field | Contract Code — identifies the contract or subscription type associated with a service |
| `pplanCd` | Field | Plan Code — identifies the specific pricing/service plan |
| `Predicater` | Interface | Functional interface pattern — a filter predicate that evaluates a condition and returns `true`/`false` for inclusion/exclusion decisions |
| `CAANMsg` | Class | CAAN Message — a messaging wrapper class carrying typed string key-value pairs used for data transfer between service components |
| `SvcKeiFinderWithTrgtSvc` | Class | Service Type Finder with Target Service — an inner predicate class that filters service specification messages by matching them against a target service profile |
| `isEmpty` | Method | Private utility method that checks if a string is `null` or equals `""` (empty string) |
| Write-back | Business term | The process of writing back service target information from service specifications to a targeting record, used in order processing and service management |
| CC | Abbreviation | Common Component — a tier in the architecture layering (Controller/CC/DAO/Batch) |
| evaluate | Method | The predicate evaluation entry point — called to determine if a `CAANMsg` satisfies the targeting criteria |
