Skip to content

PolicyAssociationList

This list type is the library's shared retrieval entry point for the current policy-association model. It wraps List(Of PolicyAssociation) with typed filters plus the two shared database helpers that execute the UNION query (SQL-034) and the maximum-effective-date query (SQL-035), applying the library defaults for source-policy suppression and missing date inputs (BR-VP-014, BR-VP-024).

Purpose

  • Materialize association rows from Oracle into an in-memory list that callers can enumerate or filter by association type.
  • Provide the canonical shared factory used by clsPolicyData.Associations and related callers to build the current association list from manual relationships, policy relationships, discount combinations, and ER combinations.*
  • Apply default query dates when callers omit them, using the request date and the policy's maximum effective date per BR-VP-024.
  • Exclude the source policy from returned rows unless the caller explicitly opts in, enforcing BR-VP-014.

Context

  • Namespace: SAIF.Business.View.Policy
  • Assembly/package: SAIF.Business.View.Policy (embedded)

Public members

Member Signature Purpose
AssociationType Public ReadOnly Property AssociationType(ByVal inAssociationType As AssociationTypes) As IEnumerable(Of PolicyAssociation) Returns only the rows whose normalized association type matches the requested category, using the PolicyAssociationExtensions.AssociationType filter.
PolicyNumbers Public ReadOnly Property PolicyNumbers(ByVal inAssociationType As AssociationTypes) As IEnumerable(Of Decimal) Returns the related policy numbers from the current list for downstream membership and navigation checks.*
GetPolicyAssociationList Public Shared Function GetPolicyAssociationList(ByVal inDPI As IDataPortalInfo, ByVal inPolicyNumber As Decimal, Optional ByVal IncludeSourcePolicy As Boolean = False, Optional ByVal inAsOfDate As Date = Nothing) As IEnumerable(Of PolicyAssociation) Executes the combined association query, converts each row into PolicyAssociation, and returns the resulting list with optional inclusion of the source policy.
GetMaxPolicyEffectiveDate Public Shared Function GetMaxPolicyEffectiveDate(ByVal inDPI As IDataPortalInfo, ByVal inPolicyNumber As Decimal) As Date Reads the latest policy-period effective date used as the fallback combined-policy-period date when the caller does not supply association dates.

Behavioral notes

  • GetPolicyAssociationList sends one SQL statement built from ManualAffiliationSQL, PolicyRelationshipSQL, DiscountCombinationSQL, and ERCombinationSQL, so one call can return manual, direct, and combination relationships together.
  • When inAsOfDate is omitted, the method uses the DPI data-source date for experience-combination comparisons and GetMaxPolicyEffectiveDate for discount-combination comparisons, matching BR-VP-024.
  • Returned rows are filtered after materialization so the source policy is omitted unless IncludeSourcePolicy is True, matching BR-VP-014.
  • Relationship strings such as WRAP, M.PHP, DiscountCombination, and ExperienceCombination are normalized through ConvertAssociationType before rows are added to the list.

Constraints and usage notes

  • This type inherits List(Of PolicyAssociation), so standard List operations remain available in addition to the documented members.
  • The public PolicyNumbers property ignores its inAssociationType parameter and returns Me.Cast(Of PolicyAssociation).PolicyNumbers directly; the signature suggests typed filtering, but the implementation does not apply it.
  • The retrieval logic depends on Oracle-side procedures/tables and query semantics that are not available in this repository, so database-side edge cases beyond the documented rules remain unverified.**

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

  • SAIF.Business.View.Policy/PolicyAssociations.vb