clsProviderAddress¶
API reference for clsProviderAddress.
Purpose¶
- Provider address business object (inherits
clsAddress) representing a single address associated with a provider. - Nested
CriteriaimplementsIBusinessCriteria, supplying full CRUD SQL for provider address records.
Context¶
- Namespace:
SAIF.Business.View.Provider - Assembly/package:
SAIF.BOF.Business.View.Provider
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| TerminationDate | ReadOnly Property TerminationDate() As Date |
Returns the address termination (expiration) date; defaults to Date.MaxValue when the underlying exp_date column is empty. |
| StartDate | ReadOnly Property StartDate() As Date |
Returns the address effective (start) date. |
| AddrCitySt | ReadOnly Property AddrCitySt() As String |
Returns the pre-formatted "city, state, zip" string computed by SQL-005. |
| IsActive | ReadOnly Property IsActive() As Boolean |
Always returns True; the current implementation only surfaces active addresses. |
| ProviderAddressCode | ReadOnly Property ProviderAddressCode() As String |
Returns the provider address type code (e.g. COR, PAY, PHY). |
| ProviderAddressID | ReadOnly Property ProviderAddressID() As Decimal |
Returns the provider address surrogate key (provider_address_seq_num). |
| ProviderLocationID | Property ProviderLocationID() As Decimal |
Gets or sets the provider location identifier this address is associated with. |
| IsParent | Property IsParent() As Boolean |
Gets or sets whether this address was resolved from the parent provider location rather than the child location. |
| ParentName | Property ParentName() As String |
Gets or sets the parent provider location's business name, when IsParent is True. |
| ParentProviderLocationID | Property ParentProviderLocationID() As Decimal |
Gets or sets the parent provider location identifier, when IsParent is True. |
| UpdateInfo | ReadOnly Property UpdateInfo() As clsUpdateInfo |
Returns the last-update user/date audit information populated on retrieve. |
| MyCriteria | ReadOnly Property MyCriteria() As Criteria |
Returns the object's Criteria instance, strongly typed from CriteriaObject. |
| AddressTypes | Public Enum AddressTypes: Correspondence, Payment, Physical |
Enumerates the address-type codes used by GetAddress and GetAddressTypeCode. |
| GetAddress(dpi, providerLocationID, parentProviderLocationID, addressType) | Shared Function GetAddress(ByVal dpi As IDataPortalInfo, ByVal providerLocationID As Decimal, ByVal parentProviderLocationID As Decimal, Optional ByVal addressType As AddressTypes = AddressTypes.Correspondence) As clsProviderAddress |
Resolves a child/parent provider location pair by ID and returns the effective address for the given address type. |
| GetAddress(dpi, providerLocation, parentProviderLocationID, addressType) | Shared Function GetAddress(ByVal dpi As IDataPortalInfo, ByVal providerLocation As clsProviderLocation, ByVal parentProviderLocationID As Decimal, Optional ByVal addressType As AddressTypes = AddressTypes.Correspondence) As clsProviderAddress |
Resolves the parent provider location by ID and returns the effective address given an already-loaded child clsProviderLocation. |
| GetAddress(providerLocation, parentProviderLocation, addressType) | Shared Function GetAddress(ByVal providerLocation As clsProviderLocation, ByVal parentProviderLocation As clsProviderLocation, Optional ByVal addressType As AddressTypes = AddressTypes.Correspondence) As clsProviderAddress |
Returns the parent location's address (cloned, with IsParent/ParentName/ParentProviderLocationID set and the child's name/location applied) when the parent address is not empty; otherwise returns the child's own address. |
| GetAddressTypeCode | Shared Function GetAddressTypeCode(ByVal addressType As AddressTypes) As String |
Maps an AddressTypes enum value to its persisted code (COR, PAY, PHY); throws Exception for an unrecognized value. |
| IsAddrCityStNull | Function IsAddrCityStNull() As Boolean |
Returns whether the AddrCitySt backing field is DBNull. |
| Equals(objA, objB) | Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean |
Returns whether both objects are clsProviderAddress instances with equal ProviderLocationID values. |
| Equals(inObject As Object) | Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean |
Returns whether inObject is a clsProviderAddress with an equal ProviderLocationID. |
| Equals(inObject As clsProviderAddress) | Overloads Function Equals(ByVal inObject As clsProviderAddress) As Boolean |
Returns whether inObject.ProviderLocationID equals this instance's ProviderLocationID. |
| GetHashCode | Overrides Function GetHashCode() As Integer |
Returns ProviderLocationID.GetHashCode(). |
| ToString | Overrides Function ToString() As String |
Returns ProviderLocationID converted to a string. |
Behavioral notes¶
IsValidandIsSavableboth call theMyBaseimplementation with no additional object-level rules currently added inAddBusinessRules(the method body is an empty template stub).BeforeRetrieveinitializesUpdateInfofrom the current data portal'sUserIDbefore the row is loaded.- The nested
Criteriaclass throwsApplicationExceptionfromCreateSQL,InsertSQL,UpdateSQL, andDeleteSQL; onlyRetrieveSQL(returningRETRIEVE_SQL, documented as SQL-005) is implemented, so instances are read-only/derived rather than independently persisted. GetAddressoverloads implement a "parent address wins" resolution rule: if the parent provider location's primary address for the requestedAddressTypesis not empty, a clone of the parent's address is returned (flagged withIsParent = True) with the child's own name/location substituted in; otherwise the child's own primary address is returned unchanged.
Constraints and usage notes¶
- Instances are constructed only through the
Protected Friendconstructors (parameterless, or withinProviderLocationID) or returned by theGetAddressshared functions; there is no publicNew.
Inherited members (from clsAddress)¶
clsProviderAddress inherits clsAddress (Business\SAIF.Business\ContactInfo\clsAddress.vb), which supplies the following public surface in addition to the members listed above:
| Member | Signature | Purpose |
|---|---|---|
| AddressLine1 / AddressLine2 / AddressLine3 / AddressLine4 | Property AddressLine1() As String (and AddressLine2/3/4) |
Get or set the four free-form address lines. |
| FormattedAddressLine1..6 / FormattedAddress / FormattedSingleLineAddress | ReadOnly Property FormattedAddressLine1() As String (and related) |
Return the address formatted for multi-line or single-line display, honoring ActiveFormating, FormatUsingName, and FormatUsingCountryName. |
| City / County / Country / CountryCode / StateCode / ZipCode / ZipCodePlus4 / ZipCodeNumeric | Property City() As String (and related) |
Get or set the city, county, country, state, and ZIP code components of the address. |
| CountryCodeInfo | ReadOnly Property CountryCodeInfo As CodeMappings.clsCountryCodeInfo |
Returns country reference data for the current CountryCode. |
| CareOf / ForLine / Name | Property CareOf() As String / Property ForLine() As String / Property Name() As String |
Get or set the "care of", "for", and addressee name lines. |
| Phone / PhoneNumber / Fax / FaxNumber / PhoneFormat | Property Phone() As clsPhone (and related) |
Get or set the address's phone/fax numbers and display format. |
| IsForeign / IsForeignModified | Property IsForeign() As Boolean / ReadOnly Property IsForeignModified() As Boolean |
Get or set whether the address is foreign, and whether that flag has been changed since load. |
| IsEmpty | Overridable ReadOnly Property IsEmpty() As Boolean |
Returns whether the address has no meaningfully populated fields. |
| IsComplete | ReadOnly Property IsComplete() As Boolean |
Returns whether the address has the minimum fields required to be considered complete. |
| ActiveFormating / FormatUsingName / FormatUsingCountryName / UseCounty / WebFormatting | Property ActiveFormating() As Boolean (and related) |
Toggle formatting behaviors used when building the Formatted... properties. |
| AddressRules | ReadOnly Property AddressRules() As clsAddress.clsRules |
Returns the nested rules-configuration object (clsRules) controlling which address fields are required/validated. |
| InitializeRules | Sub InitializeRules() |
Registers the address's business rules (required-field and format-validation rules) with the rules manager. |
| SetCountryName | Sub SetCountryName(ByVal inCountryName As String, Optional ByVal MarkAsDirty As Boolean = False) |
Sets the display country name, optionally marking the object dirty. |
| GetSmartString / SetSmartString | Function GetSmartString(ByVal inProperty As SmartProperty) As clsSmartString / Sub SetSmartString(ByVal inProperty As SmartProperty, ByVal inSmartString As clsSmartString) |
Get or set an address field as a clsSmartString, keyed by the SmartProperty enum. |
| MarkOld | Shadows Sub MarkOld() |
Marks the address and its rule state as unmodified/persisted. |
| ValidStateCode / ValidCountryCode / ValidStateZip / ValidOregonZip / GetCountryName | Shared Function ValidStateCode(ByVal inDataPortalInfo As IDataPortalInfo, ByVal inStateCode As String) As Boolean (and related) |
Shared lookup/validation helpers for state codes, country codes, state/ZIP combinations, and Oregon ZIP ranges. |
Inherited members (from clsBusinessBase)¶
This type inherits the following public surface from clsBusinessBase (Legacy\BusinessObjectFramework\clsBusinessBase.vb), in addition to the members listed above:
| Member | Signature | Purpose |
|---|---|---|
| MyGuid | ReadOnly Property MyGuid() As String |
Returns the internal GUID that uniquely identifies this in-memory object instance. |
| IsNew | ReadOnly Property IsNew() As Boolean |
Indicates whether the object has not yet been persisted. |
| IsDeleted | ReadOnly Property IsDeleted() As Boolean |
Indicates whether the object is marked for deletion. |
| IsDirty | Overridable ReadOnly Property IsDirty() As Boolean |
Indicates whether the object (or a child) has unsaved changes. |
| IsValid | Overridable ReadOnly Property IsValid() As Boolean |
Indicates whether the object currently has no broken validation rules. |
| ValidateOnDelete | Property ValidateOnDelete As Boolean |
Controls whether validation rules run before a delete operation. |
| Rules | ReadOnly Property Rules() As clsRulesManager |
Returns the rules manager that tracks broken rules for this object. |
| ErrorCount | ReadOnly Property ErrorCount() As Integer |
Returns the number of broken error-severity rules. |
| ErrorMessages | ReadOnly Property ErrorMessages() As String() |
Returns the text of all broken error-severity rules. |
| WarningCount | ReadOnly Property WarningCount() As Integer |
Returns the number of broken warning-severity rules. |
| WarningMessages | ReadOnly Property WarningMessages() As String() |
Returns the text of all broken warning-severity rules. |
| InformationalCount | ReadOnly Property InformationalCount() As Integer |
Returns the number of broken informational-severity rules. |
| InformationalMessages | ReadOnly Property InformationalMessages() As String() |
Returns the text of all broken informational-severity rules. |
| BeginEdit | Sub BeginEdit() |
Begins an editable transaction, snapshotting current field values. |
| CancelEdit | Sub CancelEdit() |
Rolls back field values to the last BeginEdit snapshot. |
| ApplyEdit | Sub ApplyEdit() |
Commits the current edit transaction, discarding the rollback snapshot. |
| Delete | Sub Delete() |
Marks the object for deletion on the next save. |
| Save | Overridable Function Save() As Boolean |
Persists the object (insert, update, or delete) through the BOF data portal, if valid. |
| SaveChild | Overridable Function SaveChild() As Boolean |
Persists the object as a child of a parent object/collection. |
| Clone | Function Clone() As Object |
Returns a deep copy of the object. |
| XMLElementName | Property XMLElementName() As String |
Gets or sets the XML element name used when serializing this object. |
| GetDataset | Sub GetDataset(ByRef inDS As DataSet) |
Populates a DataSet with the object's field values. |
| GetDataset (named table) | Sub GetDataset(ByRef inDS As DataSet, ByVal inTableName As String) |
Populates a DataSet table with the given name with the object's field values. |
| GetReportXML | Function GetReportXML(ByVal inElementName As String) As String |
Returns an XML fragment representing the object using the supplied element name. |
| GetReportXML (default name) | Function GetReportXML() As String |
Returns an XML fragment representing the object using the default XML element name. |
| ToXml | Function ToXml() As String |
Serializes the object to XML using the default element name. |
| ToXml (named tag) | Function ToXml(ByVal inTagName As String) As String |
Serializes the object to XML using the supplied tag name. |
| PreviousLinkItem / NextLinkItem | ReadOnly Property PreviousLinkItem() As ILinkItem / ReadOnly Property NextLinkItem() As ILinkItem |
Returns the adjacent linked-list item for collection traversal. |
| SetValueOnChange | Function SetValueOnChange(Of T)(ByRef inFieldValue As T, ByVal inSetValue As T, Optional ByVal inMarkDirty As Boolean = True) As Boolean |
Sets a backing field only when the value changes, optionally marking the object dirty. |
Sources¶
Business\SAIF.Business.View.Provider\clsProviderAddress.vbBusiness\SAIF.Business\ContactInfo\clsAddress.vb