Skip to content

SQL-030: BillQueryProvider.GetBillStatusHistory

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

Classification

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

Parameters

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

Tables

Table Access Columns used
CBP_BILL_STATUS SELECT BILL_STATUS_ID, UPDATE_NUM, STATUS_EFF_DATE, NEXT_REVIEW_DATE, RESPONSIBLE_PARTY_ID, UPDATE_USER, UPDATE_DATE, CBP_BILL_STATUS_CODE, BILL_ID

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:66.

return Factory.GetRepository<CbpBillStatus>().Query()
    .Where(x => x.Bill.Id == billId).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
  CBS.BILL_STATUS_ID,
  CBS.UPDATE_NUM,
  CBS.STATUS_EFF_DATE,
  CBS.NEXT_REVIEW_DATE,
  CBS.RESPONSIBLE_PARTY_ID,
  CBS.UPDATE_USER,
  CBS.UPDATE_DATE,
  CBS.CBP_BILL_STATUS_CODE,
  CBS.BILL_ID
FROM CBP_BILL_STATUS CBS
WHERE CBS.BILL_ID = :billId

Translation notes: - x.Bill.Id is the referenced entity's identifier, so it resolves to CBS.BILL_ID with no join; CBP_BILL is not accessed as a separate table.

Operations and processes

Business rules

Sources

  • Data/SAIF.Data/Queries/Claims/BillQueryProvider.cs:66