Skip to content

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

  1. Build either a single-object criteria keyed by office number or a collection criteria keyed by agency sequence number.
  2. Pass the criteria through the BOF data portal retrieve lifecycle (BR-024).
  3. Apply the office-only AGENT predicate so only non-LOV-excluded agency or location rows qualify (BR-015).
  4. Execute SQL-005 for the keyed path or SQL-006 for the collection path against AGENT.
  5. Hydrate one office or many offices from the returned reader; missing keyed rows remain default-initialized (BR-001).
  6. 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.

Sources

  • Business\SAIF.Business.Policy.Agency\clsAgencyOffice.vb
  • Business\SAIF.Business.Policy.Agency\clsAgencyOfficeCollection.vb