SQL-189: Retrieve EmployerLiabilityFactors via GetStandardLimits¶
This statement retrieves the EmployerLiabilityFactors rows flagged as standard limits, called from CertificateInformationService.GetStandardLimits.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-189 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | CertificateInformationService |
| Criteria property | N/A — ORM |
| Lifecycle method | GetStandardLimits |
Parameters¶
None — the query filters on the literal 'Y' flag; no bind parameters.
Tables¶
| Table | Access | Columns used |
|---|---|---|
| EMPLOYERS_LIABILITY_FACTORS | SELECT | emp_liab_stat_code, emp_liab_eff_date (composite key), emp_liab_exp_date, standard_limits_flag; filter standard_limits_flag |
LINQ statement¶
Source: Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationService.cs:472
var limitHistoryCodeList =
unitOfWork.GetRepository<EmployerLiabilityFactors>()
.Query().Where(elf => (elf.IsStandardLimit)).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 ELF.emp_liab_stat_code,
ELF.emp_liab_eff_date,
ELF.emp_liab_exp_date,
ELF.standard_limits_flag
FROM employers_liability_factors ELF
WHERE ELF.standard_limits_flag = 'Y'
Translation notes:
- IsStandardLimit is mapped as YesNoType → 'Y'.
- The SingleOrDefault(... IsBetween ...) at L477-480 runs in memory over the materialized list (DateTime.Now, DateTime.MaxValue, and IsBetween are LINQ-to-Objects).
- The composite-id properties are also Mapped; they are selected once.
Operations and processes¶
- CertificateInformationService.GetStandardLimits — see Operations and processes
Sources¶
Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationService.cs (L473)