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

# clsMenuCategoryCode

Owns one menu-category lookup row.

## Purpose
- Persist category code and description values.
- Supply labels used to group menu items.

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Code | `Public Property Code() As String` | Natural key that identifies the category in `MENU_CATEGORY_CODE`; used to join and group `MENU_ITEM` rows by category. |
| Description | `Public Property Description() As String` | Human-readable label shown for this category in menu-category lookup lists and rendered navigation. |
| IsValid | `Public Overrides ReadOnly Property IsValid() As Boolean` | Overrides `clsBusinessBase.IsValid`. `AddBusinessRules()` for this type contains only commented-out template placeholders, so no local Rules-engine field-level validation exists; the confirmed behavior is inherited from `clsBusinessBase`.* |
| IsDirty | `Public Overrides ReadOnly Property IsDirty() As Boolean` | Reports whether any of the category code's own property values have changed since load, overriding the inherited `clsBusinessBase.IsDirty`. |
| Equals | `Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean` | Compares business-object identity using this type's key semantics. |
| Equals | `Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean` | Compares business-object identity using this type's key semantics. |
| Equals | `Public Overloads Function Equals(ByVal inObject As clsMenuCategoryCode) As Boolean` | Compares business-object identity using this type's key semantics. |
| GetHashCode | `Public Overrides Function GetHashCode() As Integer` | Returns a hash based on the type's business identity semantics. |
| ToString | `Public Overrides Function ToString() As String` | Returns the type's string representation for diagnostics or UI binding. |
| NewMenuCategoryCode | `Public Shared Function NewMenuCategoryCode(ByVal inDataportal As IDataPortalInfo, ByVal inCode As String) As clsMenuCategoryCode` | Creates a new typed object using the supplied data-portal context. |
| GetMenuCategoryCode | `Public Shared Function GetMenuCategoryCode(ByVal inDataportal As IDataPortalInfo, ByVal inCode As String) As clsMenuCategoryCode` | Retrieves the single `MENU_CATEGORY_CODE` row matching the natural key `inCode`, populating the category's `Description` label used when grouping `MENU_ITEM` rows. |

## Behavioral notes
- Write operations use [BR-MENU-001](../../business-rules.md#br-menu-001-optimistic-contention-on-write).

## Constraints and usage notes
- Natural-key lookup object.

## 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 (`clsBusinessBase`) patterns observed elsewhere in this codebase, not a Legends CLI-sourced dependency lookup.**

### From clsBusinessBase (SAIF.BOF.Framework)**

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Save | `Public Overridable Function Save() As Boolean` | Routes the object through the inherited data-portal lifecycle to persist it when dirty and valid.** | `clsBusinessBase` |
| Delete | `Public Overridable Sub Delete()` | Marks the object for deletion and, on `Save()`, routes it through `BeforeDelete`/`AfterDelete`.** | `clsBusinessBase` |
| AddErrorMessage | `Protected Sub AddErrorMessage(ByVal inKey As String, ByVal inMessage As String)` | Records a named validation/error message consulted by the inherited `IsValid` implementation.** | `clsBusinessBase` |
| MarkOld | `Protected Sub MarkOld()` | Clears the object's dirty flag after a successful load or save.** | `clsBusinessBase` |
| MarkNew | `Protected Sub MarkNew()` | Marks a freshly constructed object as new/dirty so `Save()` treats it as an insert candidate.** | `clsBusinessBase` |

> **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
- `SAIF.Business.Menu\clsMenuCategoryCode.vb`
