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
ConstructorsModifierConstructorDescriptionprotectedBuilder()Default constructor.protectedBuilder(SearchRequest req) Creates a new builder. -
Method Summary
Modifier and TypeMethodDescriptionaliases(DerefAliases aliases) Sets the deref aliases flag.binaryAttributes(String... attributes) Sets the binary attributes.binaryAttributes(Collection<String> attributes) Sets the binary attributes.Sets the base DN.Sets the search filter.Sets the search filter.filter(FilterTemplate template) Sets the search filter.returnAttributes(String... attributes) Sets the return attributes.returnAttributes(Collection<String> attributes) Sets the return attributes.scope(SearchScope scope) Sets the search scope.protected SearchRequest.Builderself()Returns this builder.sizeLimit(int size) Sets the size limit.Sets the time limit.typesOnly(boolean types) Sets the types only.Methods inherited from class org.ldaptive.AbstractRequestMessage.AbstractBuilder
build, controls, responseTimeout
-
Constructor Details
-
Builder
protected Builder()Default constructor. -
Builder
Creates a new builder.- Parameters:
req- search request to build
-
-
Method Details
-
self
Description copied from class:AbstractRequestMessage.AbstractBuilderReturns this builder.- Specified by:
selfin classAbstractRequestMessage.AbstractBuilder<SearchRequest.Builder,SearchRequest> - Returns:
- builder
-
dn
Sets the base DN.- Parameters:
dn- base DN- Returns:
- this builder
-
scope
Sets the search scope.- Parameters:
scope- search scope- Returns:
- this builder
-
aliases
Sets the deref aliases flag.- Parameters:
aliases- deref aliases- Returns:
- this builder
-
sizeLimit
Sets the size limit.- Parameters:
size- size limit- Returns:
- this builder
-
timeLimit
Sets the time limit.- Parameters:
time- time limit- Returns:
- this builder
-
typesOnly
Sets the types only.- Parameters:
types- whether to return only types- Returns:
- this builder
-
filter
Sets the search filter.- Parameters:
filter- search filter- Returns:
- this builder
-
filter
Sets the search filter.- Parameters:
filter- search filter- Returns:
- this builder
-
filter
Sets the search filter.- Parameters:
template- filter template- Returns:
- this builder
-
returnAttributes
Sets the return attributes.- Parameters:
attributes- return attributes- Returns:
- this builder
-
returnAttributes
Sets the return attributes.- Parameters:
attributes- return attributes- Returns:
- this builder
-
binaryAttributes
Sets the binary attributes.- Parameters:
attributes- binary attributes- Returns:
- this builder
-
binaryAttributes
Sets the binary attributes.- Parameters:
attributes- binary attributes- Returns:
- this builder
-