SAIF.Business.Policy architecture¶
SAIF.Business.Policy is a leaf-level domain/business component library for the policy domain within the Claims.BOF.Web.LegalMaintenance repository. It has no outbound project references, no UI, and no service host; it is consumed in this repository only through SAIF.Business.View.Policy, which is in turn consumed by the LegalMaintenance WebForms front end, SAIF.Application.Claim.Legal, and SAIF.Business.Claim.Legal.
Responsibilities¶
- Provide the policy domain vocabulary — code⇄enum translation (
Enums) and shared literal constants (Constants) used throughout the library. - Declare integration contracts for the policy domain —
iPeriodRatingInfo,iPolicyPeriodBase,IPolicyHeaderDataProvider(and the nested association contractsIPolicyAssociationType,IPolicyAssociation,IPolicyHeaderAssociation), andCodeMaps/iAdjustedRateFactor— implemented by consumers outside this library. - Retrieve hazard-group reference data as read-only BOF business objects (
clsHazardGroup,clsHazardGroupCollection) via the SAIF BOF data portal. - Provide scalar policy facts (effective/expiration/anniversary dates, market type, premium-history set id, minimum premium, ownership system) through direct application-layer SQL and stored-procedure calls in
PolicyInformation, bypassing the BOF business-object pattern. - Maintain cached code-table lookups (
BenefitJurisdictions,ManualClassTypes) viaCodeMapsfactory-backedExtendedCodeMapsubclasses. - Expose a generated typed
DataSet(Institutions) describing bank/financial-institution reference data (no in-library consumer found).*
Component boundaries¶
- Domain vocabulary layer (
Enums.vb,Constants.vb): pure, stateless code⇄enum translation and literal constants; depends on nothing, depended on by nearly everything else in the library. - Contract layer (
iPeriodRatingInfo.vb,iPolicyPeriodBase.vb,IPolicyHeaderDataProvider.vb,CodeMaps/iAdjustedRateFactor.vb): declaration-only interfaces plus oneMustInheritclass and two helper modules. Implementations live outside this library (e.g.,SAIF.Business.View.Policy/Associations/*), making this the library's primary integration boundary with higher layers.* - BOF business-object layer (
clsHazardGroup.vb,clsHazardGroupCollection.vb): classic SAIF BOF pattern — business object + typed collection + nestedCriteriaimplementingIBusinessCriteria, retrieved through the data portal withBeforeRetrieve/AfterRetrievelifecycle hooks. Read-only by construction. - Application-layer data accessor (
PolicyInformation.vb): issues SQL/stored-procedure calls directly throughIPortalRequest/IDataRequestfor scalar policy facts — a second, parallel data-access style and the library's main technical-debt seam.* - Code-table map layer (
CodeMaps/):ExtendedCodeMapsubclasses filled from aSELECTat construction, exposed through a partialCodeMapsfactory class with static-variable caching. - Generated data-contract layer (
InstitutionstypedDataSet): bank/financial-institution reference schema; no code in this library consumes it.**
Interaction model¶
- All database access is delegated: nothing in this library opens a connection or names a database. Every call takes an
IDataPortalInfosupplied by the caller, and physical connection/environment resolution happens insideSAIF.BOF.Framework.* - The library performs no threading, I/O, logging, HTTP calls, or configuration reads.
- Business objects are read-only projections (
AllowEdit=False,IsSavable=False, all non-retrieve SQL properties throw), making this a query-side-only component. SAIF.Business.View.Policyis the sole in-repo consumer, implementing the policy-association contract family (IPolicyAssociationType,IPolicyAssociation,IPolicyHeaderAssociation,StandardAssociationTypes,PolicyAssociationTypeCategories) viaAssociations/clsAssociationTypeCode.vb,clsPolicyAssociation.vb, andclsPolicyAssociationCollection/clsPolicyAssociationFactory.vb. No in-repo consumer was found forclsHazardGroup(Collection),PolicyInformation,Enums,Constants,clsTranslationResult,CodeMaps,iPolicyPeriodBase,iPeriodRatingInfo,IPolicyHeaderDataProvider,iAdjustedRateFactor, orInstitutions.*- Retrieval control flow for hazard groups (
GetHazardGroups/GetHazardGroupCollection) delegates orchestration toSAIF.BOF.Framework's data portal, which invokesBeforeRetrieve/AfterRetrievelifecycle hooks on the collection to build and consume the SQL request.
Architecture diagram¶
The following diagram shows the library's internal layering and its position relative to the consuming front end and the Oracle database.
flowchart TD
A[Domain vocabulary layer<br>Enums, Constants] --> B[Contract layer<br>iPeriodRatingInfo, iPolicyPeriodBase,<br>IPolicyHeaderDataProvider, iAdjustedRateFactor]
A --> C[BOF business-object layer<br>clsHazardGroup, clsHazardGroupCollection]
A --> D[Application-layer data accessor<br>PolicyInformation]
A --> E[Code-table map layer<br>CodeMaps]
F[SAIF.Business.View.Policy] --> B
F --> G[SAIF.Business.Policy]
G --> C
G --> D
G --> E
C --> H["SAIF.BOF.Framework data<br>portal"]
D --> H
H --> I[(Oracle database)]
J["LegalMaintenance web front<br>end"] --> F
Sequence diagram¶
The following diagram shows the hazard-group retrieval sequence (OP-01/OP-02), the library's primary BOF data-access flow.
sequenceDiagram
participant Caller
participant Collection as clsHazardGroupCollection
participant Portal as SAIF.BOF.Framework data portal
participant DB as Oracle database
participant Item as clsHazardGroup
Caller->>Collection: GetHazardGroups(dpi, effectiveDate)
Collection->>Portal: RetrieveObject(Criteria)
Portal->>Collection: BeforeRetrieve
Collection->>Portal: assign RetrieveSQL, bind EffectiveDate
Portal->>DB: execute request
DB-->>Portal: result rows
Portal->>Collection: AfterRetrieve
loop each row
Collection->>Item: New clsHazardGroup / Load(dpi, reader)
Item-->>Collection: Add(child)
end
Collection-->>Caller: populated clsHazardGroupCollection
Design constraints¶
- No outbound
<ProjectReference>— the library sits at the bottom of the repository's local dependency graph. - All external consumption is via NuGet packages/HintPath references declared in
packages.config; no<PackageReference>elements are used. - Read-only surface: hazard-group business objects and
PolicyInformationaccessors only support retrieval; create/update/delete SQL properties throw or are not implemented. - No local exception handling around most scalar accessors — data-access exceptions from the framework propagate to the caller, except
PolicyMinimumPremium, which swallows exceptions fromProcessPortalRequestin an emptyCatch.* - The target Oracle database/schema is never named in code or config; it is resolved at runtime by the caller-supplied
IDataPortalInfo.
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.
Related documentation¶
- Index
- Overview
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- Procedures
- API reference
Sources¶
SAIF.Business.Policy/SAIF.Business.Policy.vbprojSAIF.Business.Policy/PolicyInformation.vbSAIF.Business.Policy/clsHazardGroup.vbSAIF.Business.Policy/clsHazardGroupCollection.vbSAIF.Business.Policy/CodeMaps/clsBenefitJurisdictionCodeMap.vbSAIF.Business.Policy/CodeMaps/clsManualClassTypeCodeMap.vb