PoliciesRepository¶
PoliciesRepository is a minimal Repository<Policy> specialization with a single operation: retrieving the WCIS standard premium for a policy period from Oracle. It delegates the actual computation to the Oracle function PK72846_VIEW_POLICY.SP73111_GET_WCIS_STD_PREMIUM, which is itself a thin wrapper that calls pk73059_prem_hist_summary to read the latest premium-history set for the policy period (saif-data-nhibernate-db-analysis.md).
Purpose¶
- Provide the WCIS standard premium for a given policy number and effective date, sourced from the latest premium-history summary for that policy period (
PROC-RULE-040, Procedures).
Context¶
- Namespace:
SAIF.Data.NHibernate.Repositories - Assembly/package:
SAIF.Data.NHibernate(ships inside theSAIF.SAIFCode.CoreNuGet package) - Base class:
Repository<Policy>fromSAIF.Framework.Data.NHibernate(external, resolved via Legends CLI — see Inherited public members below). - Implements:
IPoliciesRepository, defined inSAIF.Data*.
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| PoliciesRepository(NHibernateUnitOfWork) | public PoliciesRepository(NHibernateUnitOfWork unitOfWork) |
Constructor; passes unitOfWork to the Repository<Policy> base. |
| GetPolicyStandardPremium | public decimal GetPolicyStandardPremium(long policyNumber, DateTime effectiveDate) |
Evaluates PK72846_VIEW_POLICY.SP73111_GET_WCIS_STD_PREMIUM(:in_policy_num, :in_pol_per_eff_date) from dual via named query Policies_GetPolicyStandardPremium and returns the resulting decimal standard premium for the policy period (SQL-035). |
Inherited public members¶
Members in this section are inherited from Repository<Policy> in SAIF.Framework.Data.NHibernate. They are available on this type through inheritance.
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| Add | public void Add(Policy entity) |
Registers a new Policy entity for insertion on the next unit-of-work commit.† |
SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
| Update | public void Update(Policy entity) |
Marks an existing Policy entity as modified for the next unit-of-work commit.† |
SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
| Delete | public void Delete(Policy entity) |
Registers a Policy entity for deletion on the next unit-of-work commit.† |
SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
| Query | public IQueryable<Policy> Query() |
Returns a LINQ-queryable session projection over Policy for building ad hoc filters.† |
SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
| Get | public Policy Get(object id) |
Loads a Policy by primary key, returning null if not found.† |
SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
| Load | public Policy Load(object id) |
Loads a Policy by primary key as a (possibly proxied) reference, throwing if not found.† |
SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
| SystemDate | public DateTime SystemDate { get; } |
Current system date/time as tracked by the underlying session/unit of work.† | SAIF.Framework.Data.NHibernate — RepositoryBase<Policy> |
Behavioral notes¶
GetPolicyStandardPremiumdoes not use the inheritedRepository<Policy>CRUD surface; it is a single-value function evaluation viaUniqueResult<decimal>()againstdual*.- The underlying Oracle function's own logic (which premium-history row it selects when multiple exist for the same period) is delegated to
pk73059_prem_hist_summary, which was not retrieved by analysis (saif-data-nhibernate-db-analysis.md)**.
Constraints and usage notes¶
- Callers must supply a valid
policyNumber/effectiveDatepair that resolves to a premium-history row in Oracle; an unmatched pair's behavior (null vs. exception) was not verified**.
Note: Statements marked with
†are derived from dependency library documentation via the Legends CLI. Statements marked with*were inferred from code structure or contextual evidence. Statements marked with**could not be confirmed; treat as unknown until verified.
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- Procedures
- Security and authorization
- API reference
Sources¶
Data/SAIF.Data.NHibernate/Repositories/PoliciesRepository.cs