Skip to content

SQL-069: Create XPrintControl via CreateXPrintControl

This ORM statement performs a create operation on XPrintControl via CreateXPrintControl, executed from Services/SAIF.Services/Legal/Subpoenas/ZeroPaySubpoenaProcess.cs (L230).

Classification

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

Parameters

Parameter Direction Type Max length Description
:Id Input external (SAIF.Framework.Core) N/A Property of XPrintControl
:DirectoryName Input external (SAIF.Framework.Core) N/A Property of XPrintControl
:DuplexMode Input external (SAIF.Framework.Core) N/A Property of XPrintControl (column pairing unresolved)
:ProcessedDate Input external (SAIF.Framework.Core) N/A Property of XPrintControl
:IdmPathName Input external (SAIF.Framework.Core) N/A Property of XPrintControl
:XmlFileName Input external (SAIF.Framework.Core) N/A Property of XPrintControl
:Md5HashValue Input external (SAIF.Framework.Core) N/A Property of XPrintControl

Tables

Table Access Columns used
XPRINT_CONTROL** INSERT XPRINT_CONTROL_SEQ_NUM, DIRECTORY_NAME, DUPLEX_CODE, PROCESSED_DATE, IDM_PATH_NAME, XML_FILE_NAME, MD5_HASH_VALUE

LINQ statement

Source: Services/SAIF.Services/Legal/Subpoenas/ZeroPaySubpoenaProcess.cs:230.

// Services/SAIF.Services/Legal/Subpoenas/ZeroPaySubpoenaProcess.cs:230
_unitOfWork.GetRepository<PrintData.XPrintControl>().Add(xPrintControl);

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 XPRINT_CONTROL (
  XPRINT_CONTROL_SEQ_NUM,
  DIRECTORY_NAME,
  DUPLEX_CODE, -- unresolved mapping: XPrintControl.DuplexMode (column pairing inferred)
  PROCESSED_DATE,
  IDM_PATH_NAME,
  XML_FILE_NAME,
  MD5_HASH_VALUE)
VALUES (
  :Id,
  :DirectoryName,
  :DuplexMode,
  :ProcessedDate,
  :IdmPathName,
  :XmlFileName,
  :Md5HashValue)

Translation notes: - XPrintControl (SAIF.Data.Model.Printing) is mapped outside this repository; no ClassMap<XPrintControl> exists in-repo. Legends confirms XPrintControlMap in SAIF.Framework.Data.NHibernate with table XPRINT_CONTROL, identifier column XPRINT_CONTROL_SEQ_NUM and GeneratedBy.Assigned(); the ClassMap source is not indexed. - GeneratedBy.Assigned(): :Id is supplied by the caller (for example Id = batchArguments.PrintControlSequenceNumber at BillPaymentService.cs:600). A stateful SaveOrUpdate with an assigned identifier may first issue a SELECT by XPRINT_CONTROL_SEQ_NUM to decide between INSERT and UPDATE. - The column list is taken from the documented ADO.NET INSERT in SAIF.Services.Printing.Remote (SQL-007-saif-services-printing-remote.md, via Legends); not ClassMap-verified. DuplexMode → DUPLEX_CODE is marked -- unresolved mapping. - The XPRINT_CONTROL table docs also list CREATE_DATE, and call sites set CreateDate, but the documented INSERT omits it and the ClassMap is unavailable, so whether NHibernate writes CREATE_DATE is unresolved (-- unresolved mapping: XPrintControl.CreateDate); it is not added to the INSERT. - Legends reports HasMany(XDocuments) as inverse; any cascade setting is not documented. XDOCUMENT rows are written by separate Add calls (SQL-060..064).

Operations and processes

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

Sources

  • Services/SAIF.Services/Legal/Subpoenas/ZeroPaySubpoenaProcess.cs (L230)