---
title: Criteria
summary: API reference for Criteria.
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy
reference_type: package
---

# Criteria

`Criteria` is `clsHazardGroupCollection`'s nested criteria class implementing `IBusinessCriteria`. Unlike `clsHazardGroup.Criteria`, this class defines a real `RetrieveSQL` that selects all rows from `HAZARD_GROUP` whose effective/expiration date window contains the supplied `EffectiveDate`, per [BR-POL-012](../../../../business-rules.md#br-pol-012-hazard-groups-are-filtered-by-effective-date-window); its create/delete/insert/update SQL properties still throw, since hazard-group data is read-only, per [BR-POL-011](../../../../business-rules.md#br-pol-011-hazard-group-data-is-read-only).

## Purpose
- Carry the `IDataPortalInfo` context and the `EffectiveDate` parameter used to filter hazard groups by date window.
- Build the `RetrieveSQL` statement (selecting from `HAZARD_GROUP`) with a `WHERE` clause requiring `:EffectiveDate` to fall within `[EFFECTIVE_DATE, NVL(EXPIRATION_DATE, EffectiveDate + 1))`, per [BR-POL-012](../../../../business-rules.md#br-pol-012-hazard-groups-are-filtered-by-effective-date-window).
- Forbid create/delete/insert/update operations by throwing from those SQL properties, per [BR-POL-011](../../../../business-rules.md#br-pol-011-hazard-group-data-is-read-only).

## Context
- Namespace: `SAIF.Business.Policy`
- Assembly/package: `SAIF.Business.Policy`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `New(inDataportal)` | `Public Sub New(ByVal inDataportal As IDataPortalInfo)` | Constructs the criteria object with the supplied data portal context. |
| `DataPortalInfo` | `Friend Property DataPortalInfo() As IDataPortalInfo` | The data portal context used for data access operations. |
| `EffectiveDate` | `Public Property EffectiveDate() As Date` | The date used to filter hazard groups whose effective/expiration window contains it, per [BR-POL-012](../../../../business-rules.md#br-pol-012-hazard-groups-are-filtered-by-effective-date-window). |
| `CreateSQL` | `Friend ReadOnly Property CreateSQL() As String` | Throws `ApplicationException`; creation is not supported, per [BR-POL-011](../../../../business-rules.md#br-pol-011-hazard-group-data-is-read-only). |
| `DeleteSQL` | `Friend ReadOnly Property DeleteSQL() As String` | Throws `ApplicationException`; deletion is not supported, per [BR-POL-011](../../../../business-rules.md#br-pol-011-hazard-group-data-is-read-only). |
| `InsertSQL` | `Friend ReadOnly Property InsertSQL() As String` | Throws `ApplicationException`; insertion is not supported, per [BR-POL-011](../../../../business-rules.md#br-pol-011-hazard-group-data-is-read-only). |
| `RetrieveSQL` | `Friend ReadOnly Property RetrieveSQL() As String` | Selects `HAZARD_GROUP_ID`, descriptions, effective/expiration dates, and audit fields from `HAZARD_GROUP`, filtered to rows whose date window contains `EffectiveDate`, per [BR-POL-012](../../../../business-rules.md#br-pol-012-hazard-groups-are-filtered-by-effective-date-window). |
| `UpdateSQL` | `Friend ReadOnly Property UpdateSQL() As String` | Throws `ApplicationException`; update is not supported, per [BR-POL-011](../../../../business-rules.md#br-pol-011-hazard-group-data-is-read-only). |


## 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`
