---
title: clsXPrintControlCollection
summary: API reference for clsXPrintControlCollection.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Services.Printing.Remote
reference_type: package
---

# clsXPrintControlCollection

`clsXPrintControlCollection` is a collection of `clsXPrintControl` batch headers. It extends `clsBusinessCollectionBase` and retrieves unprocessed or stale print-control batch headers from `XPRINT_CONTROL` using a date-based staleness filter. Its `Criteria` class implements `IBusinessCriteria` for read and delete operations; insert and update `Before*` methods are commented out (dead code).

## Purpose
- Retrieve collections of `clsXPrintControl` instances representing pending or stale print-control batches.
- Provide delete capability to remove a batch header from `XPRINT_CONTROL` by primary key.

## Context
- Namespace: `SAIF.Services.Printing.Remote`
- Assembly/package: `SAIF.BOF.Services.Printing.Remote`
- Base class: `clsBusinessCollectionBase` (from `SAIF.BOF.Framework`/`SAIF.BOF.Business`)

## Public members

| Member | Signature | Purpose |
| --- | --- | --- |
| `GetXprintControlCollection` | `Public Shared Function GetXprintControlCollection(inProcessedDate As Date) As clsXPrintControlCollection` | Factory method — retrieves all batch headers where `PROCESSED_DATE < inProcessedDate` OR `CREATE_DATE < ThirtyDaysAgoDate` via [SQL-014](../../sql/SQL-014-saif-services-printing-remote.md).* |
| `Criteria` (nested class) | `Public Class Criteria Implements IBusinessCriteria` | Holds SQL text: `RetrieveSQL` ([SQL-014](../../sql/SQL-014-saif-services-printing-remote.md)), `DeleteSQL` ([SQL-023](../../sql/SQL-023-saif-services-printing-remote.md)); `CreateSQL` ([SQL-003](../../sql/SQL-003-saif-services-printing-remote.md)), `InsertSQL` ([SQL-008](../../sql/SQL-008-saif-services-printing-remote.md)), `UpdateSQL` ([SQL-018](../../sql/SQL-018-saif-services-printing-remote.md)) are dead code (corresponding `Before*` methods commented out). |

## Behavioral notes
- `Criteria.New` computes `ThirtyDaysAgoDate = Today.AddDays(-30)` to enforce the staleness threshold ([BR-003](../../business-rules.md#br-003-print-control-batch-staleness-rule)).*
- `AfterRetrieve` iterates the `IDataReader` result, instantiating a `clsXPrintControl` for each row via `Load()`/`Fill()`.*
- `AfterDelete` checks `RowsAffected <> 1` per [BR-001](../../business-rules.md#br-001-row-count-contention-check).
- `CreateSQL` (SQL-003), `InsertSQL` (SQL-008), and `UpdateSQL` (SQL-018) have their corresponding `Before*` lifecycle methods fully commented out — these SQL paths are dead code.

## Constraints and usage notes
- Collection retrieve is date-driven; the caller supplies a `processedDate` cutoff.
- Consumed exclusively via NuGet package `SAIF.BOF.Services.Printing.Remote`.*

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `Services\SAIF.Services.Printing.Remote\clsXPrintControlCollection.vb`
