---
title: clsAffiliatedPolicyCollection
summary: API reference for clsAffiliatedPolicyCollection.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-31
library: SAIF.Business.View.Policy
reference_type: package
---

# clsAffiliatedPolicyCollection

`clsAffiliatedPolicyCollection` loads the policies affiliated with a given policy under a given affiliate type and then narrows the result to what the requesting agent or agency is entitled to see. The filtering happens after retrieval, inside the collection itself, which means a consumer cannot accidentally bypass it by reading the underlying rows.

## Purpose

- Retrieves the affiliated policies for a policy and affiliate type ([Retrieve affiliated policies](../../operations/retrieve-affiliated-policies.md)).
- Removes affiliated policies that do not belong to the requesting agent or agency ([BR-020](../../business-rules.md#br-020-affiliated-policies-are-filtered-to-the-requesting-agent-or-agency-when-specified)).
- Tracks a current item so that a consumer can navigate an affiliation list without external state.

## Context

- Namespace: `SAIF.Business.View.Policy`
- Assembly/package: `SAIF.BOF.Business.View.Policy`
- Declared in: `Business/SAIF.Business.View.Policy/clsAffiliatedPolicyCollection.vb`

## Public members

| Member | Signature | Purpose |
| --- | --- | --- |
| CurrentItem | `Public Shadows ReadOnly Property CurrentItem() As clsAffiliatedPolicy` | The affiliated policy last selected through `SetCurrent`. |
| MyCriteria | `Public ReadOnly Property MyCriteria() As Criteria` | The criteria this instance was retrieved with. |
| Contains | `Public Overloads Function Contains(ByVal inAffiliatedPolicy As clsAffiliatedPolicy) As Boolean` | Reports whether a member is present in the collection. |
| Contains | `Public Overloads Function Contains(ByVal inPolicyKey As String) As Boolean` | Reports whether a member is present in the collection. |
| SetCurrent | `Public Overloads Sub SetCurrent(ByVal inPolicyNum As String)` | Selects the member that `CurrentItem` returns. |
| GetAffiliatedPolicyCollection | `Public Shared Function GetAffiliatedPolicyCollection(ByVal inDataportal As IDataPortalInfo, ByVal inPolicyNum As Decimal, ByVal inAffiliateType As clsPolicyData.AffiliateTypes) As clsAffilia …` | Retrieves the affiliated policies of a policy for a given affiliate type, filtered to what the requesting agent or agency may see ([BR-020](../../business-rules.md#br-020-affiliated-policies-are-filtered-to-the-requesting-agent-or-agency-when-specified)). |
| GetAffiliatedPolicyCollection | `Public Shared Function GetAffiliatedPolicyCollection(ByVal inCriteria As Criteria) As clsAffiliatedPolicyCollection` | Retrieves the affiliated policies described by a criteria object ([Retrieve affiliated policies](../../operations/retrieve-affiliated-policies.md)). |

## Inherited public members

Members in this section are inherited from `clsBusinessCollectionBase` in `SAIF.Framework.Core`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| CurrentItem | `Public Overridable ReadOnly Property CurrentItem() As Object` | The member most recently selected through `SetCurrent`; collections in this library shadow it to return their own element type.† | `SAIF.Framework.Core` — `clsBusinessCollectionBase` |
| Count | `Public ReadOnly Property Count() As Integer` | Number of live members, excluding items moved to the deleted list.† | `SAIF.Framework.Core` — `clsBusinessCollectionBase` |
| Add | `Public Overridable Function Add(ByVal inItem As Object) As Integer` | Appends a member and returns its ordinal position.† | `SAIF.Framework.Core` — `clsBusinessCollectionBase` |
| Contains | `Public Overridable Function Contains(ByVal inItem As Object) As Boolean` | Reports whether a member is present in the live collection.† | `SAIF.Framework.Core` — `clsBusinessCollectionBase` |
| SetCurrent | `Public Overridable Sub SetCurrent(ByVal inKey As Object)` | Selects the member that `CurrentItem` will return.† | `SAIF.Framework.Core` — `clsBusinessCollectionBase` |
| IsValid | `Public Overridable ReadOnly Property IsValid() As Boolean` | Reports whether the object currently breaks any registered business rule.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| IsSavable | `Public Overridable ReadOnly Property IsSavable() As Boolean` | Reports whether the object may be written back; the read-only types in this library override it to refuse persistence.† | `SAIF.Framework.Core` — `clsBusinessBase` |
| BrokenRulesCollection | `Public ReadOnly Property BrokenRulesCollection() As clsBrokenRulesCollection` | Carries the messages for the rules currently broken, which is what drives `IsValid` to false.† | `SAIF.Framework.Core` — `clsBusinessBase` |

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence. Statements marked with `**` could
> not be confirmed; treat as unknown until verified.

## Sources

- `Business/SAIF.Business.View.Policy/clsAffiliatedPolicyCollection.vb`
