Retrieve legacy task codes¶
This operation loads every row of the legacy_task_code lookup table into a clsLegacyTaskCodeCollection, giving callers an in-memory, indexable set of legacy task-code definitions (category, notepad flag, date/text day thresholds, and run-date usage) for translating legacy task codes into current task attributes. It is a simple, unfiltered, read-only lookup with no create, update, or delete path.
| Field | Value |
|---|---|
| Operation ID | OP-TC-05 |
| Trigger | Caller calls clsLegacyTaskCodeCollection.GetLegacyTaskCodeCollection(dpi) |
| Inputs | IDataPortalInfo only — the retrieve has no filter parameters |
| Outputs | Populated clsLegacyTaskCodeCollection containing every legacy_task_code row as a clsLegacyTaskCode |
| Primary components | clsLegacyTaskCodeCollection.GetLegacyTaskCodeCollection, clsLegacyTaskCodeCollection.BeforeRetrieve, clsLegacyTaskCodeCollection.AfterRetrieve, clsLegacyTaskCode.Load, clsLegacyTaskCode.Fill |
| Entry point | Business\SAIF.Business.Tasks.Claim\clsLegacyTaskCodeCollection.vb |
Steps¶
- The caller invokes
GetLegacyTaskCodeCollection(dpi), which callsdpi.DataAccessLayer.RetrieveObject(New Criteria(dpi)). BeforeRetrieveconfigures the portal request as aText-type command usingMyCriteria.RetrieveSQL, which is the fixed statementselect * from legacy_task_code(SQL-002, legacy_task_code).AfterRetrievereads every row from the result set. For each row, it creates a newclsLegacyTaskCode, callsLoad(dpi, reader), and adds it to the collection.clsLegacyTaskCode.LoadcallsFill(reader), which populatesCreateDate,CreateUser,DateDaysNum,LegacyTaskCode,NotepadFlag,TaskCategoryCode,TextDaysNum,TaskText,UpdateDate,UpdateUser, andUseRunDateFlagdirectly from the named reader columns, then sets aCriteria(dpi, legacyTaskCode)on the object.- The caller looks up individual codes from the returned collection by ordinal
Item(index)or by code valueItem(legacyTaskCode); both are read-only indexers over the in-memoryList.
Process flow¶
The following diagram visualizes the unfiltered lookup-table load.
flowchart TD
Start([Caller calls GetLegacyTaskCodeCollection]) --> Before[BeforeRetrieve:<br>select * from legacy_task_code]
Before --> Execute[Portal request executes<br>against Oracle]
Execute --> After[AfterRetrieve: for each row,<br>create and Load a clsLegacyTaskCode]
After --> More{More rows?}
More -->|Yes| After
More -->|No| Done([Return populated collection])
Failure and edge-case behavior¶
- The retrieve has no filter parameters and no paging; every row in
legacy_task_codeis loaded on every call. - The
Criteriaclass'sCreateSQL,DeleteSQL,InsertSQL, andUpdateSQLproperties all throwApplicationException(clsConstants.Messages.InvalidSQLProperty), confirming this object supports only the retrieve path documented here. Item(legacyTaskCode)andContainsboth return a default/Falseresult for an unmatched code rather than raising an error.
Related documentation¶
Sources¶
Business\SAIF.Business.Tasks.Claim\clsLegacyTaskCode.vbBusiness\SAIF.Business.Tasks.Claim\clsLegacyTaskCodeCollection.vb