public class SearchRequestImpl extends AbstractAbandonableRequest implements SearchRequest
RESPONSE_TYPES
Constructor and Description |
---|
SearchRequestImpl()
Creates a SearcRequest implementing object used to search the
DIT.
|
Modifier and Type | Method and Description |
---|---|
SearchRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
SearchRequest |
addAttributes(String... attributesToAdd)
Adds some attributes to the set of entry attributes to return.
|
SearchRequest |
addControl(Control control)
Adds a control to this Message.
|
boolean |
equals(Object obj)
Checks to see if two search requests are equal.
|
SearchRequest |
followReferrals()
Tells the client to follow referrals instead of throwing exceptions
|
List<String> |
getAttributes()
Gets a list of the attributes to be returned from each entry which
matches the search filter.
|
Dn |
getBase()
Gets the search base as a distinguished name.
|
AliasDerefMode |
getDerefAliases()
Gets the alias handling parameter.
|
ExprNode |
getFilter()
Gets the search filter associated with this search request.
|
MessageTypeEnum[] |
getResponseTypes()
Gets the different response types generated by a search request.
|
SearchResultDone |
getResultResponse()
If called for the first time, this method creates a result containing
response object for this request.
|
SearchScope |
getScope()
Gets the search scope parameter enumeration.
|
long |
getSizeLimit()
A sizelimit that restricts the maximum number of entries to be returned
as a result of the search.
|
int |
getTimeLimit()
Gets the timelimit that restricts the maximum time (in seconds) allowed
for a search.
|
boolean |
getTypesOnly()
An indicator as to whether search results will contain both attribute
types and values, or just attribute types.
|
int |
hashCode() |
SearchRequest |
ignoreReferrals()
Tells the client to ignore referrals instead of throwing exceptions.
|
boolean |
isFollowReferrals()
Tells the client if it should follow referrals instead of throwing exceptions
|
boolean |
isIgnoreReferrals()
Tells the client if it should ignore referrals instead of throwing exceptions
|
SearchRequest |
removeAttribute(String attribute)
Removes an attribute to the set of entry attributes to return.
|
SearchRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
SearchRequest |
setBase(Dn base)
Sets the search base as a distinguished name.
|
SearchRequest |
setDerefAliases(AliasDerefMode aliasDerefAliases)
Sets the alias handling parameter.
|
SearchRequest |
setFilter(ExprNode filter)
Sets the search filter associated with this search request.
|
SearchRequest |
setFilter(String filter)
Sets the search filter associated with this search request.
|
SearchRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
SearchRequest |
setScope(SearchScope scope)
Sets the search scope parameter enumeration.
|
SearchRequest |
setSizeLimit(long entriesMax)
Sets sizelimit that restricts the maximum number of entries to be
returned as a result of the search.
|
SearchRequest |
setTimeLimit(int secondsMax)
Sets the timelimit that restricts the maximum time (in seconds) allowed
for a search.
|
SearchRequest |
setTypesOnly(boolean typesOnly)
An indicator as to whether search results will contain both attribute
types and values, or just attribute types.
|
String |
toString()
Return a string the represent a SearchRequest
|
abandon, addAbandonListener, isAbandoned
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
abandon, addAbandonListener, isAbandoned
public SearchRequestImpl()
public List<String> getAttributes()
getAttributes
in interface SearchRequest
public Dn getBase()
getBase
in interface SearchRequest
public SearchRequest setBase(Dn base)
setBase
in interface SearchRequest
base
- the search basepublic AliasDerefMode getDerefAliases()
getDerefAliases
in interface SearchRequest
public SearchRequest setDerefAliases(AliasDerefMode aliasDerefAliases)
setDerefAliases
in interface SearchRequest
aliasDerefAliases
- the alias handling parameter enumeration.public ExprNode getFilter()
getFilter
in interface SearchRequest
public SearchRequest setFilter(ExprNode filter)
setFilter
in interface SearchRequest
filter
- the expression node for the root of the filter expression tree.public SearchRequest setFilter(String filter) throws LdapException
setFilter
in interface SearchRequest
filter
- the expression node for the root of the filter expression tree.LdapException
- If the filter can't be addedpublic MessageTypeEnum[] getResponseTypes()
getResponseTypes
in interface ManyReplyRequest
getResponseTypes
in interface SearchRequest
SearchRequest.RESPONSE_TYPES
public SearchScope getScope()
getScope
in interface SearchRequest
public SearchRequest setScope(SearchScope scope)
setScope
in interface SearchRequest
scope
- the scope enumeration parameter.public long getSizeLimit()
getSizeLimit
in interface SearchRequest
public SearchRequest setSizeLimit(long entriesMax)
setSizeLimit
in interface SearchRequest
entriesMax
- maximum search result entries to return.public int getTimeLimit()
getTimeLimit
in interface SearchRequest
public SearchRequest setTimeLimit(int secondsMax)
setTimeLimit
in interface SearchRequest
secondsMax
- the search time limit in seconds.public boolean getTypesOnly()
getTypesOnly
in interface SearchRequest
public SearchRequest setTypesOnly(boolean typesOnly)
setTypesOnly
in interface SearchRequest
typesOnly
- true for only types, false for types and values.public SearchRequest addAttributes(String... attributesToAdd)
addAttributes
in interface SearchRequest
attributesToAdd
- the attributes description or identifier.public SearchRequest removeAttribute(String attribute)
removeAttribute
in interface SearchRequest
attribute
- the attribute description or identifier.public SearchResultDone getResultResponse()
getResultResponse
in interface ResultResponseRequest
public SearchRequest setMessageId(int messageId)
setMessageId
in interface Message
setMessageId
in interface SearchRequest
setMessageId
in class AbstractMessage
messageId
- The message Idpublic SearchRequest addControl(Control control)
addControl
in interface Message
addControl
in interface SearchRequest
addControl
in class AbstractMessage
control
- the control to add.public SearchRequest addAllControls(Control[] controls)
addAllControls
in interface Message
addAllControls
in interface SearchRequest
addAllControls
in class AbstractMessage
controls
- the controls to add.public SearchRequest removeControl(Control control)
removeControl
in interface Message
removeControl
in interface SearchRequest
removeControl
in class AbstractMessage
control
- the control to remove.public int hashCode()
hashCode
in class AbstractRequest
Object.hashCode()
public boolean equals(Object obj)
equals
in class AbstractRequest
obj
- the object to check for equality to this SearchRequestpublic boolean isFollowReferrals()
isFollowReferrals
in interface SearchRequest
public SearchRequest followReferrals()
followReferrals
in interface SearchRequest
public boolean isIgnoreReferrals()
isIgnoreReferrals
in interface SearchRequest
public SearchRequest ignoreReferrals()
ignoreReferrals
in interface SearchRequest
Copyright © 2003–2019 The Apache Software Foundation. All rights reserved.