Skip to content

clsCustomerContactItem

clsCustomerContactItem is a public MustInherit class in SAIF.Business.ContactInfo that provides active/primary flags, effective-dated lifecycle fields, note text, and null-handling helpers for contact items implementing ICustomerContactInfo.

Purpose

  • Supplies shared IsActive and IsPrimary flags for contact-information items.
  • Stores effective date, expiration date, and note text through smart wrappers that support explicit empty-state handling.
  • Exposes null-check and null-set helper methods for the effective date, expiration date, and note text fields.
  • Requires subclasses to provide an identifier through GetID() while sharing IDateRange and ICustomerContactInfo behavior.

Context

  • Namespace: SAIF.Business.ContactInfo
  • Assembly/package: SAIF.Business

Public members

Member Signature Purpose
GetID MustOverride Function GetID() As Decimal Implements ICustomerContactInfo.GetID Requires each derived contact item to supply its identifier value.
IsActive Public Property IsActive As Boolean Implements ICustomerContactInfo.IsActive Gets or sets whether the contact-information item is active.
IsPrimary Public Property IsPrimary As Boolean Implements ICustomerContactInfo.IsPrimary Gets or sets whether the contact-information item is the primary entry.
EffectiveDate Public Property EffectiveDate As Date Implements Framework.IDateRange.BeginDate, ICustomerContactInfo.EffectiveDate Gets or sets the effective date for the item.
ExpirationDate Public Property ExpirationDate As Date Implements Framework.IDateRange.EndDate, ICustomerContactInfo.ExpirationDate Gets or sets the expiration date for the item.
NoteText Public Property NoteText As String Implements ICustomerContactInfo.NoteText Gets or sets the note text associated with the item.
IsEffectiveDateNull Public Function IsEffectiveDateNull() As Boolean Implements Framework.IDateRange.IsBeginDateNull, ICustomerContactInfo.IsEffectiveDateNull Returns whether the effective date is stored as empty.
IsExpirationDateNull Public Function IsExpirationDateNull() As Boolean Implements Framework.IDateRange.IsEndDateNull, ICustomerContactInfo.IsExpirationDateNull Returns whether the expiration date is stored as empty.
IsNoteTextNull Public Function IsNoteTextNull() As Boolean Implements ICustomerContactInfo.IsNoteTextNull Returns whether the note text is stored as empty.
SetEffectiveDateNull Public Sub SetEffectiveDateNull() Implements ICustomerContactInfo.SetEffectiveDateNull Clears the effective date and marks the object dirty.
SetExpirationDateNull Public Sub SetExpirationDateNull() Implements ICustomerContactInfo.SetExpirationDateNull Clears the expiration date and marks the object dirty.
SetNoteTextNull Public Sub SetNoteTextNull() Implements ICustomerContactInfo.SetNoteTextNull Clears the note text and marks the object dirty.

Behavioral notes

  • IsActive and IsPrimary both default to True through their backing fields.
  • Property setters call MarkDirty() only when the underlying smart value or Boolean flag actually changes.
  • The null-set helpers call SetEmpty() on the underlying smart wrappers and then mark the object dirty.

Constraints and usage notes

  • Derived classes must implement GetID() to satisfy the ICustomerContactInfo contract.
  • Empty-state semantics come from clsSmartDate and clsSmartString, so callers should use the provided Is...Null and Set...Null helpers when they need to preserve that distinction.

Sources

  • Business\SAIF.Business\ContactInfo\clsCustomerContactItem.vb