Skip to content

Retrieve an affiliate by SSN

This operation documents how clsAffiliate.GetAffiliate fulfills the policy-affiliate behavior described for SAIF.Business.Policy.Affiliate.

Field Value
Operation ID OP-001
Trigger A caller supplies an affiliate SSN and needs the standalone person record.
Inputs IDataPortalInfo, affiliate SSN
Outputs clsAffiliate
Primary components clsAffiliate.GetAffiliate
Entry point Business\SAIF.Business.Policy.Affiliate\clsAffiliate.vb

Steps

  1. Construct a Criteria instance from the caller-provided portal context and affiliate SSN, then delegate retrieval to the BOF data-access layer (BR-AFF-018).
  2. In BeforeRetrieve, assign SQL-001 and bind the :AffiliateID parameter against AFFILIATE.
  3. After execution, read the first returned row if present and map the person columns into the object; if no row is present, leave the object at default values (BR-AFF-001).
  4. Mark the object old and return the retrieved affiliate to the caller.

Process flow

The following diagram shows the retrieve-by-SSN lookup and the default-object fallback when no row matches.

flowchart TD
  Start(["Caller supplies affiliate SSN"]) --> Criteria["Build Criteria with portal context and SSN"]
  Criteria --> Before["BeforeRetrieve: assign SQL-001<br>bind :AffiliateID against AFFILIATE"]
  Before --> Query{"Row returned?"}
  Query -->|Yes| Map["Map person columns into clsAffiliate"]
  Query -->|No| Default["Leave object at default values"]
  Map --> MarkOld["Mark object old"]
  Default --> MarkOld
  MarkOld --> Result(["Return clsAffiliate to caller"])

Failure and edge-case behavior

  • Missing rows do not raise an exception; callers must treat an empty key or empty data as a not-found condition.

Sources

  • Business\SAIF.Business.Policy.Affiliate\clsAffiliate.vb