Skip to content

SQL-070: ClaimQueryProvider.GetRtwCase

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

Classification

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

Parameters

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

Tables

Table Access Columns used
RTW_CASE SELECT CLAIM_ID, CURRENT_CASE_STATUS_CODE, EMPLOYED_BY_OTHER_FLAG, EMPLOYMENT_TYPE_CODE, REFUSED_BJO_FLAG, RELEASE_STATUS_CODE, UNDOCUMENTED_WORKER_FLAG, UNEMPLOYED_REASON_CODE, UNION_WORKER_FLAG, CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE, UPDATE_NUM, POLICY_NUM, RTW_LOAD_CODE

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:439.

return Factory.GetRepository<RTWCase>().Query().FirstOrDefault(x => x.Id == claimId);

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 *
FROM (
  SELECT
    RC.CLAIM_ID,
    RC.CURRENT_CASE_STATUS_CODE,
    RC.EMPLOYED_BY_OTHER_FLAG,
    RC.EMPLOYMENT_TYPE_CODE,
    RC.REFUSED_BJO_FLAG,
    RC.RELEASE_STATUS_CODE,
    RC.UNDOCUMENTED_WORKER_FLAG,
    RC.UNEMPLOYED_REASON_CODE,
    RC.UNION_WORKER_FLAG,
    RC.CREATE_USER,
    RC.CREATE_DATE,
    RC.UPDATE_USER,
    RC.UPDATE_DATE,
    RC.UPDATE_NUM,
    RC.POLICY_NUM,
    RC.RTW_LOAD_CODE
  FROM RTW_CASE RC
  WHERE RC.CLAIM_ID = :claimId
)
WHERE ROWNUM <= 1

Translation notes: - The filter is on the Id, so at most one row can match. - RTW_LOAD_CODE comes from the RtwLoadCode reference; the corresponding plain Map is commented out in the mapping. - .Default("N") on the flags only affects schema generation and inserts, not the SELECT.

Operations and processes

Sources

  • Data/SAIF.Data/Queries/Claims/ClaimQueryProvider.cs:439