Skip to content

clsPolicyAddress

clsPolicyAddress projects mailing, claim, policyholder, third-party-manager, and location-sequence address data for a policy. It is retrieved through Oracle package pk72846_view_policy, inherits general address behavior from an external SAIF base class, and adds policy-specific contact fields plus a lazy OfficerOfNotice lookup over affiliate tables. Demo-user access levels receive masked contact, phone, email, officer-of-notice, and policyholder-name values instead of live address identity data.

Purpose

  • Retrieve policy-related address variants from the policy-view Oracle package rather than forcing callers to know address-type and contact-type codes.
  • Surface contact person, phone, email, and officer-of-notice details alongside the base address projection used by claim and policy display pages.
  • Apply demo masking to personally identifying address and contact fields for external demo users (BR-VP-010).

Context

  • Namespace: SAIF.Business.View.Policy
  • Assembly/package: SAIF.Business.View.Policy (embedded)

Public members

Member Signature Purpose
GetPolicyAddressByLocationSeqNum Public Shared Function GetPolicyAddressByLocationSeqNum(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inLocationSeqNum As Decimal, Optional ByVal inUserAccessLevel As clsPolicyData.UserAccessLevels = clsPolicyData.UserAccessLevels.SAIFEmployee) As clsPolicyAddress Retrieves a specific location record when the caller already knows the location sequence instead of a policy/address-type combination.
GetPolicyAddress Public Shared Function GetPolicyAddress(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inPolicyNum As Decimal, Optional ByVal inUserAccessLevel As clsPolicyData.UserAccessLevels = clsPolicyData.UserAccessLevels.SAIFEmployee) As clsPolicyAddress Returns the policy mailing-address projection from pk72846_view_policy.getPolicyAddress.
GetPolicyClaimAddress Public Shared Function GetPolicyClaimAddress(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inPolicyNum As Decimal, ByVal inGetMailAddrFlag As YesNoFlag, Optional ByVal inUserAccessLevel As clsPolicyData.UserAccessLevels = clsPolicyData.UserAccessLevels.SAIFEmployee) As clsPolicyAddress Returns the claim-address view and can request a mailing-address fallback when a claim-specific row is missing.
GetTpManagerAddress Public Shared Function GetTpManagerAddress(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inPolicyNum As Decimal, Optional ByVal inUserAccessLevel As clsPolicyData.UserAccessLevels = clsPolicyData.UserAccessLevels.SAIFEmployee) As clsPolicyAddress Retrieves the third-party-manager address variant for policy workflows that need that specialized contact point.
GetPolicyHolderAddress Public Shared Function GetPolicyHolderAddress(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inPolicyNum As Decimal, Optional ByVal inUserAccessLevel As clsPolicyData.UserAccessLevels = clsPolicyData.UserAccessLevels.SAIFEmployee) As clsPolicyAddress Retrieves the policyholder address/contact combination using the policyholder-specific address and contact codes.
LocationCode Public ReadOnly Property LocationCode() As String Exposes the retrieved location code so callers can distinguish mailing, claim, and policyholder rows after load.
IsClaimAddress Public ReadOnly Property IsClaimAddress() As Boolean Identifies whether the loaded row represents the claim-address location.
IsPolicyHolderAddress Public ReadOnly Property IsPolicyHolderAddress() As Boolean Identifies whether the loaded row represents the policyholder-address location.
ContactName Public ReadOnly Property ContactName() As clsName Returns the associated contact person, masking the name with a demo placeholder when required (BR-VP-010).
ContactPhone Public ReadOnly Property ContactPhone() As clsPhone Returns the structured contact phone object, substituting a demo phone number for masked users (BR-VP-010).
ContactPhoneNumber Public ReadOnly Property ContactPhoneNumber() As String Returns the formatted contact phone value that UI callers can display directly, with masking applied for demo users (BR-VP-010).
ContactEmailAddress Public ReadOnly Property ContactEmailAddress() As String Returns the contact email address or the masking constant for demo users (BR-VP-010).
PolicyEmailAddress Public ReadOnly Property PolicyEmailAddress() As String Returns the location/policy email address with demo masking applied when required (BR-VP-010).
ContactFullName Public ReadOnly Property ContactFullName() As String Formats the contact person's display name for UI use, again honoring demo masking (BR-VP-010).
OfficerOfNotice Public ReadOnly Property OfficerOfNotice() As String Executes an inline join over BUSINESS_AFFILIATE and AFFILIATE to retrieve the active officer of notice for the policy, or returns a masking constant for demo users (BR-VP-010).
IsDemoUser Public ReadOnly Property IsDemoUser() As Boolean Indicates whether the current criteria access level should trigger the masked-data branch.
IsValid Public Overrides ReadOnly Property IsValid() As Boolean Reports whether an address row was successfully loaded into the object.

Behavioral notes

  • BeforeRetrieve calls pk72846_view_policy.getPolicyAddress for policy-based retrieval and pk72846_view_policy.getPolicyAddressByLocSeqNum when the criteria uses the synthetic LOCSEQNUM address type.
  • OfficerOfNotice is lazy: it executes its inline affiliate query only on first access and caches the result for later reads.
  • Demo masking covers policyholder/company name, contact name, telephone, email, street/city/state/zip, county, and officer-of-notice values (BR-VP-010).
  • The type inherits core address fields from clsAddress, but those inherited members are intentionally omitted here because no confirmed dependency documentation was available in this run.

Constraints and usage notes

  • Use the factory that matches the retrieval key you have; the location-sequence path bypasses the policy/address-type parameter set used by the other factories.
  • IsDemoUser only recognizes demo agent, demo group, and demo policyholder access levels in this class.
  • The object is read-only in this library; its criteria returns blank create/insert/update/delete SQL.

Sources

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