Skip to content

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

  1. Construct Criteria(inDataportal, inEffectiveDate), storing the effective date on the criteria object. No validation of the date is performed (BR-POL-002).
  2. Call inDataportal.DataAccessLayer.RetrieveObject(criteria) — delegates to the BOF data portal in SAIF.BOF.Framework (framework-inherited; retrieval orchestration is implemented in the framework, not here).*
  3. Framework invokes BeforeRetrieve: creates a new IDataRequest, assigns MyCriteria.RetrieveSQL (SQL-002, table HAZARD_GROUP), and binds parameter EffectiveDate from MyCriteria.EffectiveDate (BR-POL-001).
  4. Framework executes the request against Oracle.
  5. Framework invokes AfterRetrieve: casts inPortalRequest.DataRequest(0).Result to IDataReader and loops Reader.Read.
  6. Per row: New clsHazardGroup → child.Load(CriteriaObject.DataPortalInfo, Reader) → Add(child) (see Hydrate a hazard group from a reader).
  7. Returns Me (the collection) to the caller; result is cast to clsHazardGroupCollection.

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.RetrieveObject and portal-request execution are implemented in SAIF.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.

Sources

  • SAIF.Business.Policy/clsHazardGroupCollection.vb