Package org.ldaptive.templates
Class Query
- java.lang.Object
-
- org.ldaptive.templates.Query
-
public class Query extends Object
Contains data associated with a query request.
-
-
Field Summary
Fields Modifier and Type Field Description private static String[]
EMPTY_STRING_ARRAY
Used for setting empty terms.private Integer
fromResult
Start index of search results to return.private String[]
returnAttributes
Attributes to return with the ldap query.private String
searchRestrictions
Additional restrictions to place on every query.private String[]
terms
Query separated into terms.private Integer
toResult
End index of search results to return.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getFromResult()
Returns the from result.String[]
getReturnAttributes()
Returns the return attributes.String
getSearchRestrictions()
Returns the search restrictions.String[]
getTerms()
Returns the terms.Integer
getToResult()
Returns the to result.void
setFromResult(Integer i)
Sets the index of the result to begin searching.void
setReturnAttributes(String[] attrs)
Sets the return attributes.void
setSearchRestrictions(String restrictions)
Sets the search restrictions.void
setToResult(Integer i)
Sets the index of the result to stop searching.String
toString()
-
-
-
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
-
-