Class Query


  • public class Query
    extends Object
    Contains data associated with a query request.
    • Field Detail

      • EMPTY_STRING_ARRAY

        private static final String[] EMPTY_STRING_ARRAY
        Used for setting empty terms.
      • terms

        private final String[] terms
        Query separated into terms.
      • returnAttributes

        private String[] returnAttributes
        Attributes to return with the ldap query.
      • searchRestrictions

        private String searchRestrictions
        Additional restrictions to place on every query.
      • fromResult

        private Integer fromResult
        Start index of search results to return.
      • toResult

        private Integer toResult
        End index of search results to return.
    • Constructor Detail

      • Query

        public Query​(String query)
        Parses the query from a string into query terms.
        Parameters:
        query - to parse
    • Method Detail

      • getTerms

        public String[] getTerms()
        Returns the terms.
        Returns:
        query terms
      • setReturnAttributes

        public void setReturnAttributes​(String[] attrs)
        Sets the return attributes.
        Parameters:
        attrs - return attributes
      • getReturnAttributes

        public String[] getReturnAttributes()
        Returns the return attributes.
        Returns:
        return attributes
      • setSearchRestrictions

        public void setSearchRestrictions​(String restrictions)
        Sets the search restrictions.
        Parameters:
        restrictions - search restrictions
      • getSearchRestrictions

        public String getSearchRestrictions()
        Returns the search restrictions.
        Returns:
        search restrictions
      • setFromResult

        public void setFromResult​(Integer i)
        Sets the index of the result to begin searching.
        Parameters:
        i - from index
      • getFromResult

        public Integer getFromResult()
        Returns the from result.
        Returns:
        from result
      • setToResult

        public void setToResult​(Integer i)
        Sets the index of the result to stop searching.
        Parameters:
        i - to result
      • getToResult

        public Integer getToResult()
        Returns the to result.
        Returns:
        to result