Class MemberQueryHandler

    • Constructor Detail

      • MemberQueryHandler

        public MemberQueryHandler()
        Constructs a new empty MemberQueryHandler with default option.
        Since:
        jcms-5.7.4
      • MemberQueryHandler

        public MemberQueryHandler​(java.lang.String queryString)
        Constructs a new MemberQueryHandler by parsing the specified query string.

        See MemberQueryHandler(String, HttpServletRequest) for a list of the decoded parameters.

        Parameters:
        queryString - a query String consisting of parameters (key=value) to be set in this handler.
        • Parameters must be separated with ampersand (&).
        • Values must be encoded in UTF-8.
        • Query must not starts with question mark (?) e.g : "text=welcome&gid=j_42"
        Since:
        jcms-5.7.4
    • Method Detail

      • parseQueryStringParam

        protected void parseQueryStringParam​(java.lang.String key,
                                             java.lang.String[] values)
        Description copied from class: AbstractQueryHandler
        Method to be implemented by subclass to decode parameter from queryString.
        Overrides:
        parseQueryStringParam in class AbstractMemberQueryHandler<Member>
        Parameters:
        key - the parameter name, never null nor empty.
        values - the parameter values, NEVER NULL NOR EMPTY. You can safely invoke paramValues[0]
      • printParams

        protected java.lang.String printParams​(AbstractQueryHandler.QueryHandlerPrinter printer)
        Print current QueryHandler params using specified QueryHandlerPrinter.
        Overrides:
        printParams in class AbstractMemberQueryHandler<Member>
        Parameters:
        printer - a QueryHandlerPrinter to use
        Returns:
        a string containing all parameters of this handler printed using specified QueryHandlerPrinter.
        Since:
        jcms-5.7.4
      • getResultSet

        public java.util.Set<Member> getResultSet()
        Return results of a query done using this MemberQueryHandler.

        Warning: This method process the query each time it is invoked, therefore do not call it multiple times if you don't need it.

        Returns:
        a new Set containing all Member found by this query.
        Since:
        jcms-5.7.4
      • getResultSet

        public java.util.Set<Member> getResultSet​(java.util.Comparator<? super Member> comparator)
        Return results of a query done using this GroupQueryHandler.

        Warning: This method process the query each time it is invoked, therefore do not call it multiple times if you don't need it.

        Parameters:
        comparator - the optional Comparator to sort the return collection
        Returns:
        a new Set containing all Member found by this query, sorted using specified comparator if any.
        Since:
        jcms-5.7.4
      • setAdmin

        public void setAdmin​(boolean admin)
        Set the administrator filter option.

        Automatically invoke setAdminFilterEnabled(boolean)) to enable filter.

        Parameters:
        admin - true to retrieve only administrators, false to retrieve all but administrators
        Since:
        jcms-6.1.0
      • getAdmin

        public boolean getAdmin()
        Retrieve the value of the administrator filter.

        Important : this value is used only if isAdminFilterEnabled is true !

        Returns:
        true to retrieve only administrators, false to retrieve all but administrators
        Since:
        jcms-6.1.0
      • setAdminFilterEnabled

        public void setAdminFilterEnabled​(boolean enabled)
        Set whether the admin filter is used or not for this query
        Parameters:
        enabled - true if the value of getAdmin() is used for this query, false otherwise.
        Since:
        jcms-6.1.0
      • isAdminFilterEnabled

        public boolean isAdminFilterEnabled()
        Retrieve whether the admin filter is used or not for this query
        Returns:
        true if the value of getAdmin() is used for this query, false otherwise.
        Since:
        jcms-6.1.0
      • setWorker

        public void setWorker​(boolean worker)
        Set the worker filter option.

        Automatically invoke setWorkerFilterEnabled(boolean)) to enable filter.

        Parameters:
        worker - true to retrieve only workers only, false to retrieve all but workers
        Since:
        jcms-6.1.0
      • getWorker

        public boolean getWorker()
        Retrieve the value of the worker filter.

        Important : this value is used only if isWorkerFilterEnabled is true !

        Returns:
        true to retrieve only workers only, false to retrieve all but workers
        Since:
        jcms-6.1.0
      • setWorkerFilterEnabled

        public void setWorkerFilterEnabled​(boolean enabled)
        Set whether the worker filter is used or not for this query
        Parameters:
        enabled - true if the value of getWorker() is used for this query, false otherwise.
        Since:
        jcms-6.1.0
      • isWorkerFilterEnabled

        public boolean isWorkerFilterEnabled()
        Retrieve whether the worker filter is used or not for this query
        Returns:
        true if the value of getWorker() is used for this query, false otherwise.
        Since:
        jcms-6.1.0