clsHazardGroup¶
clsHazardGroup is the read-only SAIF BOF business object representing a single hazard-group reference row, hydrated from HAZARD_GROUP inside clsHazardGroupCollection's retrieve lifecycle (OP-02). It exposes hazard-group identity, description, and effective/expiration dates to callers of clsHazardGroupCollection.GetHazardGroups, and enforces read-only semantics by throwing on any create/update/delete SQL access (BR-POL-002).
Purpose¶
- Represent a single hazard group's identity, descriptive text, and effective/expiration window as an immutable BOF business object.
- Provide identity-based equality keyed on
HazardGroupIDso collections and callers can compare/deduplicate hazard groups consistently (BR-POL-003). - Reject any attempted create/update/delete via its nested
Criteriaclass, enforcing the library's query-only surface for this entity (BR-POL-002).
Context¶
- Namespace:
SAIF.Business.Policy - Assembly/package:
SAIF.Business.Policy(PolicyCommon)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
HazardGroupID |
ReadOnly Property HazardGroupID As String |
Unique identifier for the hazard group; also the identity used by Equals/GetHashCode/ToString. |
NCCIHazardGroupCode |
ReadOnly Property NCCIHazardGroupCode As String |
NCCI-assigned hazard group code for the row. |
ShortDescription |
ReadOnly Property ShortDescription As String |
Short display description of the hazard group. |
LongDescription |
ReadOnly Property LongDescription As String |
Full display description of the hazard group. |
CreateUser |
ReadOnly Property CreateUser As String |
User identifier that created the row. |
UpdateUser |
ReadOnly Property UpdateUser As String |
User identifier that last updated the row; unwrapped from clsSmartString. |
EffectiveDate |
ReadOnly Property EffectiveDate As Date |
Date the hazard group becomes effective; forms the lower bound of BR-POL-001's effective-dating window. |
CreateDate |
ReadOnly Property CreateDate As Date |
Date the row was created. |
ExpirationDate |
ReadOnly Property ExpirationDate As Date |
Date the hazard group expires; unwrapped from clsSmartDate.Value; a missing value is treated as open-ended by BR-POL-001. |
UpdateDate |
ReadOnly Property UpdateDate As Date |
Date the row was last updated; unwrapped from clsSmartDate.Value. |
MyCriteria |
ReadOnly Property MyCriteria As Criteria |
Strongly typed access to the object's Criteria; <Browsable(False)>, casts MyBase.CriteriaObject. |
IsValid |
Overrides ReadOnly Property IsValid As Boolean |
Delegates to MyBase; no additional validation is layered on. |
IsSavable |
Overrides ReadOnly Property IsSavable As Boolean |
Delegates to MyBase; combined with the throwing SQL properties this keeps the object read-only. |
Equals(objA, objB) |
Overloads Shared Function Equals(objA As clsHazardGroup, objB As clsHazardGroup) As Boolean |
Type-checked pairwise comparison by HazardGroupID (BR-POL-003). |
Equals(Object) |
Overloads Function Equals(obj As Object) As Boolean |
Compares this instance to another object by HazardGroupID when the object is a clsHazardGroup. |
Equals(clsHazardGroup) |
Overloads Function Equals(other As clsHazardGroup) As Boolean |
Compares this instance to another clsHazardGroup by HazardGroupID. |
GetHashCode() |
Overrides Function GetHashCode() As Integer |
Hash keyed on HazardGroupID, keeping hash and equality consistent. |
ToString() |
Overrides Function ToString() As String |
Returns the HazardGroupID as the string representation. |
Behavioral notes¶
- Identity, hashing, and string conversion are all keyed solely on
HazardGroupID(BR-POL-003); two rows with the same id but different descriptive text are considered equal. Load/Fill(protected/private, not public surface) mapHAZARD_GROUPcolumns to properties and callMarkOld()so the framework treats retrieved instances as persisted, not new.*- Every non-retrieve SQL property on the nested
Criteriaclass (CreateSQL/InsertSQL/UpdateSQL/DeleteSQL) isFriendand throwsApplicationException(clsConstants.Messages.InvalidSQLProperty), enforcing BR-POL-002 at the object level in addition to the owning collection.
Constraints and usage notes¶
- Instances are created only by the framework during
clsHazardGroupCollectionretrieval (Load) or via the object'sProtected Friend New(); there is no public constructor for ad hoc instantiation. - No in-repo consumer of
clsHazardGroupwas found; it exists for other applications that consume this library.*
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- SAIF.Business.Policy/clsHazardGroup.vb