---
title: "SQL-299: Retrieve SpecialHandlingCode via SpecialHandlingCodeList (property)"
summary: Read operation against SpecialHandlingCode via NHibernate ORM.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SQL-299: Retrieve SpecialHandlingCode via SpecialHandlingCodeList (property)

This statement retrieves every `SpecialHandlingCode` row via a full-table NHibernate LINQ query, executed from `Services/SAIF.Services/Legal/Bills/BillService.cs (L340)` and enumerated via `Mapper.Map`. It backs the `SpecialHandlingCodeList` property, which exposes the complete list of special handling codes for legal bill processing.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| (none) | N/A | N/A | N/A | Full-table read — no filter predicate |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [CL_PAYMENT_SPCL_HANDLING_CODE](../database-tables.md#cl_payment_spcl_handling_code) | SELECT | `CODE`, `CODE_DESCR`, `UPDATE_DATE`, `UPDATE_USER`, `UPDATE_NUM` |

## LINQ statement

Source: `Services/SAIF.Services/Legal/Bills/BillService.cs:339`

```csharp
// Services/SAIF.Services/Legal/Bills/BillService.cs:339-340
return
    Mapper.Map<IList<SpecialHandling>>(_unitOfWork.GetRepository<Data.Model.Claims.CodeTables.SpecialHandlingCode>().Query()).ToList();
```

## Sample SQL

> **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
  CPSHC.CODE,
  CPSHC.CODE_DESCR,
  CPSHC.UPDATE_DATE,
  CPSHC.UPDATE_USER,
  CPSHC.UPDATE_NUM
FROM CL_PAYMENT_SPCL_HANDLING_CODE CPSHC
```

Translation notes:
- The cited line builds an unexecuted `IQueryable`; `Mapper.Map` enumerates it, producing a full-table read.

## Operations and processes
- BillService.SpecialHandlingCodeList (property) — see [Operations and processes](../operations-processes.md)

## Sources
- `Services/SAIF.Services/Legal/Bills/BillService.cs (L340)`
