---
title: "clsMenuPageCollection"
summary: "API reference for clsMenuPageCollection."
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# clsMenuPageCollection

Loads and looks up page definitions.

## Purpose
- Provide all page rows for maintenance.
- Support exact in-memory page lookups.

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Item (default, keyed by seq num) | `Default Public Overloads ReadOnly Property Item(ByVal inMenuPageSeqNum As Decimal) As clsMenuPage` | Looks up a menu page in the loaded collection by its `MenuPageSeqNum` key, returning `Nothing` if no item matches. |
| Item (default, keyed by app/link) | `Default Public Overloads ReadOnly Property item(ByVal inAppCode As String, ByVal inPageLink As String) As clsMenuPage` | Looks up the first loaded page matching the supplied application code and (link-only, case-insensitive) page link, returning `Nothing` if no item matches. |
| ItemExact | `Public ReadOnly Property ItemExact(ByVal inAppCode As String, ByVal inPageLink As String) As clsMenuPage` | Finds the single loaded page whose application code and page link exactly match the supplied values, used to detect duplicate page definitions during maintenance. |
| CurrentItem | `Public Shadows ReadOnly Property CurrentItem() As clsMenuPage` | Returns the base collection's current item cast to `clsMenuPage`, avoiding caller-side casting when navigating the loaded page set. |
| Save | `Public Overrides Function Save() As Boolean` | Persists the current object state through the SAIF data-portal lifecycle. |
| Add | `Public Shadows Function Add(ByVal inclsMenuPage As clsMenuPage) As Integer` | Appends an already-constructed row to the in-memory collection so it participates in the next `Save()` and any collection-wide iteration, without issuing a retrieve. |
| Contains | `Public Overloads Function Contains(ByVal inclsMenuPage As clsMenuPage) As Boolean` | Scans the loaded collection for an item whose `MenuPageSeqNum` equals the supplied object's `MenuPageSeqNum` (`clsMenuPage.Equals` compares only that sequence-number field). |
| Contains | `Public Overloads Function Contains(ByVal inMenuPageSeqNum As Decimal) As Boolean` | Scans the loaded collection for an item whose `MenuPageSeqNum` property equals the supplied value. |
| ContainsDeleted | `Public Overloads Function ContainsDeleted(ByVal inclsMenuPage As clsMenuPage) As Boolean` | Scans the deleted-items list for an entry whose `MenuPageSeqNum` equals the supplied object's `MenuPageSeqNum`. |
| ContainsDeleted | `Public Overloads Function ContainsDeleted(ByVal inMenuPageSeqNum As Decimal) As Boolean` | Scans the deleted-items list for an entry matching the supplied sequence number, via `clsMenuPage.Equals(Object)`. |
| Remove | `Public Overloads Sub Remove(ByVal inMenuPageSeqNum As Decimal)` | Removes the menu page matching the supplied key from the in-memory collection and moves it to the inherited deleted-items list so a subsequent `Save()` still issues the delete statement. |
| Where | `Public Function Where(ByVal match As Predicate(Of clsMenuPage)) As clsMenuPageCollection` | Returns a filtered typed subset of the loaded collection. |
| ToList | `Public Function ToList() As List(Of clsMenuPage)` | Copies the typed collection into a standard list. |
| NewMenuPages | `Public Shared Function NewMenuPages(ByVal inDataportal As IDataPortalInfo) As clsMenuPageCollection` | Creates a new typed object using the supplied data-portal context. |
| GetAllMenuPages | `Public Shared Function GetAllMenuPages(ByVal inDataportal As IDataPortalInfo) As clsMenuPageCollection` | Retrieves the full typed set from Oracle. |

## Behavioral notes
- Reads the full page table.

## Constraints and usage notes
- Collection wrapper around page rows.

## Inherited public members

No `dependency-resolution.json` was produced for this run, so the members below are a best-effort inference from typical SAIF BOF framework (`clsBusinessCollection(Of T)`) patterns observed elsewhere in this codebase, not a Legends CLI-sourced dependency lookup.**

### From clsBusinessCollection(Of clsMenuPage) (SAIF.BOF.Framework)**

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Count | `Public ReadOnly Property Count() As Integer` | *Purpose could not be verified beyond the standard collection-indexer contract**; inferred usage is bounding `For` loops when callers iterate loaded `clsMenuPage` rows outside `GetEnumerator`. | `clsBusinessCollection(Of T)` |
| Item | `Public Default ReadOnly Property Item(ByVal index As Integer) As clsMenuPage` | *Purpose could not be verified beyond the standard collection-indexer contract**; inferred usage is positional access to a loaded `clsMenuPage` row during indexed iteration or lookup-by-slot. | `clsBusinessCollection(Of T)` |
| GetEnumerator | `Public Function GetEnumerator() As IEnumerator(Of clsMenuPage)` | Supports `For Each` iteration over the loaded collection.** | `clsBusinessCollection(Of T)` |
| IsDirty | `Public Overridable ReadOnly Property IsDirty() As Boolean` | Reports whether any loaded or deleted item in the collection has pending changes.** | `clsBusinessCollection(Of T)` |
| IsValid | `Public Overridable ReadOnly Property IsValid() As Boolean` | Reports whether every loaded item in the collection independently reports itself valid.** | `clsBusinessCollection(Of T)` |

> **Note:** Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.Menu\clsMenuPageCollection.vb`
