Skip to content

Retrieve interested parties for a policy

This operation documents how clsInterestedPartyCollection.GetInterestedPartyCollection fulfills the policy-affiliate behavior described for SAIF.Business.Policy.Affiliate.

Field Value
Operation ID OP-004
Trigger A caller requests all interested parties that overlap a policy date window.
Inputs IDataPortalInfo, policy number, optional start date, optional end date
Outputs clsInterestedPartyCollection
Primary components clsInterestedPartyCollection.GetInterestedPartyCollection
Entry point Business\SAIF.Business.Policy.Affiliate\clsInterestedPartyCollection.vb

Steps

  1. Build the collection criteria from the policy number and requested window, defaulting to the full date range when the single-parameter overload is used.
  2. Assign SQL-005 in BeforeRetrieve and bind the policy and window parameters for BUSINESS_AFFILIATE and AFFILIATE.
  3. The query returns only type-1 rows, applies overlap-window filtering, and sorts by affiliate name (BR-AFF-003, BR-AFF-005, BR-AFF-006).
  4. Iterate the reader in AfterRetrieve, create a clsInterestedParty for each row, and load the child object from the shared joined result set.
  5. When the portal is already inside a pending transaction, pass collection-cached title and insured code tables into each child load so the child does not issue nested code-table lookups (BR-AFF-007).
  6. Return the populated collection.

Process flow

The following diagram shows the overlap-window query and the transactional cached-code-table branch during child hydration.

flowchart TD
  Start(["Caller requests policy interested parties"]) --> Criteria["Build collection Criteria;<br>default full window if single-arg overload"]
  Criteria --> Before["BeforeRetrieve: assign SQL-005<br>bind policy + window against BUSINESS_AFFILIATE + AFFILIATE"]
  Before --> Query["Query returns type-1 rows,<br>overlap-window filtered, sorted by name"]
  Query --> Iterate["AfterRetrieve: iterate reader"]
  Iterate --> TxnCheck{"Pending transaction open?"}
  TxnCheck -->|Yes| Cached["Pass collection-cached InterestedPartyTitles<br>and InsuredCodes into child Load"]
  TxnCheck -->|No| PerChild["Child loads its own code-table lookups"]
  Cached --> AddChild["Create clsInterestedParty and add to collection"]
  PerChild --> AddChild
  AddChild --> More{"More rows?"}
  More -->|Yes| Iterate
  More -->|No| Result(["Return populated collection"])

Failure and edge-case behavior

  • The collection constructor enables edit/remove/find behavior in memory, but the collection still cannot persist changes through this library.

Sources

  • Business\SAIF.Business.Policy.Affiliate\clsInterestedPartyCollection.vb