org.opends.server.tools
Class LDAPSearchOptions

java.lang.Object
  extended by org.opends.server.tools.LDAPToolOptions
      extended by org.opends.server.tools.LDAPSearchOptions

public class LDAPSearchOptions
extends LDAPToolOptions

This class defines options for the search operations used by the ldapsearch tool.


Constructor Summary
LDAPSearchOptions()
          Creates the options instance.
 
Method Summary
 boolean countMatchingEntries()
          Indicates whether to report the number of matching entries returned by the server.
 DereferencePolicy getDereferencePolicy()
          Return the dereference policy.
 SearchScope getSearchScope()
          Get the search scope value.
 int getSizeLimit()
          Return the sizeLimit value.
 int getTimeLimit()
          Return the timeLimit value.
 boolean getTypesOnly()
          Return only the attribute types in the search result.
 void setCountMatchingEntries(boolean countMatchingEntries)
          Specifies whether to report the number of matching entries returned by the server.
 boolean setDereferencePolicy(java.lang.String policy, java.io.PrintStream err)
          Set the dereference policy.
 boolean setSearchScope(java.lang.String scope, java.io.PrintStream err)
          Set the search scope .
 void setSizeLimit(int sizeLimit)
          Set the sizeLimit for the operation.
 void setTimeLimit(int timeLimit)
          Set the timeLimit for the operation.
 void setTypesOnly(boolean typesOnly)
          Return only the attribute types in the search result.
 
Methods inherited from class org.opends.server.tools.LDAPToolOptions
continueOnError, getControls, getEncoding, getVerbose, setContinueOnError, setControls, setEncoding, setShowOperations, setVerbose, showOperations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPSearchOptions

public LDAPSearchOptions()
Creates the options instance.

Method Detail

setTimeLimit

public void setTimeLimit(int timeLimit)
Set the timeLimit for the operation.

Parameters:
timeLimit - The time limit for the search.

getTimeLimit

public int getTimeLimit()
Return the timeLimit value.

Returns:
The timeLimit value.

setSizeLimit

public void setSizeLimit(int sizeLimit)
Set the sizeLimit for the operation.

Parameters:
sizeLimit - The size limit for the search.

getSizeLimit

public int getSizeLimit()
Return the sizeLimit value.

Returns:
The sizeLimit value.

setSearchScope

public boolean setSearchScope(java.lang.String scope,
                              java.io.PrintStream err)
Set the search scope .

Parameters:
scope - The search scope string.
err - A print stream to which error messages should be written if a problem occurs.
Returns:
true if the scope was set properly, or false if not.

getSearchScope

public SearchScope getSearchScope()
Get the search scope value.

Returns:
The search scope value.

setDereferencePolicy

public boolean setDereferencePolicy(java.lang.String policy,
                                    java.io.PrintStream err)
Set the dereference policy.

Parameters:
policy - The dereference policy.
err - A print stream to which error messages should be written if a problem occurs.
Returns:
true if the dereference policy was set properly, or false if not.

getDereferencePolicy

public DereferencePolicy getDereferencePolicy()
Return the dereference policy.

Returns:
The alias dereference policy.

getTypesOnly

public boolean getTypesOnly()
Return only the attribute types in the search result.

Returns:
true if only attribute types should be returned in matching entries, or false if both types and values should be included.

setTypesOnly

public void setTypesOnly(boolean typesOnly)
Return only the attribute types in the search result.

Parameters:
typesOnly - Specifies whether only attribute types should be returned in matching entries, or both types and values.

countMatchingEntries

public boolean countMatchingEntries()
Indicates whether to report the number of matching entries returned by the server.

Returns:
true if the number of matching entries should be reported, or false if not.

setCountMatchingEntries

public void setCountMatchingEntries(boolean countMatchingEntries)
Specifies whether to report the number of matching entries returned by the server.

Parameters:
countMatchingEntries - Specifies whether to report the number of matching entries returned by the server.