---
title: "SQL-265: ClaimCodeTableBuilder.ClaimResponsibility"
summary: Read operation for `ClaimCodeTableBuilder.ClaimResponsibility`
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data
reference_type: package
---

# SQL-265: ClaimCodeTableBuilder.ClaimResponsibility

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by `ClaimCodeTableBuilder.ClaimResponsibility`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-265 |
| **Operation type** | Read |
| **Execution method** | ORM (NHibernate LINQ) |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | N/A (ORM-generated) |
| **Business object** | `ClaimCodeTableBuilder` |
| **Criteria property** | N/A — ORM |
| **Lifecycle method** | `ClaimResponsibility` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `code` | Input | string | N/A | Method argument of `ClaimCodeTableBuilder.ClaimResponsibility` bound into the ORM expression; NHibernate generates the bind variable at runtime |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CL_CLAIM_RESPONSIBILITY](../database-tables.md#cl_claim_responsibility) | SELECT (hypothetical) | CLAIM_RESP_CODE, CLAIM_RESP_USER, CLAIM_ASSISTANT_USER, PSEUDO_USER, PSEUDO_NAME, PSEUDO_PHONE, UPDATE_DATE, UPDATE_USER, UPDATE_NUM, CLAIM_SUPERVISOR_CODE, RESPONSIBILITY_TYPE_CODE |

## LINQ statement

Source: `Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimCodeTableBuilder.cs:80`.

```csharp
// Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimCodeTableBuilder.cs:80
var resp = _uow.GetRepository<ClaimResponsibility>().Query().FirstOrDefault(x => x.Code == code);
```

## Sample SQL

> **Test double — no runtime SQL.** This statement executes against `TestUnitOfWork`/`TestRepository<T>` (in-memory, `List<TEntity>`-backed test doubles in `SAIF.Framework.Core`); no NHibernate session is opened and no SQL is issued at runtime. The SQL below is the hypothetical statement the same expression would produce against a real NHibernate `IUnitOfWork` using the in-repo mappings, shown to document the mapping shape only — **no database table is accessed when this code runs.**

> **Inferred SQL:** This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.

```sql
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT *
FROM (
  SELECT
    CCR.CLAIM_RESP_CODE,
    CCR.CLAIM_RESP_USER,
    CCR.CLAIM_ASSISTANT_USER,
    CCR.PSEUDO_USER,
    CCR.PSEUDO_NAME,
    CCR.PSEUDO_PHONE,
    CCR.UPDATE_DATE,
    CCR.UPDATE_USER,
    CCR.UPDATE_NUM,
    CCR.CLAIM_SUPERVISOR_CODE,
    CCR.RESPONSIBILITY_TYPE_CODE
  FROM CL_CLAIM_RESPONSIBILITY CCR
  WHERE CCR.CLAIM_RESP_CODE = :code)
WHERE ROWNUM <= 1
```

Translation notes:
- Scope split: see SQL-244 — this entry documents the read at line 80.
- Not accessed: `CLAIM_SUPERVISOR`, responsibility-type code table — `References(...)` contribute FK columns only.

## Sources

- `Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimCodeTableBuilder.cs:80`
