clsAffiliatedPolicyCollection¶
clsAffiliatedPolicyCollection is the legacy affiliated-policy list for a policy. It calls pk72846_view_policy.getpolicyaffiliatelist, materializes each row as clsAffiliatedPolicy, filters the result by requesting agent or agency when those criteria are present, and supplies the obsolete affiliate view that clsPolicyData still uses for compatibility alongside the newer association model.
Purpose¶
- Retrieve affiliated-policy rows from
pk72846_view_policy.getpolicyaffiliatelistfor the requested policy and affiliate type. - Filter the returned list by agent or agency context, supporting the behavior summarized in BR-VP-012.
- Provide the legacy affiliate list whose display and inclusion behavior is governed by BR-VP-011 and BR-VP-013.
Context¶
- Namespace:
SAIF.Business.View.Policy - Assembly/package:
SAIF.Business.View.Policy(embedded)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Item |
Default Public ReadOnly Property Item(ByVal Index As Integer) As clsAffiliatedPolicy |
Returns the affiliated-policy row at a specific collection position. |
Item |
Default Public ReadOnly Property Item(ByVal inPolicyKey As String) As clsAffiliatedPolicy |
Returns the affiliated-policy row identified by its policy key. |
CurrentItem |
Public Shadows ReadOnly Property CurrentItem() As clsAffiliatedPolicy |
Returns the currently selected affiliated-policy row. |
MyCriteria |
Public ReadOnly Property MyCriteria() As Criteria |
Exposes the retrieval and filtering criteria used to build the collection. |
Contains |
Public Overloads Function Contains(ByVal inAffiliatedPolicy As clsAffiliatedPolicy) As Boolean |
Reports whether an equivalent affiliated-policy row is already present. |
Contains |
Public Overloads Function Contains(ByVal inPolicyKey As String) As Boolean |
Reports whether a row with the supplied policy key is present. |
SetCurrent |
Public Overloads Sub SetCurrent(ByVal inPolicyNum As String) |
Moves the collection's current selection to the row whose key matches the supplied policy number string. |
GetAffiliatedPolicyCollection |
Public Shared Function GetAffiliatedPolicyCollection(ByVal inDataportal As IDataPortalInfo, ByVal inPolicyNum As Decimal, ByVal inAffiliateType As clsPolicyData.AffiliateTypes) As clsAffiliatedPolicyCollection |
Retrieves the legacy affiliate list for a policy and affiliate type. |
GetAffiliatedPolicyCollection |
Public Shared Function GetAffiliatedPolicyCollection(ByVal inCriteria As Criteria) As clsAffiliatedPolicyCollection |
Retrieves or creates the collection directly from a fully prepared criteria object. |
PreferredAssociationType |
Public Property PreferredAssociationType() As AssociationTypes |
Carries the preferred association type that child clsAffiliatedPolicy.Policy objects propagate into the full clsPolicyData they lazily load. |
PolicyNum |
Public Property PolicyNum() As Decimal |
Stores the source policy number used to retrieve affiliated rows. |
RetrieveSQL |
Friend ReadOnly Property RetrieveSQL() As String |
Names the stored procedure used to fetch affiliated-policy rows. |
Behavioral notes¶
BeforeRetrievesendsin_policy_num,in_affiliate_type, andin_include_affil_totalstopk72846_view_policy.getpolicyaffiliatelist, thenAfterRetrievematerializes each reader row asclsAffiliatedPolicy.AfterRetrieveadds all rows when no agent/agency filter is provided, otherwise keeps only rows whose agent number or agency sequence matches the criteria, implementing the filtering described by BR-VP-012.- The collection sets its current item to the source policy after retrieval, aligning with the broader legacy-affiliate behavior that a policy is always affiliated with itself under BR-VP-011.*
- When
AffiliateTypeisNonAffiliated,GetAffiliatedPolicyCollection(Criteria)creates an empty collection rather than running the retrieval procedure, which supports the display gating summarized by BR-VP-013.*
Constraints and usage notes¶
- This is legacy compatibility API; analysis states consumers should prefer the newer associations model when possible.
- Inherited members are omitted because
clsBusinessCollectionBaseis external. - Create/insert/update/delete criteria throw
InvalidSQLProperty, consistent with BR-VP-027.
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/clsAffiliatedPolicyCollection.vbSAIF.Business.View.Policy/clsAffiliatedPolicy.vbSAIF.Business.View.Policy/clsPolicyData.vb