Skip to content

SQL-003: Create BatchProviderAddress via InsertNewProviderAddress

This ORM statement performs a create operation on BatchProviderAddress via InsertNewProviderAddress, executed from Services/SAIF.Services/AddressVerificationService/AddressVerificationService.cs (L310).

Classification

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

Parameters

Parameter Direction Type Max length Description
:Id Input long N/A Identifier from PROVIDER_ADDRESS_SEQ.NEXTVAL
:UpdateNumber Input int N/A Version column (Version()); NHibernate writes its initial value
:City Input string N/A
:CountryCode Input string N/A
:EffectiveDate Input DateTime N/A
:ExpirationDate Input DateTime? N/A
:Line1 Input string N/A
:Line2 Input string N/A
:Line3 Input string N/A
:Line4 Input string N/A
:ZipCodeExtension Input string N/A
:StateCode Input string N/A
:ZipCode Input string N/A
:UpdateDate Input DateTime N/A
:UpdateUser Input string N/A
:IsForeign Input bool N/A Bound as 'Y'/'N' (YesNoType)
:AddressType Input string N/A
:ProviderLocationId Input long N/A

Tables

Table Access Columns used
PROVIDER_ADDRESS INSERT PROVIDER_ADDRESS_SEQ_NUM, UPDATE_NUM, CITY_NAME, COUNTRY_CODE, EFF_DATE, EXP_DATE, ADDRESS_LINE1, ADDRESS_LINE2, ADDRESS_LINE3, ADDRESS_LINE4, ZIP_CODE_EXT, STATE_CODE, ZIP_CODE, UPDATE_DATE, UPDATE_USER, FOREIGN_ADDRESS_FLAG, PROVIDER_ADDRESS_CODE, PROVIDER_LOCATION_SEQ_NUM (identifier from sequence PROVIDER_ADDRESS_SEQ.NEXTVAL)

LINQ statement

Source: Services/SAIF.Services/AddressVerificationService/AddressVerificationService.cs:310.

// Services/SAIF.Services/AddressVerificationService/AddressVerificationService.cs:310
_unitOfWork.GetRepository<BatchProviderAddress>().Add(newProv);

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 PROVIDER_ADDRESS_SEQ.NEXTVAL
FROM DUAL

INSERT INTO PROVIDER_ADDRESS (
  PROVIDER_ADDRESS_SEQ_NUM,
  UPDATE_NUM,
  CITY_NAME,
  COUNTRY_CODE,
  EFF_DATE,
  EXP_DATE,
  ADDRESS_LINE1,
  ADDRESS_LINE2,
  ADDRESS_LINE3,
  ADDRESS_LINE4,
  ZIP_CODE_EXT,
  STATE_CODE,
  ZIP_CODE,
  UPDATE_DATE,
  UPDATE_USER,
  FOREIGN_ADDRESS_FLAG,
  PROVIDER_ADDRESS_CODE,
  PROVIDER_LOCATION_SEQ_NUM)
VALUES (
  :Id,
  :UpdateNumber,
  :City,
  :CountryCode,
  :EffectiveDate,
  :ExpirationDate,
  :Line1,
  :Line2,
  :Line3,
  :Line4,
  :ZipCodeExtension,
  :StateCode,
  :ZipCode,
  :UpdateDate,
  :UpdateUser,
  :IsForeign,
  :AddressType,
  :ProviderLocationId)

Translation notes: - :Id is the value fetched from sequence PROVIDER_ADDRESS_SEQ (GeneratedBy.Native("PROVIDER_ADDRESS_SEQ")) before the INSERT; NHibernate assigns it to BatchProviderAddress.Id. - UPDATE_NUM is the optimistic-concurrency version column (Version(x => x.UpdateNumber)); NHibernate sets its initial value on INSERT. - :IsForeign are bound as 'Y' / 'N' (YesNoType).

Operations and processes

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

Sources

  • Services/SAIF.Services/AddressVerificationService/AddressVerificationService.cs (L310)