Load a group's chapters¶
Lazily loads chapter rows for a group and guarantees that callers see at least one chapter object.
| Field | Value |
|---|---|
| Operation ID | OP-004 |
| Trigger | Caller reads clsGroupAssociation.Chapters or requests chapters directly |
| Inputs | — |
| Outputs | A clsChapterCollection, or a placeholder chapter when no rows exist. |
| Primary components | clsGroupAssociation.Chapters, clsChapterCollection.GetChapters |
| Entry point | Business\SAIF.Business.Policy.Group\clsChapterCollection.vb |
Steps¶
- On first access to
Chapters, the group callsclsChapterCollection.GetChapters(DataPortalInfo, Code). BeforeRetrievebinds:GroupAssociationCode;RetrieveSQLselects fromGROUP_CHAPTER.AfterRetrievefills oneclsChapterper row.- Branch — if the returned collection is empty, a placeholder chapter is added via
clsChapter.NewChapter(dpi, Code, "")(blank chapter code) so callers always have at least one chapter. (BR-005) - Callers filter with
ActiveChapters(selectDate)andGroupChaptersByCode(code). (BR-006) - Database statements executed or relied on by this operation: SQL-018; 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¶
- If no rows exist in GROUP_CHAPTER, the library seeds a placeholder chapter instead of returning an empty collection (BR-005).
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Group\clsChapterCollection.vb