Skip to content

Retrieve the most recent premium set for a policy period

Caller needs the current premium picture for a policy period

Field Value
Operation ID OP-001
Trigger Caller needs the current premium picture for a policy period
Inputs Policy number, policy period effective date, database selection (PremiumSetDatabases)*
Outputs A populated clsPremiumSet, or a "new"/empty instance when no row exists*
Primary components clsPremiumSet.GetMostRecentPremiumSet (two overloads)
Entry point Business\SAIF.Business.Policy.Premium\clsPremiumSet.vb

Steps

  1. The caller invokes the shared factory GetMostRecentPremiumSet, supplying policy identity and the target database.
  2. A nested Criteria instance is built with RetrievalMode = RetrievalModes.MostRecent, which selects the "most recent" variant of the retrieve SQL. (SQL: PREM_HIST_SUMMARY or PREM_HIST_SUMMARY_VIEW@POLDB depending on database selection.)
  3. BeforeRetrieve obtains a data request via DAL.GetPortalRequest(inDpi.PortalID) (clsPremiumSet.vb:676), sets the criteria RetrieveSQL, and adds parameters via AddParm.
  4. ProcessPortalRequest executes the request against Oracle.
  5. AfterRetrieve calls Fill() to populate properties from the returned reader and MarkOld() to reset the dirty/new state.
  6. Branch/error: if no row is returned, the object remains new; callers are expected to test the new/valid state before use.*

Process flow

The following diagram visualizes this operation's control flow.


flowchart TD

    Start([Trigger]) --> S1[Step 1]

    S1 --> S2[Step 2]

    S2 --> EndOk([Outputs returned])

Failure and edge-case behavior

  • See the linked rules and SQL references above for validation failures, null-handling, and persistence contention behavior.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Business\SAIF.Business.Policy.Premium\clsPremiumSet.vb