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¶
- Build either a single-object criteria with
AgencyContractSeqNumor a collection criteria with an optionalAgencySeqNumscope. - Pass the criteria to the BOF data portal so the retrieve lifecycle executes on behalf of the target object (BR-024).
- For single-object retrieval, assign SQL-003 and bind
:AgencyContractSeqNumagainst AGENCY_CONTRACT (BR-025). - For collection retrieval, assign SQL-004 and bind
:AgencySeqNumonly when the collection is scoped to one agency (BR-010). - Hydrate one contract or many contracts from the returned reader; missing keyed rows remain default-initialized (BR-001).
- 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.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Agency\clsAgencyContract.vbBusiness\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb