clsAgency¶
clsAgency projects the agency-of-record snapshot attached to a policy. clsPolicyData loads it lazily through pk72846_view_policy.getAgency, and consumers use it for producer identity, agency contact information, and policy-display enrichment. The object also records a business-object error when no agency row exists and masks telephone, address, email, and country fields for demo users.
Purpose¶
- Represent the agency and producer snapshot attached to a policy so callers can display agency-of-record details without issuing separate ad hoc queries.
- Retrieve agency data through the policy-view Oracle package and preserve the policy number that requested the snapshot.
- Record the missing-row condition as a "No data found" object error instead of silently returning fabricated data (BR-VP-025).
- Apply demo masking to contact and location fields for demo-user access levels (BR-VP-010).
Context¶
- Namespace:
SAIF.Business.View.Policy - Assembly/package:
SAIF.Business.View.Policy(embedded)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
GetAgency |
Public Shared Function GetAgency(ByVal inDataportal As IDataPortalInfo, ByVal inPolicyNum As Decimal) As clsAgency |
Retrieves the agency snapshot for a policy using the default access-level context. |
GetAgency |
Public Shared Function GetAgency(ByVal inCriteria As Criteria) As clsAgency |
Retrieves the agency snapshot from a caller-supplied criteria object so masking and policy-number inputs can be preserved. |
AgencyName |
Public ReadOnly Property AgencyName() As String |
Returns the agency display name, collapsing non-SAIF names to a generic demo label for masked users (BR-VP-010). |
AgentName |
Public ReadOnly Property AgentName() As String |
Returns the producer display name, again replacing it with a generic demo label for masked users (BR-VP-010). |
AgencySeqNum |
Public ReadOnly Property AgencySeqNum() As Decimal |
Exposes the agency identifier used by authorization and policy-display code. |
AgentNum |
Public ReadOnly Property AgentNum() As Decimal |
Exposes the producer identifier used by agent authorization paths. |
Address |
Public ReadOnly Property Address() As clsAddress |
Returns the address object populated from the retrieved agency row for callers that need a structured address representation. |
Address1 |
Public ReadOnly Property Address1() As String |
Returns the primary street line, with demo masking applied when required (BR-VP-010). |
Address2 |
Public ReadOnly Property Address2() As String |
Returns the secondary street line, blanked for demo users. |
CityStateZipFormatted |
Public ReadOnly Property CityStateZipFormatted() As String |
Formats the city/state/zip triplet into a display-ready location string. |
Email |
Public ReadOnly Property Email() As String |
Returns the agency email address or the masking constant for demo users (BR-VP-010). |
PhoneFormatted |
Public ReadOnly Property PhoneFormatted() As String |
Returns a display-ready agency phone number, substituting a demo number for masked users (BR-VP-010). |
Country |
Public ReadOnly Property Country() As String |
Returns the stored country value, which is replaced with a generic demo value when masking is active (BR-VP-010). |
PolicyNum |
Public ReadOnly Property PolicyNum() As Decimal |
Echoes the policy that requested this agency snapshot so callers can correlate the child object back to its parent aggregate. |
IsDemoUser |
Public ReadOnly Property IsDemoUser() As Boolean |
Indicates whether this agency instance should return masked data for demo external-user access levels. |
Behavioral notes¶
BeforeRetrievecalls Oracle procedurepk72846_view_policy.getAgencywithapolicynum.AfterRetrieveaddsNoDataFoundErrorwith the messageNo data foundwhen the result set is empty (BR-VP-025).Fillmasks producer phone, street, city, country, county, fax, state, zip, phone, and email values for demo users (BR-VP-010).- The type also hydrates an internal
clsAddressobject so callers can use either field-level properties or the structured address child.
Constraints and usage notes¶
- This page documents only members declared in
clsAgency; inherited members fromclsBusinessBaseare not included. - The class is read-only; its criteria returns empty SQL for create/insert/update/delete operations.
- Demo masking is triggered for demo agent, demo group, demo policyholder, demo loss-control, and demo auditor access levels.
Sources¶
SAIF.Business.View.Policy/clsAgency.vb