Retrieve agency offices¶
This operation retrieves office rows from AGENT by reusing a predicate that limits results to non-LOV-excluded office or agency-location rows.
| Field | Value |
|---|---|
| Operation ID | OP-008 |
| Trigger | A caller invokes clsAgencyOffice.GetAgencyOffice or clsAgencyOfficeCollection.GetAgencyOfficeCollection. |
| Inputs | IDataPortalInfo, office number and/or agency sequence number |
| Outputs | clsAgencyOffice or clsAgencyOfficeCollection |
| Primary components | clsAgencyOffice, clsAgencyOfficeCollection, shared office SQL constant |
| Entry point | Business\SAIF.Business.Policy.Agency\clsAgencyOffice.vb, Business\SAIF.Business.Policy.Agency\clsAgencyOfficeCollection.vb |
Steps¶
- Build either a single-object criteria keyed by office number or a collection criteria keyed by agency sequence number.
- Pass the criteria through the BOF data portal retrieve lifecycle (BR-024).
- Apply the office-only
AGENTpredicate so only non-LOV-excluded agency or location rows qualify (BR-015). - Execute SQL-005 for the keyed path or SQL-006 for the collection path against AGENT.
- Hydrate one office or many offices from the returned reader; missing keyed rows remain default-initialized (BR-001).
- Expose the loaded offices to active and aggregation helpers (BR-016, BR-025).
Process flow¶
The following diagram visualizes the office retrieve paths.
flowchart TD
Start([Office request]) --> Type{Single or collection?}
Type -->|Single| One[Run SQL-005]
Type -->|Collection| Many[Run SQL-006]
One --> FillOne[Fill clsAgencyOffice]
Many --> FillMany[Load office collection]
FillOne --> End([Offices returned])
FillMany --> End
Failure and edge-case behavior¶
- Missing keyed rows return a default-initialized office object.
- Only rows matching the office/location predicate are ever returned from
AGENT.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Agency\clsAgencyOffice.vbBusiness\SAIF.Business.Policy.Agency\clsAgencyOfficeCollection.vb