clsAgency¶
clsAgency is the aggregate-root BOF business object for the agency domain. It owns the primary agency identity and status fields, lazy access to contracts, offices, and producers, and the helper logic that classifies agencies for commission, regional-office, and display-name scenarios.
Purpose¶
- Represent one
AGENCYrow together with the business-facing status, naming, and appointment helpers that callers use most often. - Provide lazy navigation to related contracts, offices, and producers so callers can traverse the agency object graph.
- Enforce agency-specific validation and identity semantics through BR-002 and BR-025.
Context¶
- Namespace:
SAIF.Business.Policy.Agency - Assembly/package:
SAIF.Business.Policy.Agency
Public members¶
| Member | Signature | Purpose |
|---|---|---|
SAIFAgencySeqNum |
Public Const SAIFAgencySeqNum As Decimal = 0 |
Publishes the special sequence number used by IsSAIF to recognize SAIF-owned agencies. |
SAIFNotYetAppointedAgencySeqNum |
Public Const SAIFNotYetAppointedAgencySeqNum As Decimal = 944 |
Publishes the special sequence number used to flag the not-yet-appointed agency. |
IsAgencyCopyPaperless |
Public ReadOnly Property IsAgencyCopyPaperless As Boolean |
Indicates whether the agency's own copy of correspondence is delivered paperless instead of printed.* |
IsPolicyHolderCopyForAgencyPaperless |
Public ReadOnly Property IsPolicyHolderCopyForAgencyPaperless As Boolean |
Indicates whether the policyholder copy routed through this agency is delivered paperless instead of printed.* |
AgencySeqNum |
Public ReadOnly Property AgencySeqNum() As Decimal |
Exposes the agency identity key used for keyed retrieval and equality checks. |
AppointedDate |
Public ReadOnly Property AppointedDate() As Date |
Returns the date SAIF appointed the agency, used for appointment-based eligibility checks. |
CancelReasonCode |
Public ReadOnly Property CancelReasonCode() As String |
Returns the reason code recorded when the agency appointment was cancelled. |
CheckAddressLocationSeqNum |
Public ReadOnly Property CheckAddressLocationSeqNum() As Decimal |
Returns the office location sequence number where the agency's commission checks are mailed. |
CommissionPlacedOnHoldDate |
Public ReadOnly Property CommissionPlacedOnHoldDate() As Date |
Returns the effective date commission payments were placed on hold for the agency. |
CommissionStatementRouteInstruction |
Public ReadOnly Property CommissionStatementRouteInstruction() As String |
Returns free-text routing instructions used when distributing the agency's commission statements. |
Contracts |
Public ReadOnly Property Contracts() As clsAgencyContractCollection |
Lazy-loads the agency's contract collection for downstream classification and eligibility checks. |
ContractType |
Public ReadOnly Property ContractType(ByVal inDate As Date) As clsAgencyContract.AgencyContractTypes |
Returns the first active contract type for a requested date. |
CreateDate |
Public ReadOnly Property CreateDate() As Date |
Returns the date the agency record was created, for audit history. |
CreateUser |
Public ReadOnly Property CreateUser() As String |
Returns the user ID that created the agency record, for audit history. |
EffectiveDate |
Public ReadOnly Property EffectiveDate() As Date |
Returns the date the agency appointment became effective, used by IsActive and other eligibility checks. |
ExpirationDate |
Public ReadOnly Property ExpirationDate() As Date |
Returns the date the agency appointment expires, used by IsActive/IsExpired checks. |
FederalEmployerID |
Public ReadOnly Property FederalEmployerID() As String |
Returns the agency's Federal Employer ID, used to look up or filter agencies by FEID. |
HasActiveProducerCommissionContract |
Public ReadOnly Property HasActiveProducerCommissionContract(ByVal inDate As Date) As Boolean |
Reports whether any active contract qualifies for producer commissions on the requested date. |
HasProducers |
Public ReadOnly Property HasProducers() As Boolean |
Indicates whether producer-level detail is tracked for the agency. |
IsActive |
Public ReadOnly Property IsActive(ByVal inDate As Date) As Boolean |
Applies the shared effective/expiration-window test to the agency. |
IsSAIFNotYetAppointedAgency |
Public ReadOnly Property IsSAIFNotYetAppointedAgency() As Boolean |
Identifies the not-yet-appointed agency row. |
IsCheckLimitOverrideAllowed |
Public ReadOnly Property IsCheckLimitOverrideAllowed() As Boolean |
Indicates whether the agency is permitted to override the standard check-issuance limit. |
IsCommissionHeld |
Public ReadOnly Property IsCommissionHeld() As Boolean |
Indicates whether commission payments to the agency are currently on hold. |
IsDirectWriter |
Public ReadOnly Property IsDirectWriter() As Boolean |
Indicates whether the agency operates as a direct writer rather than through independent producers. |
IsElectronicFundsTransfer |
Public ReadOnly Property IsElectronicFundsTransfer() As Boolean |
Indicates whether the agency receives payments via electronic funds transfer rather than paper check. |
IsExpired |
Public ReadOnly Property IsExpired() As Boolean |
Indicates whether the agency appointment has an expiration date recorded, signaling that the appointment has ended. |
IsSAIF |
Public ReadOnly Property IsSAIF() As Boolean |
Identifies the special SAIF agency row. |
IsValidForOffice |
Public ReadOnly Property IsValidForOffice(ByVal inEffectiveDate As Date, ByVal inIsRegionalOffice As Boolean) As Boolean |
Rejects regional-office use when the leading active appointment is service-center-only. |
LegalName |
Public ReadOnly Property LegalName() As String |
Returns the agency's registered legal name, distinct from its display name. |
LicenseNumber |
Public ReadOnly Property LicenseNumber() As String |
Returns the agency's insurance producer license number. |
Name |
Public ReadOnly Property Name() As String |
Returns the title-cased agency display name used by callers and reports. |
NameAbbreviated |
Public ReadOnly Property NameAbbreviated() As String |
Returns the shortened display name used where space-constrained output is required. |
Offices |
Public ReadOnly Property Offices() As clsAgencyOfficeCollection |
Lazy-loads the agency's office/location collection. |
Producers |
Public ReadOnly Property Producers() As clsProducerCollection |
Lazy-loads the agency's producer collection. |
StatementAddressLocationSeqNum |
Public ReadOnly Property StatementAddressLocationSeqNum() As Decimal |
Returns the office location sequence number where the agency's commission statements are mailed. |
UpdateDate |
Public ReadOnly Property UpdateDate() As Date |
Returns the date the agency record was last updated, for audit history. |
UpdateUser |
Public ReadOnly Property UpdateUser() As String |
Returns the user ID that last updated the agency record, for audit history. |
VendorNumber |
Public ReadOnly Property VendorNumber() As String |
Returns the accounts-payable vendor number associated with the agency, used for payment processing. |
IsExcludedFromNoTouchQuote |
Public ReadOnly Property IsExcludedFromNoTouchQuote As Boolean |
Indicates whether the agency is excluded from no-touch (automated) quote processing. |
GetAgency |
Public Shared Function GetAgency(ByVal inDataportal As IDataPortalInfo, ByVal inAgencySeqNum As Decimal) As clsAgency |
Entry point for keyed BOF retrieval of one agency object. |
Equals (shared) |
Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean |
Compares two objects for agency-identity equality when both are clsAgency instances. |
Equals (override) |
Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean |
Compares this agency to another object by delegating to the identity-based Equals(clsAgency) overload. |
Equals |
Public Overloads Function Equals(ByVal inObject As clsAgency) As Boolean |
Compares agency objects by their business identity key. |
GetHashCode |
Public Overrides Function GetHashCode() As Integer |
Returns a hash code derived from the agency sequence number, for use in hash-based collections. |
ToString |
Public Overrides Function ToString() As String |
Returns the agency sequence number as a string, used for display and lookups. |
Inherited public members¶
Members in this section are inherited from clsBusinessBase in SAIF.Framework.Core. They are available on this type through inheritance.
| Member | Signature | Purpose | Origin |
|---|---|---|---|
Rules |
Property Rules As clsRulesManager |
Exposes the BOF rules manager used to run validation logic for agency objects.* | SAIF.Framework.Core — clsBusinessBase |
BeginEdit |
Sub BeginEdit() |
Opens an edit scope for BOF object state changes.* | SAIF.Framework.Core — clsBusinessBase |
CancelEdit |
Sub CancelEdit() |
Rolls back the current BOF edit scope.* | SAIF.Framework.Core — clsBusinessBase |
ApplyEdit |
Sub ApplyEdit() |
Commits the current BOF edit scope.* | SAIF.Framework.Core — clsBusinessBase |
SetPreviousLink |
Sub SetPreviousLink(item As ILinkItem) |
Establishes a backward link to another business object for linked-list traversal scenarios.* | SAIF.Framework.Core — clsBusinessBase |
SetNextLink |
Sub SetNextLink(item As ILinkItem) |
Establishes a forward link to another business object for linked-list traversal scenarios.* | SAIF.Framework.Core — clsBusinessBase |
InsertLinkAfter |
Sub InsertLinkAfter(item As ILinkItem) |
Inserts a linked item immediately after this agency in the linked chain.* | SAIF.Framework.Core — clsBusinessBase |
InsertLinkBefore |
Sub InsertLinkBefore(item As ILinkItem) |
Inserts a linked item immediately before this agency in the linked chain.* | SAIF.Framework.Core — clsBusinessBase |
RemoveLinks |
Sub RemoveLinks() |
Detaches this agency from its linked neighbors, repairing the remaining chain.* | SAIF.Framework.Core — clsBusinessBase |
Error |
ReadOnly Property Error As String (via IDataErrorInfo) |
Returns a summary validation-error message for the agency, sourced from broken-rule state.* | SAIF.Framework.Core — clsBusinessBase |
Item(columnName) |
ReadOnly Property Item(columnName As String) As String (via IDataErrorInfo) |
Returns a per-property validation-error message for the agency.* | SAIF.Framework.Core — clsBusinessBase |
AllowCache |
Public Property AllowCache() As Boolean |
Controls whether the BOF runtime may cache the agency instance.* | SAIF.Framework.Core — clsUndoableBase |
DumpState |
Public Sub DumpState() |
Writes the agency object's field data to the debugger output window, for diagnostic use.* | SAIF.Framework.Core — clsUndoableBase |
Behavioral notes¶
clsAgencyis the root of the library's lazy object graph; contracts, offices, and producers are not loaded until the corresponding property is read.- Most agency status helpers ultimately interpret fields loaded from
AGENCY, including date windows,Y/Nflags, and special sequence-number constants.
Constraints and usage notes¶
- Retrieval is read-only; callers cannot persist agency changes through this type.
- Bulk child-loading through
clsAgencyCollectionis preferred when many agencies must be traversed.
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.
Sources¶
Business\SAIF.Business.Policy.Agency\clsAgency.vb