IClaimDomainBuilder¶
Defines the contract for constructing SAIF.Domain.Model.Claims domain objects (Claim and Worker) from various identifiers or lightweight data records, abstracting the wiring of a claim's or worker's collaborators (unit of work, query providers, claim API services) behind a single factory-style interface consumed by services such as ClaimNotesService and TaskService.
Purpose¶
- Provides multiple ways to obtain a fully-constructed
Claimdomain object: by numeric ID, by claim number, or from an already-loadedInjuryClaimdata record. - Provides ways to obtain a fully-constructed
Workerdomain object: by numeric ID or from an already-loadedClaimPersonrecord. - Centralizes the domain-object construction dependencies so calling services do not need to assemble
Claim/Workerconstructor arguments themselves.
Context¶
- Namespace:
SAIF.Services.Claims - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| GetClaim(long) | Claim GetClaim(long claimId) |
Builds a Claim domain object for the given claim's database ID. |
| GetClaim(string) | Claim GetClaim(string claimNumber) |
Builds a Claim domain object for the given human-readable claim number. |
| GetClaim(InjuryClaim) | Claim GetClaim(InjuryClaim claim) |
Builds a Claim domain object directly from an already-retrieved InjuryClaim data record, avoiding a redundant claim lookup. |
| GetWorker(long) | Worker GetWorker(long workerId) |
Builds a Worker domain object for the given worker's database ID. |
| GetWorker(ClaimPerson) | Worker GetWorker(ClaimPerson worker) |
Builds a Worker domain object directly from an already-retrieved ClaimPerson data record. |
Behavioral notes¶
- Implemented by
ClaimDomainBuilderin this same namespace, which supplies the unit of work, user profile service, query providers, and claim API services each domain object needs.
Sources¶
- Services/SAIF.Services/Claims/ClaimDomainBuilder.cs