Skip to content

Create and persist a chapter

Creates a chapter object with criteria-derived keys and supports date-effective retrieval, but compiled source does not contain chapter persistence SQL.

Field Value
Operation ID OP-005
Trigger
Inputs —
Outputs A seeded chapter object or a retrieved effective chapter row.
Primary components clsChapter.NewChapter, clsChapter.GetChapter
Entry point Business\SAIF.Business.Policy.Group\clsChapter.vb

Steps

  1. NewChapter(dpi, groupAssociationCode, code) calls CreateObject; Create() copies GroupAssociationCode and Code from the criteria and calls MarkClean(). (BR-007)
  2. Persistence note: compiled source contains no live chapter insert, update, or delete SQL, so the object can be created in memory but not saved by this library.
  3. GetChapter(dpi, groupAssociationCode, code, selectDate) retrieves a chapter as of a date — the criteria carries a SelectDate used by RetrieveSQL to pick the effective row. (BR-008)
  4. Insert/update/delete follow the standard Before*/After* row-count pattern against GROUP_CHAPTER.
  5. Database statements executed or relied on by this operation: SQL-017; affected tables: GROUP_CHAPTER.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Trigger]) --> Step1[Build criteria / load state]
    Step1 --> Step2[Apply local business logic]
    Step2 --> Decision{Valid and complete?}
    Decision -->|Yes| Step3[Return data or persist rows]
    Decision -->|No| EndErr([Return BOF validation or SQL-state issues])
    Step3 --> EndOk([Operation completes])

Failure and edge-case behavior

  • The retrieve path is date-effective through SQL-017, but there is no compiled write SQL for chapters.**

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Business\SAIF.Business.Policy.Group\clsChapter.vb