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

# clsXDeferredPrintCollection

`clsXDeferredPrintCollection` is a collection of `clsXDeferredPrint` deferred print items. It extends `clsBusinessCollectionBase` and supports two retrieval modes: `byDate` (items older than a printed-date cutoff or more than 30 days old) and `byDocDescr` (unprinted items matching a document description). Collection-level insert, update, and delete `Before*` lifecycle methods are fully commented out — these SQL paths are dead code.

## Purpose
- Retrieve deferred print items eligible for batch processing or cleanup.
- Enforce the [BR-002](../../business-rules.md#br-002-deferred-print-retentioneligibility-rule) retention/eligibility rule via dynamic WHERE clause assembly.

## 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 |
| --- | --- | --- |
| `GetXdeferredPrintCollection` | `Public Shared Function GetXdeferredPrintCollection(inPrintedDate As Date) As clsXDeferredPrintCollection`* | Factory method — retrieves by date cutoff (`byDate` mode) using [SQL-010](../../sql/SQL-010-saif-services-printing-remote.md).* |
| `GetXdeferredPrintCollection` (overload) | `Public Shared Function GetXdeferredPrintCollection(inDocumentDescr As String) As clsXDeferredPrintCollection`* | Factory method — retrieves unprinted items by document description (`byDocDescr` mode) using [SQL-010](../../sql/SQL-010-saif-services-printing-remote.md).* |
| `Criteria` (nested class) | `Public Class Criteria Implements IBusinessCriteria` | Holds SQL text: `RetrieveSQL` ([SQL-010](../../sql/SQL-010-saif-services-printing-remote.md)); `CreateSQL` ([SQL-002](../../sql/SQL-002-saif-services-printing-remote.md)), `InsertSQL` ([SQL-005](../../sql/SQL-005-saif-services-printing-remote.md)), `UpdateSQL` ([SQL-016](../../sql/SQL-016-saif-services-printing-remote.md)), `DeleteSQL` ([SQL-020](../../sql/SQL-020-saif-services-printing-remote.md)) all have `Before*` methods commented out (dead code). |
| `Criteria.RetrieveType` | `Public Property RetrieveType As String`* | Controls WHERE clause variant: `byDate` or `byDocDescr`.* |

## Behavioral notes
- `Criteria.New` computes `ThirtyDaysAgoDate = Today.AddDays(-30)` to enforce the 30-day staleness threshold.*
- `BeforeRetrieve` dynamically appends the appropriate `WhereClause` and `SortOrder` to the base `RetrieveSQL` text based on `RetrieveType`, then binds parameters.*
- `AfterRetrieve` iterates `IDataReader`, instantiating a `clsXDeferredPrint` for each row via `Load()`/`Fill()`.*
- `CreateSQL`, `InsertSQL`, `UpdateSQL`, and `DeleteSQL` are defined in `Criteria` but their corresponding `Before*` methods are fully commented out — all are dead code in this library.

## Constraints and usage notes
- `byDate` mode binds both `:PrintedDate` and `:ThirtyDaysAgoDate`.
- `byDocDescr` mode binds `:DocumentDescr` and filters only unprinted items (`PRINTED_DATE IS NULL`).
- Collection-level insert, update, and delete are not operational in 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
- `Services\SAIF.Services.Printing.Remote\clsXDeferredPrintCollection.vb`
