Skip to content

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 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

// 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.

-- 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

Sources

  • Services/SAIF.Services/Legal/Subpoenas/SubpoenaService.cs (L290)