Skip to content

Retrieve addresses

Loads an address for a policy — mailing, claim, location-sequence-number, third-party-manager, or policyholder — masking contact details for demo users.

Field Value
Operation ID op-06-retrieve-addresses
Trigger Caller invokes clsPolicyAddress.GetPolicyAddress / GetPolicyClaimAddress / GetPolicyAddressByLocationSeqNum / GetTpManagerAddress / GetPolicyHolderAddress (or the pass-through statics on clsPolicyData)
Inputs Policy number (or location sequence number), address/contact type, GetMailAddrFlag, user access level
Outputs Populated clsPolicyAddress
Primary components clsPolicyAddress.GetPolicyAddress family, BeforeRetrieve/AfterRetrieve, Fill
Entry point SAIF.Business.View.Policy/clsPolicyAddress.vb

Steps

  1. Caller invokes one of the five shared Get*Address factory methods, each of which constructs a Criteria with a specific address/contact-type combination (e.g. CLAIMADDRESSTYPE, THIRDPARTYMANAGERTYPE, POLICYHOLDERADDRESSTYPE/POLICYHOLDERCONTACTTYPE) and delegates to inDataPortalInfo.DataAccessLayer.RetrieveObject.
  2. Framework invokes BeforeRetrieve: if MyCriteria.AddressType = ADDRESSLOCATIONSEQNUM (the location-sequence-number path), assigns MyCriteria.RetrieveAddressByLocationSeqNum (SQL-008) and binds only inLocationSeqNum; otherwise assigns MyCriteria.RetrieveSQL (SQL-007, procedure pk72846_view_policy.getpolicyaddress) and binds inPolicyNum, inAddressType, inContactType, and inGetMailAddrWhenNotFound — the "claim-to-mailing fallback" flag.
  3. Framework executes the request against Oracle.
  4. Framework invokes AfterRetrieve: casts the result to clsSAIFDataReader, calls Reader.Read(), and if a row was returned calls Fill(Reader); explicitly closes the reader if still open; then MarkOld().
  5. Fill branches on IsDemoUser: for a normal user it hydrates ~15 fields (address lines, city/state/county/country, zip+4, phone/fax via clsPhone, contact name/phone/email, loc_email_addr) directly from named reader columns, and sets m_Foreign = True when loc_country is neither "US" nor empty. For a demo user, every field is instead populated from clsConstants.DataMaskingConstants sentinel values (BR-VP-010) — the reader is not read for masked fields.
  6. GetPolicyClaimAddress's inGetMailAddrFlag (YesNoFlag) is passed through to the stored procedure as inGetMailAddrWhenNotFound, meaning the claim-vs-mailing fallback decision is made in the database procedure, not in this class.*
  7. An officer-of-notice lookup (SQL-009) is exposed through this class's affiliate-lookup surface but was not directly located as a distinct method in this pass — cross-referenced from the hub catalog and BUSINESS_AFFILIATE/AFFILIATE table usage only.**

Process flow

flowchart TD
    Start(["Caller invokes a<br>Get*Address factory method"]) --> A["Construct Criteria with<br>address/contact type"]
    A --> B{AddressType =<br>ADDRESSLOCATIONSEQNUM?}
    B -->|Yes| C["BeforeRetrieve assigns<br>RetrieveAddressByLocationSeqNum"]
    B -->|No| D["BeforeRetrieve assigns<br>RetrieveSQL, binds policy num,<br>address/contact type, mail flag"]
    C --> E["Framework executes<br>against Oracle"]
    D --> E
    E --> F["AfterRetrieve reads<br>first row via reader"]
    F --> G{IsDemoUser?}
    G -->|No| H["Fill hydrates real<br>address/contact fields"]
    G -->|Yes| I["Fill substitutes<br>DataMaskingConstants values"]
    H --> End(["Return populated<br>clsPolicyAddress"])
    I --> End

Failure and edge-case behavior

  • No row returned: Fill is never invoked and the address object is returned unpopulated (m_Valid not set to True) — callers must check validity themselves.*
  • Demo-user masking happens entirely client-side in Fill after the real row is (or is not) read — the query itself does not change for demo users, only how the result is interpreted.*
  • m_Foreign is only set True, never explicitly reset False, so its default (False) is relied upon for domestic addresses.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.View.Policy/clsPolicyAddress.vb
  • SAIF.Business.View.Policy/clsPolicyData.vb