SQL-015: Create ClaimNote via CreateNote¶
This ORM statement performs a create operation on ClaimNote via CreateNote, executed from Services/SAIF.Services/Claims/Notes/ClaimNotesService.cs (L309).
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-015 |
| Operation type | Create |
| Execution method | ORM (IRepository.Add) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | ClaimNote |
| Criteria property | N/A — ORM |
| Lifecycle method | CreateNote |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
:Id |
Input | long |
N/A | Identifier from CLAIM_ACTIVITY_SEQ.NEXTVAL |
:ClaimId |
Input | long |
N/A | |
:NoteDate |
Input | DateTime |
N/A | |
:ExternalView |
Input | bool |
N/A | Bound as 'Y'/'N' (YesNoType) |
:Text |
Input | string |
N/A | |
:CreateUser |
Input | string |
N/A | |
:CreateDate |
Input | DateTime |
N/A | |
:UpdateUser |
Input | string |
N/A | |
:UpdateDate |
Input | DateTime? |
N/A | |
:UpdateNumber |
Input | int |
N/A | |
:ClaimNoteCategory |
Input | ClaimNoteCategory |
N/A | Identifier of the referenced ClaimNoteCategory entity (References(x => x.ClaimNoteCategory)) |
:ClaimNoteType |
Input | ClaimNoteType |
N/A | Identifier of the referenced ClaimNoteType entity (References(x => x.ClaimNoteType)) |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| CLAIM_ACTIVITY | INSERT | CLAIM_ACTIVITY_SEQ_NUM, CLAIM_ID, ACTIVITY_DATE, EXTERNAL_VIEW_FLAG, COMMENT_TEXT, CREATE_USER, CREATE_DATE, UPDATE_USER, UPDATE_DATE, UPDATE_NUM, CLAIM_ACTIVITY_CATEGORY_CODE, CLAIM_ACTIVITY_TYPE_CODE (identifier from sequence CLAIM_ACTIVITY_SEQ.NEXTVAL) |
LINQ statement¶
Source: Services/SAIF.Services/Claims/Notes/ClaimNotesService.cs:309.
// Services/SAIF.Services/Claims/Notes/ClaimNotesService.cs:309
UnitOfWork.GetRepository<ClaimNote>().Add(noteData);
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 CLAIM_ACTIVITY_SEQ.NEXTVAL
FROM DUAL
INSERT INTO CLAIM_ACTIVITY (
CLAIM_ACTIVITY_SEQ_NUM,
CLAIM_ID,
ACTIVITY_DATE,
EXTERNAL_VIEW_FLAG,
COMMENT_TEXT,
CREATE_USER,
CREATE_DATE,
UPDATE_USER,
UPDATE_DATE,
UPDATE_NUM,
CLAIM_ACTIVITY_CATEGORY_CODE,
CLAIM_ACTIVITY_TYPE_CODE)
VALUES (
:Id,
:ClaimId,
:NoteDate,
:ExternalView,
:Text,
:CreateUser,
:CreateDate,
:UpdateUser,
:UpdateDate,
:UpdateNumber,
:ClaimNoteCategory,
:ClaimNoteType)
Translation notes:
- :Id is the value fetched from sequence CLAIM_ACTIVITY_SEQ (GeneratedBy.Native("CLAIM_ACTIVITY_SEQ")) before the INSERT; NHibernate assigns it to ClaimNote.Id.
- :ExternalView are bound as 'Y' / 'N' (YesNoType).
- Reference FK values are bound from the associated entity's identifier; the referenced tables are not read or joined by this statement: ClaimNoteCategory → CLAIM_ACTIVITY_CATEGORY_CODE (entity table CLAIM_ACTIVITY_CATEGORY_CODE not accessed); ClaimNoteType → CLAIM_ACTIVITY_TYPE_CODE.
Operations and processes¶
- ClaimNotesService.CreateNote — see Operations and processes
Business rules¶
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
Services/SAIF.Services/Claims/Notes/ClaimNotesService.cs (L309)