clsLegacyTaskCodeCollection¶
clsLegacyTaskCodeCollection loads the entire LEGACY_TASK_CODE reference table in one unfiltered SELECT * and exposes it as a read-only, code-lookup collection.
Purpose¶
- Loads all legacy task code rows in a single retrieval (Load the legacy task code table, SQL-002).
- Provides membership and lookup access over the loaded code set without exposing any write path (BR-LTC-01).
Context¶
- Namespace:
SAIF.Business.Tasks.Claim - Assembly/package:
SAIF.Business.Tasks.Claim.dll(embedded)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Item(Integer) |
Public Default ReadOnly Property Item(index As Integer) As clsLegacyTaskCode |
Returns the row at the given ordinal position. |
Item(legacyTaskCode As String) |
Public Overloads ReadOnly Property Item(legacyTaskCode As String) As clsLegacyTaskCode |
Returns the row matching the given legacy task code natural key. |
MyCriteria |
Public Property MyCriteria As Criteria |
Exposes the criteria object holding the single inline RetrieveSQL for the code table. |
Shared GetLegacyTaskCodeCollection(dpi) |
Public Shared Function GetLegacyTaskCodeCollection(dpi As IDataPortalInfo) As clsLegacyTaskCodeCollection |
Factory that loads the entire code table (Load the legacy task code table). |
Shadows Add(clsLegacyTaskCode) |
Public Shadows Sub Add(row As clsLegacyTaskCode) |
Adds a row to the in-memory collection during load. |
Contains(clsLegacyTaskCode) |
Public Overloads Function Contains(row As clsLegacyTaskCode) As Boolean |
Reports whether the collection contains the given row instance. |
Contains(String) |
Public Overloads Function Contains(legacyTaskCode As String) As Boolean |
Reports whether the collection contains a row matching the given code. |
Overrides BeforeRetrieve |
Protected Overrides Sub BeforeRetrieve(...) |
Creates the data request and assigns MyCriteria.RetrieveSQL (SQL-002). |
Overrides AfterRetrieve |
Protected Overrides Sub AfterRetrieve(...) |
Iterates the returned reader, building, loading, and adding each clsLegacyTaskCode row. |
Behavioral notes¶
Addis declaredAs Integerbut has noReturnstatement (the compiler warning is suppressed by the project'sNoWarnlist), so it always returns 0; whether callers depend on the returned index is unknown.**- Both
Contains(String)overloads compare aclsLegacyTaskCodeagainst aStringviaEquals, which always returnsFalse— this appears to be a code-generation defect rather than intended behavior.*
Constraints and usage notes¶
- All non-
RetrieveSQLproperties onCriteriathrowApplicationException(clsConstants.Messages.InvalidSQLProperty), enforcing read-only access (BR-LTC-01). - There is no factory path that filters by code — every call loads the full table.*
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.Tasks.Claim/clsLegacyTaskCodeCollection.vb