Skip to content

SQL-153: LegalQueryProvider.GetLegalCases

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

Classification

Field Value
SQL ID SQL-153
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 GetLegalCases

Parameters

Parameter Direction Type Max length Description
claimId Input long N/A Method argument of LegalQueryProvider.GetLegalCases 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:40. 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:40
return repository.Where(x => x.ClaimId == claimId).OrderByDescending(x => x.Id).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.

-- 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.CLAIM_ID = :claimId
ORDER BY LC.LEGAL_CASE_SEQ_NUM DESC

Translation notes: - Direct translation: an equality predicate on mapped columns. No navigation, joins or in-memory operators.

Operations and processes

Business rules

Sources

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