Skip to content

clsTradingAsCollection

clsTradingAsCollection retrieves the full set of DBA names for a policy. It runs a policy-number-filtered inline query against TRADING_AS, materializes each returned row as clsTradingAs, and offers keyed lookup and predicate filtering over the in-memory set for consumers hanging off clsPolicyData.

Purpose

  • Retrieve all TRADING_AS rows for a policy by POLICY_NUM.
  • Materialize each row as a clsTradingAs instance so policy views can expose DBA names as child records.
  • Provide in-memory lookup, membership, and predicate filtering over the loaded DBA set.

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 clsTradingAs Returns the DBA record at a specific collection position.
Item Default Public ReadOnly Property Item(ByVal inTradingSeqNum As DECIMAL) As clsTradingAs Returns the DBA record keyed by trading sequence number.
CurrentItem Public Shadows ReadOnly Property CurrentItem() As clsTradingAs Returns the collection's current DBA selection.
Add Public Shadows Function Add(ByVal inTradingAs As clsTradingAs) As Integer Adds a DBA object to the in-memory collection.
Contains Public Overloads Function Contains(ByVal inTradingAs As clsTradingAs) As Boolean Reports whether an equivalent DBA object is already loaded.
Contains Public Overloads Function Contains(ByVal inTradingSeqNum As DECIMAL) As Boolean Reports whether the collection already contains a row for the supplied trading sequence.
ContainsDeleted Public Overloads Function ContainsDeleted(ByVal inTradingAs As clsTradingAs) As Boolean Reports whether an equivalent DBA object has been moved to the deleted list.
ContainsDeleted Public Overloads Function ContainsDeleted(ByVal inTradingSeqNum As DECIMAL) As Boolean Reports whether a deleted DBA entry matches the supplied trading sequence.
Remove Public Sub Remove(ByVal inTradingAs As clsTradingAs) Removes a specific DBA object from the in-memory list.
Remove Public Sub Remove(ByVal inTradingSeqNum As DECIMAL) Removes the first loaded DBA object with the supplied trading sequence number.
Where Public Function Where(ByVal match As Predicate(Of clsTradingAs)) As clsTradingAsCollection Returns a filtered clsTradingAsCollection based on a caller-supplied predicate.
GetTradingAsCollection Public Shared Function GetTradingAsCollection(ByVal inDataportal As IDataPortalInfo, ByVal inPolicyNumber As Decimal) As clsTradingAsCollection Retrieves all DBA rows for a policy through the data portal.
PolicyNumber Friend Property PolicyNumber() As Decimal Stores the policy number passed to the nested criteria query.
DataPortalInfo Friend Property DataPortalInfo() As IDataPortalInfo Carries the portal context used by the nested criteria object.
RetrieveSQL Friend ReadOnly Property RetrieveSQL() As String Supplies the inline SELECT over TRADING_AS filtered by POLICY_NUM.

Behavioral notes

  • BeforeRetrieve binds :PolicyNumber and runs the inline TRADING_AS query; AfterRetrieve creates a new clsTradingAs for every returned row.
  • Managed = True is set in the constructor, which indicates the collection relies on framework-managed list behavior rather than standalone object lifecycle handling.*
  • The collection has no custom rules; it acts as a read-only child set attached to policy data.

Constraints and usage notes

  • This page omits inherited members because clsBusinessCollectionBase is external.
  • Create/insert/update/delete criteria throw InvalidSQLProperty, aligning this collection with BR-VP-027.
  • Use the sequence-number indexer when callers need one exact DBA row; Where is better suited for type-based filtering such as prior-legal entries.

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/clsTradingAsCollection.vb
  • SAIF.Business.View.Policy/clsTradingAs.vb