SQL-031: Create EmployeeAuthorityPaymentLimitHistory via AddLimitToHistory¶
This ORM statement performs a create operation on EmployeeAuthorityPaymentLimitHistory via AddLimitToHistory, executed from Services/SAIF.Services/Claims/Authority/ClaimAuthorityService.cs (L175).
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-031 |
| Operation type | Create |
| Execution method | ORM (IRepository.Add) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | EmployeeAuthorityPaymentLimitHistory |
| Criteria property | N/A — ORM |
| Lifecycle method | AddLimitToHistory |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:Id |
Input | long |
N/A | Identifier from CL_CLM_EMPBUSFUNLIMHIST_SEQ.NEXTVAL |
:PaymentLimitId |
Input | long |
N/A | |
:AuthorizedByEmplid |
Input | string |
N/A | |
:EmployeeId |
Input | string |
N/A | |
:ExpirationDate |
Input | DateTime? |
N/A | |
:MaximumPaymentAmount |
Input | decimal? |
N/A | |
:UpdateDate |
Input | DateTime |
N/A | |
:UpdateUser |
Input | string |
N/A | |
:UpdateNumber |
Input | int |
N/A | |
:PurposeType |
Input | EmployeeAuthorityLimit.AuthorityPurposeTypes |
N/A | Custom type EmployeeAuthorityLimit.AuthorityPurposeTypes |
:BusinessProcess |
Input | AuthorityBusinessProcessCode |
N/A | Identifier of the referenced AuthorityBusinessProcessCode entity (References(x => x.BusinessProcess)) |
:PaymentType |
Input | AuthorityPaymentTypeCode |
N/A | Identifier of the referenced AuthorityPaymentTypeCode entity (References(x => x.PaymentType)) |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| CL_CLAIM_EMP_BUS_FUNC_LIM_HIST | INSERT | CL_CLM_EMPBUSFUNLIMHISTSEQNUM, CL_CLM_EMP_BUS_FUN_LIM_SEQ_NUM, AUTHORIZED_BY_EMPLID, EMPLOYEE_EMPLID, EXP_DATE, MAX_AMOUNT, UPDATE_DATE, UPDATE_USER, UPDATE_NUM, CLAIM_AUTH_PURPOSE_CODE, CLAIM_BUS_PROCESS_CODE, CLAIM_BUS_FUNCTION_CODE (identifier from sequence CL_CLM_EMPBUSFUNLIMHIST_SEQ.NEXTVAL) |
LINQ statement¶
Source: Services/SAIF.Services/Claims/Authority/ClaimAuthorityService.cs:175.
// Services/SAIF.Services/Claims/Authority/ClaimAuthorityService.cs:175
_unitOfWork.GetRepository<EmployeeAuthorityPaymentLimitHistory>().Add(employeeAuthorityPaymentLimitHistory);
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 CL_CLM_EMPBUSFUNLIMHIST_SEQ.NEXTVAL
FROM DUAL
INSERT INTO CL_CLAIM_EMP_BUS_FUNC_LIM_HIST (
CL_CLM_EMPBUSFUNLIMHISTSEQNUM,
CL_CLM_EMP_BUS_FUN_LIM_SEQ_NUM,
AUTHORIZED_BY_EMPLID,
EMPLOYEE_EMPLID,
EXP_DATE,
MAX_AMOUNT,
UPDATE_DATE,
UPDATE_USER,
UPDATE_NUM,
CLAIM_AUTH_PURPOSE_CODE,
CLAIM_BUS_PROCESS_CODE,
CLAIM_BUS_FUNCTION_CODE)
VALUES (
:Id,
:PaymentLimitId,
:AuthorizedByEmplid,
:EmployeeId,
:ExpirationDate,
:MaximumPaymentAmount,
:UpdateDate,
:UpdateUser,
:UpdateNumber,
:PurposeType,
:BusinessProcess,
:PaymentType)
Translation notes:
- :Id is the value fetched from sequence CL_CLM_EMPBUSFUNLIMHIST_SEQ (GeneratedBy.Native("CL_CLM_EMPBUSFUNLIMHIST_SEQ")) before the INSERT; NHibernate assigns it to EmployeeAuthorityPaymentLimitHistory.Id.
- Reference FK values are bound from the associated entity's identifier; the referenced tables are not read or joined by this statement: BusinessProcess → CLAIM_BUS_PROCESS_CODE (entity table CL_CLAIM_BUS_PROCESS_CODE not accessed); PaymentType → CLAIM_BUS_FUNCTION_CODE (entity table CL_CLAIM_BUS_FUNCTION_CODE not accessed).
Operations and processes¶
- ClaimAuthorityService.AddLimitToHistory — see Operations and processes
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
Services/SAIF.Services/Claims/Authority/ClaimAuthorityService.cs (L175)