Skip to content

SQL-152: LegalQueryProvider.GetLegalCase

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by LegalQueryProvider.GetLegalCase.

Classification

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

Parameters

Parameter Direction Type Max length Description
id Input long N/A Method argument of LegalQueryProvider.GetLegalCase bound into the ORM expression; NHibernate generates the bind variable at runtime

Tables

Table Access Columns used
LEGAL_CASE SELECT LEGAL_CASE_SEQ_NUM, CLAIM_ID, WCB_NUM, DCBS_NUM, OALJ_NUM, OWCP_NUM, BRB_NUM, REQUEST_DATE, CLAIM_IMAGE_ALERTS_FLAG, CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE, MOST_RECENT_HEARING_SEQ_NUM, CASE_STATUS_CODE, WORKER_ATTY_PROV_LOC_ID, WORKER_ATTY_FIRM_PROV_LOC_ID

LINQ statement

Source: Data/SAIF.Data/Queries/Legal/LegalQueryProvider.cs:35. The repository is obtained at Data/SAIF.Data/Queries/Legal/LegalQueryProvider.cs:28.

// Data/SAIF.Data/Queries/Legal/LegalQueryProvider.cs:28
repository = Factory.GetRepository<LegalCase>().Query();

// Data/SAIF.Data/Queries/Legal/LegalQueryProvider.cs:35
return repository.SingleOrDefault(x => x.Id == id);

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
  LC.LEGAL_CASE_SEQ_NUM,
  LC.CLAIM_ID,
  LC.WCB_NUM,
  LC.DCBS_NUM,
  LC.OALJ_NUM,
  LC.OWCP_NUM,
  LC.BRB_NUM,
  LC.REQUEST_DATE,
  LC.CLAIM_IMAGE_ALERTS_FLAG,
  LC.CREATE_USER,
  LC.CREATE_DATE,
  LC.UPDATE_USER,
  LC.UPDATE_DATE,
  LC.MOST_RECENT_HEARING_SEQ_NUM,
  LC.CASE_STATUS_CODE,
  LC.WORKER_ATTY_PROV_LOC_ID,
  LC.WORKER_ATTY_FIRM_PROV_LOC_ID
FROM LEGAL_CASE LC
WHERE LC.LEGAL_CASE_SEQ_NUM = :id
-- NHibernate expects at most one row

Translation notes: - LegalCaseMap has no Version, so no version column is selected.

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Legal/LegalQueryProvider.cs:35