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 protectedBuilder()Default constructor.protectedBuilder(SearchRequest req)Creates a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchRequest.Builderaliases(DerefAliases aliases)Sets the deref aliases flag.SearchRequest.BuilderbinaryAttributes(String... attributes)Sets the binary attributes.SearchRequest.BuilderbinaryAttributes(Collection<String> attributes)Sets the binary attributes.SearchRequest.Builderdn(String dn)Sets the base DN.SearchRequest.Builderfilter(String filter)Sets the search filter.SearchRequest.Builderfilter(Filter filter)Sets the search filter.SearchRequest.Builderfilter(FilterTemplate template)Sets the search filter.SearchRequest.BuilderreturnAttributes(String... attributes)Sets the return attributes.SearchRequest.BuilderreturnAttributes(Collection<String> attributes)Sets the return attributes.SearchRequest.Builderscope(SearchScope scope)Sets the search scope.protected SearchRequest.Builderself()Returns this builder.SearchRequest.BuildersizeLimit(int size)Sets the size limit.SearchRequest.BuildertimeLimit(Duration time)Sets the time limit.SearchRequest.BuildertypesOnly(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.AbstractBuilderReturns this builder.- Specified by:
selfin 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
-
-