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¶
- Caller invokes one of the five shared
Get*Addressfactory methods, each of which constructs aCriteriawith a specific address/contact-type combination (e.g.CLAIMADDRESSTYPE,THIRDPARTYMANAGERTYPE,POLICYHOLDERADDRESSTYPE/POLICYHOLDERCONTACTTYPE) and delegates toinDataPortalInfo.DataAccessLayer.RetrieveObject. - Framework invokes
BeforeRetrieve: ifMyCriteria.AddressType = ADDRESSLOCATIONSEQNUM(the location-sequence-number path), assignsMyCriteria.RetrieveAddressByLocationSeqNum(SQL-008) and binds onlyinLocationSeqNum; otherwise assignsMyCriteria.RetrieveSQL(SQL-007, procedurepk72846_view_policy.getpolicyaddress) and bindsinPolicyNum,inAddressType,inContactType, andinGetMailAddrWhenNotFound— the "claim-to-mailing fallback" flag. - Framework executes the request against Oracle.
- Framework invokes
AfterRetrieve: casts the result toclsSAIFDataReader, callsReader.Read(), and if a row was returned callsFill(Reader); explicitly closes the reader if still open; thenMarkOld(). Fillbranches onIsDemoUser: for a normal user it hydrates ~15 fields (address lines, city/state/county/country, zip+4, phone/fax viaclsPhone, contact name/phone/email,loc_email_addr) directly from named reader columns, and setsm_Foreign = Truewhenloc_countryis neither"US"nor empty. For a demo user, every field is instead populated fromclsConstants.DataMaskingConstantssentinel values (BR-VP-010) — the reader is not read for masked fields.GetPolicyClaimAddress'sinGetMailAddrFlag(YesNoFlag) is passed through to the stored procedure asinGetMailAddrWhenNotFound, meaning the claim-vs-mailing fallback decision is made in the database procedure, not in this class.*- 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:
Fillis never invoked and the address object is returned unpopulated (m_Validnot set toTrue) — callers must check validity themselves.* - Demo-user masking happens entirely client-side in
Fillafter the real row is (or is not) read — the query itself does not change for demo users, only how the result is interpreted.* m_Foreignis only setTrue, never explicitly resetFalse, 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.
Related documentation¶
Sources¶
SAIF.Business.View.Policy/clsPolicyAddress.vbSAIF.Business.View.Policy/clsPolicyData.vb