Skip to content

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 Claim domain object: by numeric ID, by claim number, or from an already-loaded InjuryClaim data record.
  • Provides ways to obtain a fully-constructed Worker domain object: by numeric ID or from an already-loaded ClaimPerson record.
  • Centralizes the domain-object construction dependencies so calling services do not need to assemble Claim/Worker constructor arguments themselves.

Context

  • Namespace: SAIF.Services.Claims
  • Assembly/package: SAIF.Services (packaged inside the SAIF.SAIFCode.Core NuGet 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 ClaimDomainBuilder in 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