Package org.ldaptive
Class SearchRequest.Builder
- java.lang.Object
-
- org.ldaptive.AbstractRequestMessage.AbstractBuilder<SearchRequest.Builder,SearchRequest>
-
- org.ldaptive.SearchRequest.Builder
-
- Enclosing class:
- SearchRequest
public static class SearchRequest.Builder extends AbstractRequestMessage.AbstractBuilder<SearchRequest.Builder,SearchRequest>
Search request builder.
-
-
Field Summary
-
Fields inherited from class org.ldaptive.AbstractRequestMessage.AbstractBuilder
object
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
Default constructor.protected
Builder(SearchRequest req)
Creates a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchRequest.Builder
aliases(DerefAliases aliases)
Sets the deref aliases flag.SearchRequest.Builder
binaryAttributes(String... attributes)
Sets the binary attributes.SearchRequest.Builder
binaryAttributes(Collection<String> attributes)
Sets the binary attributes.SearchRequest.Builder
dn(String dn)
Sets the base DN.SearchRequest.Builder
filter(String filter)
Sets the search filter.SearchRequest.Builder
filter(Filter filter)
Sets the search filter.SearchRequest.Builder
filter(FilterTemplate template)
Sets the search filter.SearchRequest.Builder
returnAttributes(String... attributes)
Sets the return attributes.SearchRequest.Builder
returnAttributes(Collection<String> attributes)
Sets the return attributes.SearchRequest.Builder
scope(SearchScope scope)
Sets the search scope.protected SearchRequest.Builder
self()
Returns this builder.SearchRequest.Builder
sizeLimit(int size)
Sets the size limit.SearchRequest.Builder
timeLimit(Duration time)
Sets the time limit.SearchRequest.Builder
typesOnly(boolean types)
Sets the types only.-
Methods inherited from class org.ldaptive.AbstractRequestMessage.AbstractBuilder
build, controls, responseTimeout
-
-
-
-
Constructor Detail
-
Builder
protected Builder()
Default constructor.
-
Builder
protected Builder(SearchRequest req)
Creates a new builder.- Parameters:
req
- search request to build
-
-
Method Detail
-
self
protected SearchRequest.Builder self()
Description copied from class:AbstractRequestMessage.AbstractBuilder
Returns this builder.- Specified by:
self
in classAbstractRequestMessage.AbstractBuilder<SearchRequest.Builder,SearchRequest>
- Returns:
- builder
-
dn
public SearchRequest.Builder dn(String dn)
Sets the base DN.- Parameters:
dn
- base DN- Returns:
- this builder
-
scope
public SearchRequest.Builder scope(SearchScope scope)
Sets the search scope.- Parameters:
scope
- search scope- Returns:
- this builder
-
aliases
public SearchRequest.Builder aliases(DerefAliases aliases)
Sets the deref aliases flag.- Parameters:
aliases
- deref aliases- Returns:
- this builder
-
sizeLimit
public SearchRequest.Builder sizeLimit(int size)
Sets the size limit.- Parameters:
size
- size limit- Returns:
- this builder
-
timeLimit
public SearchRequest.Builder timeLimit(Duration time)
Sets the time limit.- Parameters:
time
- time limit- Returns:
- this builder
-
typesOnly
public SearchRequest.Builder typesOnly(boolean types)
Sets the types only.- Parameters:
types
- whether to return only types- Returns:
- this builder
-
filter
public SearchRequest.Builder filter(Filter filter)
Sets the search filter.- Parameters:
filter
- search filter- Returns:
- this builder
-
filter
public SearchRequest.Builder filter(String filter)
Sets the search filter.- Parameters:
filter
- search filter- Returns:
- this builder
-
filter
public SearchRequest.Builder filter(FilterTemplate template)
Sets the search filter.- Parameters:
template
- filter template- Returns:
- this builder
-
returnAttributes
public SearchRequest.Builder returnAttributes(String... attributes)
Sets the return attributes.- Parameters:
attributes
- return attributes- Returns:
- this builder
-
returnAttributes
public SearchRequest.Builder returnAttributes(Collection<String> attributes)
Sets the return attributes.- Parameters:
attributes
- return attributes- Returns:
- this builder
-
binaryAttributes
public SearchRequest.Builder binaryAttributes(String... attributes)
Sets the binary attributes.- Parameters:
attributes
- binary attributes- Returns:
- this builder
-
binaryAttributes
public SearchRequest.Builder binaryAttributes(Collection<String> attributes)
Sets the binary attributes.- Parameters:
attributes
- binary attributes- Returns:
- this builder
-
-