SQL-242: ClaimBuilder.ClaimStatus¶
This statement is a create operation invoked through ORM (IRepository.Add). Executed by ClaimBuilder.ClaimStatus.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-242 |
| Operation type | Create |
| Execution method | ORM (IRepository.Add) |
| Database | Oracle* |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | ClaimBuilder |
| Criteria property | N/A — ORM |
| Lifecycle method | ClaimStatus |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| CL_CLAIM_STATUS_ACTIVITY | INSERT (hypothetical) | CLAIM_ID, CLAIM_STATUS_CODE, CLAIM_STATUS_ACTIVITY_SEQ_NUM, UPDATE_NUM, EFF_DATE, UPDATE_USER, UPDATE_DATE |
LINQ statement¶
Source: Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:62.
// Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:62
var repo = Uow.GetRepository<ClaimStatusActivity>();
// Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:65-77
var activity = new ClaimStatusActivity
{
ClaimId = Item.Id,
ClaimStatusCode = claimStatus,
SubId = subId,
EffectiveDate = effectiveDate ?? Item.InjuryDate.GetValueOrDefault().AddDays(5),
UpdateDate = DateTime.Now,
UpdateUser = "TEST",
UpdateNumber = 0
};
repo.Add(activity);
Sample SQL¶
Test double — no runtime SQL. This statement executes against
TestUnitOfWork/TestRepository<T>(in-memory,List<TEntity>-backed test doubles inSAIF.Framework.Core); no NHibernate session is opened and no SQL is issued at runtime. The SQL below is the hypothetical statement the same expression would produce against a real NHibernateIUnitOfWorkusing the in-repo mappings, shown to document the mapping shape only — no database table is accessed when this code runs.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
INSERT INTO CL_CLAIM_STATUS_ACTIVITY (
CLAIM_ID,
CLAIM_STATUS_CODE,
CLAIM_STATUS_ACTIVITY_SEQ_NUM,
UPDATE_NUM,
EFF_DATE,
UPDATE_USER,
UPDATE_DATE)
VALUES (
:ClaimId,
:ClaimStatusCode,
:SubId,
:UpdateNumber,
:EffectiveDate,
:UpdateUser,
:UpdateDate)
Translation notes:
- Scope split: SQL-242 and SQL-259 cite the same line (62). SQL-242 documents the INSERT (repo.Add(activity), line 77); SQL-259 documents the Any/Max reads at line 63.
- Composite id is assigned by the caller (SubId computed at line 63).
Sources¶
Data/SAIF.Data/TestRepository/RepositoryBuilders/ClaimBuilder.cs:62