Retrieve hazard groups effective on a date¶
Loads all hazard groups in force on a caller-supplied effective date, returning a populated clsHazardGroupCollection.
| Field | Value |
|---|---|
| Operation ID | op-01-retrieve-hazard-groups |
| Trigger | Caller invokes GetHazardGroups (or the deprecated <Obsolete> twin GetHazardGroupCollection) |
| Inputs | IDataPortalInfo, effective date |
| Outputs | Populated clsHazardGroupCollection |
| Primary components | clsHazardGroupCollection.GetHazardGroups, Criteria |
| Entry point | SAIF.Business.Policy/clsHazardGroupCollection.vb |
Steps¶
- Construct
Criteria(inDataportal, inEffectiveDate), storing the effective date on the criteria object. No validation of the date is performed (BR-POL-002). - Call
inDataportal.DataAccessLayer.RetrieveObject(criteria)— delegates to the BOF data portal inSAIF.BOF.Framework(framework-inherited; retrieval orchestration is implemented in the framework, not here).* - Framework invokes
BeforeRetrieve: creates a newIDataRequest, assignsMyCriteria.RetrieveSQL(SQL-002, table HAZARD_GROUP), and binds parameterEffectiveDatefromMyCriteria.EffectiveDate(BR-POL-001). - Framework executes the request against Oracle.
- Framework invokes
AfterRetrieve: castsinPortalRequest.DataRequest(0).ResulttoIDataReaderand loopsReader.Read. - Per row:
New clsHazardGroup→child.Load(CriteriaObject.DataPortalInfo, Reader)→Add(child)(see Hydrate a hazard group from a reader). - Returns
Me(the collection) to the caller; result is cast toclsHazardGroupCollection.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["Caller invokes<br>GetHazardGroups"]) --> A["Construct Criteria with<br>effective date"]
A --> B["RetrieveObject via BOF data<br>portal"]
B --> C["BeforeRetrieve assigns<br>RetrieveSQL and binds<br>EffectiveDate"]
C --> D["Framework executes request<br>against Oracle"]
D --> E["AfterRetrieve reads rows via<br>reader"]
E --> F{More rows?}
F -->|Yes| G["New clsHazardGroup / Load /<br>Add to collection"]
G --> F
F -->|No| End(["Return populated<br>clsHazardGroupCollection"])
Failure and edge-case behavior¶
- An empty result set yields an empty collection; no explicit exception handling — data-access exceptions propagate to the caller.
IDataAccess.RetrieveObjectand portal-request execution are implemented inSAIF.BOF.Framework(NuGet). Their internal step sequence was not retrieved for this run.**
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.
Related documentation¶
Sources¶
SAIF.Business.Policy/clsHazardGroupCollection.vb