Class MUserQuery

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

public class MUserQuery extends X_AD_UserQuery
User Query Model
Version:
$Id$
Author:
Jorg Janke
See Also:
  • Constructor Details

    • MUserQuery

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

      public MUserQuery(Properties ctx, int AD_UserQuery_ID, String trxName)
      Standard Constructor
      Parameters:
      ctx - context
      AD_UserQuery_ID - id
      trxName - trx
    • MUserQuery

      public MUserQuery(Properties ctx, ResultSet rs, String trxName)
      Load Constructor
      Parameters:
      ctx - context
      rs - result set
      trxName - trx
  • Method Details

    • get

      public static MUserQuery[] get(Properties ctx, int AD_Tab_ID)
      Get all active queries of client for Tab
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      Returns:
      array of queries
    • getUserOnlyQueries

      public static ArrayList<MUserQuery> getUserOnlyQueries(Properties ctx, int AD_Tab_ID)
      Get all active user only queries for Tab
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      Returns:
      array of queries
    • getAllUsersQueries

      public static ArrayList<MUserQuery> getAllUsersQueries(Properties ctx, int AD_Tab_ID)
      Get all active queries of system tenant for Tab
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      Returns:
      array of queries
    • getClientQueries

      public static ArrayList<MUserQuery> getClientQueries(Properties ctx, int AD_Tab_ID)
      Get all active client only queries for Tab
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      Returns:
      array of queries
    • getRoleQueries

      public static ArrayList<MUserQuery> getRoleQueries(Properties ctx, int AD_Tab_ID)
      Get all active role only queries for Tab
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      Returns:
      array of queries
    • get

      public static MUserQuery get(Properties ctx, int AD_Tab_ID, String name)
      Get Specific Tab Query via name (use case insensitive like matching).
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      name - query name
      Returns:
      query or null
    • getUserQueryByName

      public static MUserQuery getUserQueryByName(Properties ctx, int AD_Tab_ID, String name)
      Get Tab Query via name (use case insensitive like matching). Private or global.
      Parameters:
      ctx - context
      AD_Tab_ID - tab
      name - query name
      Returns:
      query or null
    • 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
    • userCanSave

      public boolean userCanSave()
      Can user save this query record.
      Returns:
      true if the current user can save the query privately and is not a SQL Query
    • userCanShare

      public boolean userCanShare()
      Can use share this query record.
      Returns:
      true if the current users has permission to share or modify the query globally and is not a SQL Query