clsHazardGroupCollection¶
clsHazardGroupCollection is a read-only business collection (clsBusinessCollection(Of clsHazardGroup)) that retrieves the set of clsHazardGroup records effective as of a given date from the HAZARD_GROUP table, per BR-POL-012. Editing, removal, and general saving are disabled at construction (AllowEdit = False, AllowRemove = False), consistent with hazard-group data being read-only, per BR-POL-011.
Purpose¶
- Retrieve all
clsHazardGrouprecords whose effective/expiration date window contains a suppliedEffectiveDate, viaGetHazardGroups, per BR-POL-012. - Provide indexed (
Item) and keyed (ItemByKey) lookup of hazard groups by position orHazardGroupID, consistent with hazard-group identity being the ID alone, per BR-POL-016. - Support membership checks (
Contains,ContainsDeleted) and removal (Remove) against the in-memory collection, by object or byHazardGroupID. - Report the collection itself as always valid and never independently savable, reflecting the read-only nature of hazard-group data, per BR-POL-011.
Context¶
- Namespace:
SAIF.Business.Policy - Assembly/package:
SAIF.Business.Policy
Public members¶
| Member | Signature | Purpose |
|---|---|---|
Item |
Default Public Overloads ReadOnly Property Item(ByVal Index As Integer) As clsHazardGroup |
The default indexer, returning the clsHazardGroup at the specified position. |
ItemByKey |
Public ReadOnly Property ItemByKey(ByVal inHazardGroupID As String) As clsHazardGroup |
Returns the clsHazardGroup matching the specified HazardGroupID, or Nothing if not found. |
MyCriteria |
Public ReadOnly Property MyCriteria() As Criteria |
The nested Criteria object used to retrieve this collection. |
IsValid |
Public Overrides ReadOnly Property IsValid() As Boolean |
Always returns True; the collection has no independent validation rules. |
IsSavable |
Public ReadOnly Property IsSavable() As Boolean |
Always returns False; the collection cannot be saved, consistent with hazard groups being read-only, per BR-POL-011. |
Contains(inObject) |
Public Overloads Function Contains(ByVal inObject As clsHazardGroup) As Boolean |
Returns True if an equal clsHazardGroup exists in the collection. |
Contains(inHazardGroupID) |
Public Overloads Function Contains(ByVal inHazardGroupID As String) As Boolean |
Returns True if a clsHazardGroup with the specified ID exists in the collection. |
ContainsDeleted(inObject) |
Public Overloads Function ContainsDeleted(ByVal inObject As clsHazardGroup) As Boolean |
Returns True if an equal clsHazardGroup exists in the collection's deleted-items list. |
ContainsDeleted(inHazardGroupID) |
Public Overloads Function ContainsDeleted(ByVal inHazardGroupID As String) As Boolean |
Returns True if a clsHazardGroup with the specified ID exists in the collection's deleted-items list. |
Remove(inObject) |
Public Overloads Sub Remove(ByVal inObject As clsHazardGroup) |
Removes the specified clsHazardGroup from the collection. |
Remove(inHazardGroupID) |
Public Overloads Sub Remove(ByVal inHazardGroupID As String) |
Removes the clsHazardGroup matching the specified ID from the collection. |
GetHazardGroupCollection |
<Obsolete("Use GetHazardGroups instead.")> Public Shared Function GetHazardGroupCollection(ByVal inDataportal As IDataPortalInfo, ByVal inEffectiveDate As Date) As clsHazardGroupCollection |
Retrieves the hazard-group collection effective as of the supplied date. Obsolete — superseded by GetHazardGroups. |
GetHazardGroups |
Public Shared Function GetHazardGroups(ByVal inDataportal As IDataPortalInfo, ByVal inEffectiveDate As Date) As clsHazardGroupCollection |
Retrieves the hazard-group collection effective as of the supplied date, per BR-POL-012. This is the current, non-obsolete entry point. |
Inherited public members¶
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| First | Sub First() |
Moves the inherited collection traversal cursor to the first item* | SAIF.Framework.Core — clsBusinessCollectionBase |
Behavioral notes¶
- Source declaration:
Business\SAIF.Business.Policy\clsHazardGroupCollection.vb. - Related operations, rules, and SQL are cross-referenced from the library-level documentation.
Constraints and usage notes¶
- Consumers should rely on the declared public surface rather than internal implementation details.
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\clsHazardGroupCollection.vb