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

# SQL-312: Retrieve SubpoenaSpecialHandling via ListOfMailingOptions (property)

This statement retrieves all rows of `SUBPOENA_SPECIAL_HANDLING_CODE` via NHibernate LINQ over `IUnitOfWork.GetRepository<SubpoenaSpecialHandling>()`. It is executed by the `SubpoenaService.ListOfMailingOptions` property (`Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L290)`) to build the list of subpoena mailing/special-handling options exposed to callers.

## Classification

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

## Parameters

None (literals only or full-table read).

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [SUBPOENA_SPECIAL_HANDLING_CODE](../database-tables.md#subpoena_special_handling_code) | SELECT | `CODE`, `CODE_DESCR`, `VERIFICATION_OF_DELIVERY_FLAG`, `SIGNATURE_REQUIRED_FLAG`, `CLAIM_SPECIAL_HANDLING_CODE` |

## LINQ statement

Source: `Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs:288`

```csharp
// Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs:288-290
var mailingOptions =
    Mapper.Map<List<SubpoenaSpecialHandling>>(
        _unitOfWork.GetRepository<LegalData.Subpoenas.SubpoenaSpecialHandling>().Query());
```

## 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
  SSHC.CODE,
  SSHC.CODE_DESCR,
  SSHC.VERIFICATION_OF_DELIVERY_FLAG,
  SSHC.SIGNATURE_REQUIRED_FLAG,
  SSHC.CLAIM_SPECIAL_HANDLING_CODE
FROM SUBPOENA_SPECIAL_HANDLING_CODE SSHC
```

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

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

## Sources
- `Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L290)`
