Class MUserQuery

    • Constructor Detail

      • 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 Detail

      • 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 queries of user 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 the system 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 queries of the client 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 queries of the role 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
        Parameters:
        ctx - context
        AD_Tab_ID - tab
        name - name
        Returns:
        query or null
      • getUserQueryByName

        public static MUserQuery getUserQueryByName​(Properties ctx,
                                                    int AD_Tab_ID,
                                                    String name)
        Get Specific Tab Query Private or globall
        Parameters:
        ctx - context
        AD_Tab_ID - tab
        name - name
        Returns:
        query or null
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Description copied from class: PO
        Called before Save for Pre-Save Operation
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new record
        Returns:
        true if record can be saved
      • userCanSave

        public boolean userCanSave()
        Returns true if the current user can save the query privately
        Returns:
      • userCanShare

        public boolean userCanShare()
        Returns true if the current users has permission to share or modify the query globally
        Returns:
      • setAD_User_ID

        public void setAD_User_ID​(int AD_User_ID)
        Set User/Contact.
        Specified by:
        setAD_User_ID in interface I_AD_UserQuery
        Overrides:
        setAD_User_ID in class X_AD_UserQuery
        Parameters:
        AD_User_ID - User within the system - Internal or Business Partner Contact Overridden to allow saving System record (zero ID)