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¶
- Caller invokes
clsHazardGroupCollection.GetHazardGroups(inDataportal, inEffectiveDate)(shared/static factory). The olderGetHazardGroupCollectionoverload is marked<Obsolete("Use GetHazardGroups instead.")>and performs the identical call. - A
Criteriaobject is constructed with the effective date and passed toinDataportal.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. BeforeRetrievebuilds the request fromMyCriteria.RetrieveSQL(SQL-002, against HAZARD_GROUP) and adds parameterEffectiveDate.- The framework executes the data-portal request.
Origin: Data-portal request execution is implemented in
SAIF.Framework.Coreand executed on behalf of this operation. AfterRetrievereads theIDataReaderresult; for each row it creates a newclsHazardGroup, callschild.Load(CriteriaObject.DataPortalInfo, Reader), and adds it to the collection.clsHazardGroup.LoadcallsFill(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-onlyCriteria, and callsMarkOld().Origin:
MarkOld()is a framework state-transition operation implemented inclsBusinessBase(SAIF.Framework.Core).- No business rule IDs are enforced in this path —
IsValid/IsSavablepurely delegate toMyBase.
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.*
Related documentation¶
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.vbSAIF.Business.Policy\clsHazardGroup.vb