CodeMaps¶
Provides the shared entry points that construct, cache, and optionally refresh the policy code-map objects. Callers use this type instead of newing the map classes directly because their constructors are Friend-scoped.
Purpose¶
- Centralize creation of the policy code-map objects.
- Cache one instance of each map in a
Staticlocal for reuse across calls. - Provide an explicit
refreshswitch when callers need to repopulate the cache from the database.
Context¶
- Namespace:
SAIF.Business.Policy.CodeMaps - Assembly/package:
SAIF.Business.Policy
Public members¶
| Member | Signature | Purpose |
|---|---|---|
GetBenefitJurisdictionCodeMap |
Public Shared Function GetBenefitJurisdictionCodeMap(ByVal inDPI As IDataPortalInfo, Optional ByVal refresh As Boolean = False) As clsBenefitJurisdictionCodeMap |
Returns the cached benefit-jurisdiction map, rebuilding it from the database when the cache is empty or refresh is True. |
GetManualClassTypeCodeMap |
Public Shared Function GetManualClassTypeCodeMap(ByVal inDPI As IDataPortalInfo, Optional ByVal refresh As Boolean = False) As clsManualClassTypeCodeMap |
Returns the cached manual-class-type map, rebuilding it from the database when the cache is empty or refresh is True. |
Behavioral notes¶
- Each factory method stores its cache in a
Staticlocal variable scoped to the function. - Refreshing a map replaces the cached instance by calling the corresponding
Friendconstructor again.
Constraints and usage notes¶
- Both factory methods require
IDataPortalInfobecause the map constructors fetch data through the framework data-access layer.
Sources¶
SAIF.Business.Policy\CodeMaps\clsBenefitJurisdictionCodeMap.vbSAIF.Business.Policy\CodeMaps\clsManualClassTypeCodeMap.vb