Skip to content

SQL-012: Create CbpServiceDescriptionStateless via InsertServiceDescription

This ORM statement performs a create operation on CbpServiceDescriptionStateless via InsertServiceDescription, executed from Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs (L216).

Classification

Field Value
SQL ID SQL-012
Operation type Create
Execution method ORM (IRepository.Add)
Database Oracle
Schema [unqualified]**
Command type N/A (ORM-generated)
Business object CbpServiceDescriptionStateless
Criteria property N/A — ORM
Lifecycle method InsertServiceDescription

Parameters

Parameter Direction Type Max length Description
:Service Input String N/A Composite-key part
:ServiceType Input String N/A Composite-key part
:EffectiveDate Input DateTime N/A Composite-key part
:UpdateNumber Input int N/A Version column (Version()); NHibernate writes its initial value
:ExpirationDate Input DateTime? N/A
:Text Input string N/A
:UpdateUser Input string N/A
:UpdateDate Input DateTime N/A

Tables

Table Access Columns used
CBP_SERVICE_DESCRIPTION INSERT BILL_SERVICE_CODE, BILL_SERVICE_TYPE_CODE, SERVICE_DESCR_EFF_DATE, UPDATE_NUM, SERVICE_DESCR_EXP_DATE, SERVICE_DESCR_TEXT, UPDATE_USER, UPDATE_DATE

LINQ statement

Source: Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs:216.

// Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs:216
unitOfWork.GetRepository<CbpServiceDescriptionStateless>().Add(cbpServiceDescription);

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
INSERT INTO CBP_SERVICE_DESCRIPTION (
  BILL_SERVICE_CODE,
  BILL_SERVICE_TYPE_CODE,
  SERVICE_DESCR_EFF_DATE,
  UPDATE_NUM,
  SERVICE_DESCR_EXP_DATE,
  SERVICE_DESCR_TEXT,
  UPDATE_USER,
  UPDATE_DATE)
VALUES (
  :Service,
  :ServiceType,
  :EffectiveDate,
  :UpdateNumber,
  :ExpirationDate,
  :Text,
  :UpdateUser,
  :UpdateDate)

Translation notes: - Composite identifier (CompositeId()) with no generator: every key part is supplied by the caller. A stateful SaveOrUpdate on a composite-key entity may first issue a SELECT by the key columns to decide between INSERT and UPDATE unless the version unsaved-value identifies the instance as transient. - UPDATE_NUM is the optimistic-concurrency version column (Version(x => x.UpdateNumber)); NHibernate sets its initial value on INSERT.

Operations and processes

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services/Claims/ICDCodeService/Icd10CodeService.cs (L216)