SQL-190: Retrieve EmployerLiabilityLimit via GetSpecificLimit¶
This statement retrieves a single EmployerLiabilityLimit record by its code, called from CertificateInformationDataHelper.GetSpecificLimit.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-190 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | CertificateInformationDataHelper |
| Criteria property | N/A — ORM |
| Lifecycle method | GetSpecificLimit |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:limitCode |
Input | String | N/A | limitCode — filters EMP_LIAB_STAT_CODE |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| EMPLOYERS_LIABILITY_LIMITS | SELECT | EMP_LIAB_STAT_CODE, EMP_LIAB_LIMIT1, EMP_LIAB_LIMIT2, EMP_LIAB_LIMIT3, STANDARD_LIMITS_FLAG; filter EMP_LIAB_STAT_CODE |
LINQ statement¶
Source: Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationDataHelper.cs:26
return unitOfWork.GetRepository<EmployerLiabilityLimit>()
.Query().SingleOrDefault(lim => lim.Code == limitCode);
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 ELL.EMP_LIAB_STAT_CODE,
ELL.EMP_LIAB_LIMIT1,
ELL.EMP_LIAB_LIMIT2,
ELL.EMP_LIAB_LIMIT3,
ELL.STANDARD_LIMITS_FLAG
FROM Employers_Liability_Limits ELL
WHERE ELL.EMP_LIAB_STAT_CODE = :limitCode
-- NHibernate expects at most one row
Translation notes:
- SingleOrDefault/Single add no row limit; NHibernate throws if more than one row is returned.
Operations and processes¶
- CertificateInformationDataHelper.GetSpecificLimit — see Operations and processes
Sources¶
Services/SAIF.Services/Policies/Certificates/Information/CertificateInformationDataHelper.cs (L26)