SAIF.Business.Policy architecture¶
SAIF.Business.Policy is a mid-tier VB.NET class library with no program entry points, functioning as a shared "base" policy library.* It provides a small set of read-only BOF business objects, cached code-table lookups, cross-cutting interfaces/enums/constants, and a static ad hoc data-access helper class, and it has zero local project dependencies within this repository.
Responsibilities¶
- Provide retrieve-only BOF business objects —
clsHazardGroupandclsHazardGroupCollection— for hazard-group code/rate classification lookups. - Provide cached, lazily-loaded code-table lookup wrappers (
clsBenefitJurisdictionCodeMap,clsManualClassTypeCodeMap) built on the framework'sclsCodeTableBase.ExtendedCodeMap†. - Define cross-cutting contracts, enums, and constants consumed by richer downstream policy libraries and by the presentation/view business tier:
IPolicyHeaderDataProvider,IPolicyAssociationType,IPolicyAssociation,IPolicyHeaderAssociation,iPeriodRatingInfo,iPolicyPeriodBase,Enums,Constants. - Supply ad hoc, static scalar/stored-procedure data-access helpers via
PolicyInformation(e.g., maximum policy effective date, policy-period expiration date, anniversary rate date, market type) that bypass the standard BOF business-object pattern.
Component boundaries¶
- BOF business objects (
clsHazardGroup,clsHazardGroupCollection): retrieve-only objects following the standard frameworkCriteria/IBusinessCriteriapattern; all mutating SQL properties throwApplicationException. - Code-table maps (
CodeMaps\clsBenefitJurisdictionCodeMap,CodeMaps\clsManualClassTypeCodeMap): cached lookup wrappers exposed only throughFriend-constructor factory methods on theCodeMapsstatic class. - Cross-layer contracts (
IPolicyHeaderDataProvider,IPolicyAssociationType,IPolicyAssociation,IPolicyHeaderAssociation,iPeriodRatingInfo,iPolicyPeriodBase,PeriodRatingInfoExtensions): interfaces/enums implemented downstream, notably bySAIF.Business.View.Policy(clsAssociationType,clsAssociationTypeCode,clsPolicyAssociation). - Ad hoc data-access helper (
PolicyInformationand its privateSQLnested class): static/shared properties issuing inline SQL and one stored-procedure call directly againstIDataPortalInfo/IDataAccess, without aCriteriawrapper — an application-layer-style shortcut embedded in the business tier. - Value/enum support (
clsTranslationResult,Enums,Constants,StandardAssociationTypes,PolicyAssociationTypeCategories,AdjustedRates,iAdjustedRateFactor,iAdjustedRateProvider): shared value objects, domain enums, and constants used across the policy domain. - Orphaned artifact (
InstitutionstypedDataSet): generated bank/institution reference-data DataSet with no confirmed consumer within this library's own source.**
Interaction model¶
clsHazardGroupCollectionfollows the standard BOF collection retrieve pattern:BeforeRetrievebuilds anIDataRequestfromCriteria.RetrieveSQL, the framework's data portal executes it, andAfterRetrieveiterates theIDataReaderresult to construct childclsHazardGroupinstances viaLoad()→Fill()→MarkOld()†.PolicyInformationinteracts withIDataPortalInfo/IDataAccess/IPortalRequest/IDataRequestdirectly as static/shared properties, without aCriteria/IBusinessCriteriawrapper, for simple scalar or stored-procedure lookups.- The interfaces defined in this library (
IPolicyHeaderDataProvider,IPolicyAssociationType,IPolicyAssociation,IPolicyHeaderAssociation) are implemented downstream inSAIF.Business.View.Policy, establishing this library's role as a shared-contract provider consumed by the presentation/view business tier rather than an implementer of policy behavior itself. - No outbound project references exist from this library (
SAIF.Business.Policy.vbprojhas zero<ProjectReference>elements); all references are binary/NuGet references, placing this library at the base of the dependency graph for the policy domain.*
Design constraints¶
- All business objects in this library are explicitly retrieve-only; mutating SQL properties in
clsHazardGroup.CriteriaandclsHazardGroupCollection.CriteriathrowApplicationException(clsConstants.Messages.InvalidSQLProperty)and are never invoked. clsBenefitJurisdictionCodeMapandclsManualClassTypeCodeMapconstructors areFriend-scoped; instances must be obtained through theCodeMapsstatic factory, enforcing single-instance caching semantics.PolicyInformation's data-access shortcuts have no error handling forNothing/DBNullcast results (e.g.,MaxPolicyEffectiveDate), which would raise a cast exception if the underlying query returns no matching row.**- The
Institutionstyped DataSet is generated but has no confirmed consumer in this library's source; its purpose and downstream usage could not be confirmed from the scanned files.** - This library inherits its business-object lifecycle (edit session management, rule evaluation, save/retrieve dispatch) from
clsBusinessBase† andclsBusinessCollection† inSAIF.Framework.Core, tyingclsHazardGroup/clsHazardGroupCollectionto the framework's V1 rules engine (clsRulesManager) and data-portal dispatch path†.
Architecture diagram¶
The following diagram shows the high-level component boundaries within this library and its relationship to the framework base classes and downstream consumers.
flowchart TD
FW["SAIF.Framework.Core<br>clsBusinessBase / clsBusinessCollection"] --> HG["clsHazardGroup /<br>clsHazardGroupCollection<br>(retrieve-only BOF objects)"]
FW --> CM["CodeMaps<br>clsBenefitJurisdictionCodeMap /<br>clsManualClassTypeCodeMap"]
HG --> DB[("Oracle database<br>HAZARD_GROUP")]
CM --> DB2[("Oracle database<br>BENEFIT_JURISDICTION_CODE /<br>MANUAL_CLASS_TYPE_CODE")]
PI["PolicyInformation<br>(static ad hoc data-access helper)"] --> DB3[("Oracle database<br>POLICY / POLICY_PERIOD / etc.")]
Contracts["Cross-layer contracts<br>IPolicyHeaderDataProvider,<br>IPolicyAssociationType,<br>iPeriodRatingInfo, iPolicyPeriodBase"]
Consumer["SAIF.Business.View.Policy<br>(clsAssociationType, clsPolicyAssociation)"] -->|implements| Contracts
Consumer -->|Project Reference| ThisLib["SAIF.Business.Policy"]
ThisLib --> HG
ThisLib --> CM
ThisLib --> PI
ThisLib --> Contracts
Sequence diagram¶
The following diagram shows the primary retrieve sequence for hazard groups effective on a given date.
sequenceDiagram
participant Caller
participant Collection as clsHazardGroupCollection
participant Portal as Data portal (SAIF.Framework.Core)
participant DB as Oracle database
Caller->>Collection: GetHazardGroups(inDataportal, inEffectiveDate)
Collection->>Collection: BeforeRetrieve (build Criteria.RetrieveSQL)
Collection->>Portal: RetrieveObject(Criteria)
Portal->>DB: Execute SELECT with EffectiveDate parameter
DB-->>Portal: IDataReader result rows
Portal-->>Collection: AfterRetrieve (IDataReader)
Collection->>Collection: Create clsHazardGroup, Load/Fill/MarkOld per row
Collection-->>Caller: clsHazardGroupCollection
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. Statements marked with † were retrieved from a dependency library's own documentation via the Legends CLI RAG service.
Related documentation¶
- Index
- Overview
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- API reference
- SAIF.Business.View.Policy
Sources¶
.saifdocgen/state/runs/20260821-113120-claims-bof-web-legal/analysis/TSK006-analysis.md.saifdocgen/state/runs/20260821-113120-claims-bof-web-legal/analysis/TSK1B-004-dbanalysis-saif-business-policy.md.saifdocgen/state/runs/20260821-113120-claims-bof-web-legal/dependency-resolution.json