Class MUserPreference

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_UserPreference, I_Persistent, Evaluatee

public class MUserPreference extends X_AD_UserPreference
Extended model class for AD_UserPreference
See Also:
  • Constructor Details

    • MUserPreference

      public MUserPreference(Properties ctx, String AD_UserPreference_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_UserPreference_UU - UUID key
      trxName - Transaction
    • MUserPreference

      public MUserPreference(Properties ctx, int AD_UserPreference_ID, String trxName)
      Parameters:
      ctx -
      AD_UserPreference_ID -
      trxName -
    • MUserPreference

      public MUserPreference(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
  • Method Details

    • getUserPreference

      public static MUserPreference getUserPreference(int AD_User_ID, int AD_Client_ID)
      Get user preference for user and tenant
      Parameters:
      AD_User_ID -
      AD_Client_ID -
      Returns:
      MUserPreference or null
    • getUserPreference

      public static MUserPreference getUserPreference(int AD_User_ID, int AD_Client_ID, String trxName)
      Get user preference for user and tenant
      Parameters:
      AD_User_ID -
      AD_Client_ID -
      trxName -
      Returns:
      MUserPreference or null
    • getPreference

      public String getPreference(String key)
      Get preference value for key
      Parameters:
      key - preference key
      Returns:
      preference value
    • fillPreferences

      public void fillPreferences()
      Fill environment/session context with values from this user preference record
    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - true if it is a new record
      Returns:
      true if record can be saved
    • afterSave

      protected boolean afterSave(boolean newRecord, boolean success)
      Description copied from class: PO
      Called after Save for Post-Save Operation.
      Default implementation is nop, to be implemented in sub-classes that needed it.
      Overrides:
      afterSave in class PO
      Parameters:
      newRecord - true if it is a new record
      success - true if save operation was success
      Returns:
      if save was a success