Class Query

    • Method Detail

      • getType

        public QueryType getType()
        Getter of the query type.
        Returns:
        Query type num
      • getPagingModes

        public PagingMode[] getPagingModes()
        Getter of the paging modes.
        Returns:
        Paging mode enums
      • getCountPolicies

        public CountPolicy[] getCountPolicies()
        Getter of the supported paging policies. If the array is empty, this means that the query does not support any form of count policy, and no value for count policy should be specified.
        Returns:
        Supported paging policy enums
      • getQueryId

        public String getQueryId()
        Getter of the query id.
        Returns:
        Query id
      • getQueryableFields

        public String[] getQueryableFields()
        Getter of the queryable fields.
        Returns:
        Queryable fields
      • getSupportedSortKeys

        public String[] getSupportedSortKeys()
        Getter of the supported sort keys.
        Returns:
        Supported sort keys
      • query

        public static Query.Builder query()
        Creates a new builder for Query.
        Returns:
        New builder instance
      • allocateToResource

        protected void allocateToResource​(Resource.Builder resourceBuilder)
        Allocates the Query operation type to the given Resource Builder.
        Specified by:
        allocateToResource in class Operation
        Parameters:
        resourceBuilder - - Resource Builder to add the operation
      • fromAnnotation

        public static Query fromAnnotation​(Query query,
                                           Method annotated,
                                           ApiDescription descriptor,
                                           Class<?> relativeType)
        Builds a Query object from the data stored in the annotation.
        Parameters:
        query - The annotation that stores the data.
        annotated - The method that the annotation was found on.
        descriptor - The root descriptor to add definitions to.
        relativeType - The type relative to which schema resources should be resolved.
        Returns:
        Query instance
      • compareTo

        public int compareTo​(Query query)
        Compares two queries.
        Specified by:
        compareTo in interface Comparable<Query>
        Parameters:
        query - Query to compare to
        Returns:
        the value 0 if the argument string is equal to this string; a value less than 0 if this string is lexicographically less than the string argument; and a value greater than 0 if this string is lexicographically greater than the string argument.