public class FindOptions extends Object implements Serializable
find and findAll methods. Can be used to: ObjectNotFoundException should be thrown if no object can be found in the find method or if
null should be returned in this case. For findAll an empty list is returned if no object is found.| Constructor and Description |
|---|
FindOptions()
Creates options with the default values.
|
FindOptions(boolean throwObjectNotFoundException)
Creates find options with the specified
throwObjectNotFoundException flag and the default timeout (i.e. |
FindOptions(boolean throwObjectNotFoundException,
int timeout)
Creates find options with the specified parameters.
|
FindOptions(int timeout)
Creates find options with the specified timeout and the default value (
true) for the
throwObjectNotFoundException flag. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getTimeout()
Returns the timeout in milliseconds.
|
int |
hashCode() |
void |
setTimeout(int timeout)
Sets the timeout in milliseconds for finding objects.
|
boolean |
throwObjectNotFoundException() |
void |
throwObjectNotFoundException(boolean state)
Specifies whether an
ObjectNotFoundException should be thrown if no object can be found in the find method or if
null should be returned in this case. |
String |
toString() |
public FindOptions()
CommonOptions.OPT_WAIT_RESOLVE_OBJDEF. By
default an ObjectNotFoundException is thrown if no object can be found in the find method.
public FindOptions(boolean throwObjectNotFoundException,
int timeout)
throwObjectNotFoundException - specifies whether an ObjectNotFoundException should be thrown if no object can be found in
the find method or if null should be returned in this case. Note: For findAll an
empty list is returned if no object is found.timeout - the timeout in milliseconds for finding objects. If no object is found the agent retries the find operation until this
timeout.
public FindOptions(boolean throwObjectNotFoundException)
throwObjectNotFoundException flag and the default timeout (i.e. the value of the
option CommonOptions.OPT_WAIT_RESOLVE_OBJDEF).throwObjectNotFoundException - specifies whether an ObjectNotFoundException should be thrown if no object can be found in
the find method or if null should be returned in this case. Note: For findAll an
empty list is returned if no object is found.
public FindOptions(int timeout)
true) for the
throwObjectNotFoundException flag.timeout - public void throwObjectNotFoundException(boolean state)
ObjectNotFoundException should be thrown if no object can be found in the find method or if
null should be returned in this case. Note: For findAll an empty list is returned if no object is
found.state - true (the default value) if an ObjectNotFoundException should be thrown and false if
null should be returned if no object is found.
public boolean throwObjectNotFoundException()
true indicates that an ObjectNotFoundException should be thrown if no object can be found in the
find method. false indicates that null should be returned in this case. Note: For
findAll an empty list is returned if no object is found.
public int getTimeout()
CommonOptions.OPT_WAIT_RESOLVE_OBJDEF should be used.public void setTimeout(int timeout)
timeout - the timeout in milliseconds
Copyright 2009-2012 Micro Focus. All Rights Reserved.