SAIF.Data.NHibernate overview¶
Documentation context: Packaged Component (NuGet)
SAIF.Data.NHibernate is the FluentNHibernate persistence layer for SAIF.Data's entity models. It compiles 388 FluentNHibernate ClassMaps over roughly 367 distinct tables (mostly Oracle WCIS_DBA schema tables, plus one SQL Server stored procedure), 11 custom NHibernate IUserType conversions, and 12 specialized repositories that implement query and command behavior on top of the repository interfaces declared in SAIF.Data.
Purpose¶
- Provide the object-relational mapping and repository implementations that let
SAIF.Dataand its consumers (SAIF.Services, variousDependencyMapsweb/console entry points) read and write SAIF's Oracle-hosted claims, policy, collections, imaging, and EDI data through NHibernate, without owning session, transaction, or connection-string management itself. - Encapsulate a small number of legacy Oracle PL/SQL package calls (via embedded
.hbm.xmlnamed queries and inlineCreateSqlQuery) and one SQL Server stored procedure call behind idiomatic repository methods.
Responsibilities¶
- Map SAIF.Data entities to their underlying tables through FluentNHibernate
ClassMap<T>/SubclassMap<T>declarations, discovered by assembly scanning. - Define embedded
.hbm.xmlnamed queries (24 defined, 21 used) and inlineCreateSqlQuerycalls (6) that invoke OracleWCIS_DBAPL/SQL packages and one SQL Server stored procedure. - Implement custom
IUserTypeconversions for tri-state flags and coded enumerations underCustomTypes/. - Implement 12 specialized repositories (
ClaimBillEntryRepository,CollectionsRepository,PoliciesRepository,PolicyPeriodPayrollAuditRepository,ProvidersRepository,ClaimScoreRepository,MissingTimeLossRepository,GroupImageRepository,GroupRepository,ImageCategoryCodeRepository,InvestigationRepositoryExtensions,PolicyOutputDocumentRepository/PolicyOutputDocumentExtensions) that layer domain-specific queries over the external unit-of-work infrastructure.
Key components¶
Mappings/: ~390 compiled ClassMap files (388 producing ClassMaps) plus 5 embedded.hbm.xmlfiles holding only<sql-query>named queries and their result mappings.CustomTypes/: 11IUserTypeimplementations, includingYesNoNullUserTypeand the certificate/claim-authority enumerations.Repositories/: the 12 specialized repository classes and extension sets, grouped underGroups/,Imaging/,Investigations/, andOutputDocuments/sub-namespaces.- Session/transaction management is delegated entirely to the external
SAIF.Framework.Data.NHibernatepackage; this library never constructs anISessionFactoryor connection string itself.
Related documentation¶
- Index
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- Procedures
- Security and authorization
- API reference
Sources¶
Data/SAIF.Data.NHibernate/SAIF.Data.NHibernate.csproj