Retrieve policy data¶
Loads the core policy view aggregate for a policy number, returning a populated clsPolicyData.
| Field | Value |
|---|---|
| Operation ID | op-01-retrieve-policy-data |
| Trigger | Consumer calls GetPolicyData(inDataportal, inPolicyNum) (or the Criteria, policy-number-list, or user-access-level overloads) |
| Inputs | Policy number, optional period date/user context/detail flag |
| Outputs | Populated clsPolicyData |
| Primary components | clsPolicyData.GetPolicyData, Criteria, BeforeRetrieve/AfterRetrieve |
| Entry point | SAIF.Business.View.Policy/clsPolicyData.vb |
Steps¶
- Caller invokes one of the shared
GetPolicyDataoverloads. All overloads ultimately construct aCriteria(or accept one directly) and delegate toinDataportal.DataAccessLayer.RetrieveObject. - Framework invokes
BeforeRetrieve: creates a newIDataRequest, setsCommandType = StoredProcedureandRequestType = Reader, assignsMyCriteria.RetrieveSQL(SQL-010, stored procedurepk73094_policy_data.getpolicy), and binds parameterapolicynumfromMyCriteria.PolicyNumplus a cursor parameterrecordset(BR-VP-001). - Framework executes the request against Oracle.
- Framework invokes
AfterRetrieve: castsinPortalRequest.DataRequest(0).ResulttoclsSAIFDataReader, callsReader.Read(), and if a row was returned callsFill(Reader)to hydrate allclsPolicyDatafields (including market-type mapping — BR-VP-016), then callsMarkOld(). - If the reader produced no row,
Fillis never called and the returnedclsPolicyDatais left in its unpopulated default state — the caller is not told the policy did not exist except by inspectingIsValid/PolicyNum.* - The
GetPolicyData(inDataportal, inPolicyNumbers)overload loops the single-policy overload for each number viaPerformForAll, building aList(Of clsPolicyData)— retrieval is not batched at the SQL level.* - The
GetPolicyAddress/GetPolicyClaimAddressshared helpers onclsPolicyDataare thin pass-throughs toclsPolicyAddress.GetPolicyAddress/GetPolicyClaimAddress(see Retrieve addresses) — they do not go through this operation'sCriteria/BeforeRetrievepath.
Process flow¶
flowchart TD
Start(["Caller invokes<br>GetPolicyData"]) --> A["Construct/accept Criteria<br>with policy number"]
A --> B["RetrieveObject via BOF<br>data portal"]
B --> C["BeforeRetrieve assigns<br>RetrieveSQL, binds apolicynum"]
C --> D["Framework executes<br>pk73094_policy_data.getpolicy<br>against Oracle"]
D --> E["AfterRetrieve reads<br>first row via reader"]
E --> F{Row returned?}
F -->|Yes| G["Fill hydrates clsPolicyData<br>fields, MarkOld"]
F -->|No| H["clsPolicyData remains<br>unpopulated/default"]
G --> End(["Return populated<br>clsPolicyData"])
H --> End
Failure and edge-case behavior¶
- No row returned: the object is returned unpopulated rather than raising an exception or returning
Nothing— callers must checkIsValid/PolicyNumthemselves.* - The
GetPolicyDataoverload taking aninPolicyNumbersarray has no partial-failure handling: if one lookup throws, the exception propagates and no partial list is returned.*
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/clsPolicyData.vb