Skip to content

Retrieve agency contracts

This operation executes either the single-contract retrieve path or the collection retrieve path over AGENCY_CONTRACT.

Field Value
Operation ID OP-006
Trigger A caller invokes clsAgencyContract.GetAgencyContract or clsAgencyContractCollection.GetAgencyContractCollection.
Inputs IDataPortalInfo, contract sequence number and/or agency sequence number
Outputs clsAgencyContract or clsAgencyContractCollection
Primary components clsAgencyContract, clsAgencyContractCollection, nested Criteria classes
Entry point Business\SAIF.Business.Policy.Agency\clsAgencyContract.vb, Business\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb

Steps

  1. Build either a single-object criteria with AgencyContractSeqNum or a collection criteria with an optional AgencySeqNum scope.
  2. Pass the criteria to the BOF data portal so the retrieve lifecycle executes on behalf of the target object (BR-024).
  3. For single-object retrieval, assign SQL-003 and bind :AgencyContractSeqNum against AGENCY_CONTRACT (BR-025).
  4. For collection retrieval, assign SQL-004 and bind :AgencySeqNum only when the collection is scoped to one agency (BR-010).
  5. Hydrate one contract or many contracts from the returned reader; missing keyed rows remain default-initialized (BR-001).
  6. Expose the loaded contracts for later classification and producer-commission checks (BR-011, BR-013).

Process flow

The following diagram visualizes the two contract retrieve paths.

flowchart TD
  Start([Contract request]) --> Type{Single or collection?}
  Type -->|Single| One[Run SQL-003]
  Type -->|Collection| Many[Run SQL-004]
  One --> FillOne[Fill clsAgencyContract]
  Many --> FillMany[Load clsAgencyContractCollection]
  FillOne --> End([Contracts returned])
  FillMany --> End

Failure and edge-case behavior

  • The collection path returns all contracts when no agency scope is supplied.
  • Missing keyed rows return a default-initialized contract object.

Sources

  • Business\SAIF.Business.Policy.Agency\clsAgencyContract.vb
  • Business\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb