Skip to content

Retrieve hazard groups effective on a date

Loads all HAZARD_GROUP records active on a given effective date into a read-only clsHazardGroupCollection, following the standard BOF collection retrieve pattern.

Field Value
Operation ID OP-POL-001
Trigger Caller invokes clsHazardGroupCollection.GetHazardGroups(inDataportal, inEffectiveDate)
Inputs Data portal (inDataportal), effective date (inEffectiveDate)
Outputs Populated clsHazardGroupCollection
Primary components clsHazardGroupCollection.GetHazardGroups, clsHazardGroupCollection.Criteria, clsHazardGroup.Load/Fill
Entry point SAIF.Business.Policy\clsHazardGroupCollection.vb

Steps

  1. Caller invokes clsHazardGroupCollection.GetHazardGroups(inDataportal, inEffectiveDate) (shared/static factory). The older GetHazardGroupCollection overload is marked <Obsolete("Use GetHazardGroups instead.")> and performs the identical call.
  2. A Criteria object is constructed with the effective date and passed to inDataportal.DataAccessLayer.RetrieveObject(...) — this delegates into the framework's data-portal retrieve lifecycle.

    Origin: The retrieve-object dispatch mechanism is implemented in clsBusinessCollection (SAIF.Framework.Core) and executed on behalf of this operation.

  3. BeforeRetrieve builds the request from MyCriteria.RetrieveSQL (SQL-002, against HAZARD_GROUP) and adds parameter EffectiveDate.
  4. The framework executes the data-portal request.

    Origin: Data-portal request execution is implemented in SAIF.Framework.Core and executed on behalf of this operation.

  5. AfterRetrieve reads the IDataReader result; for each row it creates a new clsHazardGroup, calls child.Load(CriteriaObject.DataPortalInfo, Reader), and adds it to the collection.
  6. clsHazardGroup.Load calls Fill(datareader) to map ten columns (HAZARD_GROUP_ID, NCCI_HAZARD_GROUP_CODE, EFFECTIVE_DATE, EXPIRATION_DATE, HAZARD_GROUP_SHORT_DESCR, HAZARD_GROUP_LONG_DESCR, CREATE_DATE, CREATE_USER, UPDATE_DATE, UPDATE_USER), builds a retrieve-only Criteria, and calls MarkOld().

    Origin: MarkOld() is a framework state-transition operation implemented in clsBusinessBase (SAIF.Framework.Core).

  7. No business rule IDs are enforced in this path — IsValid/IsSavable purely delegate to MyBase.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([GetHazardGroups called]) --> S1[Build Criteria with EffectiveDate]
    S1 --> S2[RetrieveObject dispatch via data portal]
    S2 --> S3[BeforeRetrieve builds SQL-002 request]
    S3 --> S4[Framework executes data-portal request]
    S4 --> S5[AfterRetrieve reads IDataReader]
    S5 --> S6[Create clsHazardGroup, Load/Fill/MarkOld per row]
    S6 --> EndOk([Return clsHazardGroupCollection])

Failure and edge-case behavior

  • No explicit error handling is present in this path beyond the framework's own data-portal exception behavior.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Business.Policy\clsHazardGroupCollection.vb
  • SAIF.Business.Policy\clsHazardGroup.vb