Skip to content

clsMenuFavorite

Owns one user favorite menu row.

Purpose

  • Persist the user, menu item, order, and inactive date.
  • Feed the favorites branch used by authorized-menu retrieval.

Context

  • Namespace: SAIF.Business.Menu
  • Assembly/package: SAIF.Business.Menu.dll

Public members

Member Signature Purpose
MenuFavoriteSeqNum Public Property MenuFavoriteSeqNum() As Decimal Surrogate primary key of the MENU_FAVORITE row, generated from MENU_FAVORITE_SEQ and used to target update/delete statements.
UserID Public Property UserID() As String Favorite owner login.
MenuItemSeqNum Public Property MenuItemSeqNum() As Decimal Foreign key to the favorited MENU_ITEM row; used when the authorized-menu query re-joins favorites back into the menu-item set under BR-MENU-004.
MenuItem Public ReadOnly Property MenuItem() As clsMenuItem Lazily loads and returns the clsMenuItem referenced by MenuItemSeqNum, giving callers access to the item's page, tooltip, and visibility data from a favorite row.
MenuOrder Public Property MenuOrder() As Decimal Position used to sort a user's favorites when they are unioned into the authorized-menu result set under BR-MENU-004.
UserEmplID Public Property UserEmplID() As String Employee identifier of the favoriting user, stored alongside the login for audit/reporting alongside MENU_USER.
ItemInactiveDate Public Property ItemInactiveDate() As Nullable(Of Date) Soft-delete date for the favorite.
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 favorite row's own property values have changed since load, overriding the inherited clsBusinessBase.IsDirty.
SetUserEmplIDNull Public Sub SetUserEmplIDNull() Clears the underlying value so the corresponding column is persisted as NULL on the next save, instead of a real value.
SetItemInactiveDateNull Public Sub SetItemInactiveDateNull() Clears the underlying value so the corresponding column is persisted as NULL on the next save, instead of a real value.
IsUserEmplIDNull Public Function IsUserEmplIDNull() As Boolean Reports whether UserEmplID is unset, so callers can distinguish an absent employee identifier from an empty string.
IsItemInactiveDateNull Public Function IsItemInactiveDateNull() As Boolean Reports whether ItemInactiveDate is unset, indicating the favorite is still active.
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 clsMenuFavorite) 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.
NewMenuFavorite Public Shared Function NewMenuFavorite(ByVal inDataportal As IDataPortalInfo, ByVal inMenuItemSeq As Decimal) As clsMenuFavorite Creates a new typed object using the supplied data-portal context.
GetMenuFavorite Public Shared Function GetMenuFavorite(ByVal inDataportal As IDataPortalInfo, ByVal inMenuFavoriteSeqNum As Decimal) As clsMenuFavorite Retrieves the single MENU_FAVORITE row identified by the surrogate key inMenuFavoriteSeqNum, populating the favorited user, menu item, order, and inactive-date values for a single favorite entry.

Behavioral notes

Constraints and usage notes

  • Inactive rows stay stored until deleted.

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\clsMenuFavorite.vb