|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Operator Criteria
Criteria encapsulates the search criteria for finding objects and provides methods for constructing a query.
Method Summary | |
Criteria |
and()
Create a new Criteria bound to the same database and class as this Criteria and logically AND the two search criteria. |
Criteria |
and(Criteria crit)
Logically AND a Criteria with this Criteria. |
Criteria |
between(String lhs,
double lower,
double upper)
Append a Between comparison to the search criteria. |
Criteria |
between(String lhs,
int lower,
int upper)
Append a Between comparison to the search criteria. |
Criteria |
between(String lhs,
long lower,
long upper)
Append a Between comparison to the search criteria. |
Criteria |
between(String lhs,
String lower,
String upper)
Append a Between comparison to the search criteria. |
Criteria |
database(String name)
Bind this Criteria to another database. |
Criteria |
equal(String lhs,
double rhs)
Append an Equal comparison to the search criteria. |
Criteria |
equal(String lhs,
int rhs)
Append an Equal comparison to the search criteria. |
Criteria |
equal(String lhs,
long rhs)
Append an Equal comparison to the search criteria. |
Criteria |
equal(String lhs,
String rhs)
Append an Equal comparison to the search criteria. |
Criteria |
greater(String lhs,
double rhs)
Append a Greater Than comparison to the search criteria. |
Criteria |
greater(String lhs,
int rhs)
Append a Greater Than comparison to the search criteria. |
Criteria |
greater(String lhs,
long rhs)
Append a Greater Than comparison to the search criteria. |
Criteria |
greater(String lhs,
String rhs)
Append a Greater Than comparison to the search criteria. |
Criteria |
greaterEqual(String lhs,
double rhs)
Append a Greater Than or Equal comparison to the search criteria. |
Criteria |
greaterEqual(String lhs,
int rhs)
Append a Greater Than or Equal comparison to the search criteria. |
Criteria |
greaterEqual(String lhs,
long rhs)
Append a Greater Than or Equal comparison to the search criteria. |
Criteria |
greaterEqual(String lhs,
String rhs)
Append a Greater Than or Equal comparison to the search criteria. |
Criteria |
in(String lhs,
Collection c)
Append an In comparison to the search criteria. |
boolean |
isCompound()
Returns true if this Criteria is a compound sesarch criteria consisting of multiple comparisons. |
boolean |
isConstant()
Returns true if the boolean value of this Criteria is constant. |
Criteria |
isNotNull(String lhs)
Append an Is Not Null comparison to the search criteria. |
Criteria |
isNull(String lhs)
Append an Is Null comparison to the search criteria. |
Criteria |
less(String lhs,
double rhs)
Append a Less Than comparison to the search criteria. |
Criteria |
less(String lhs,
int rhs)
Append a Less Than comparison to the search criteria. |
Criteria |
less(String lhs,
long rhs)
Append a Less Than comparison to the search criteria. |
Criteria |
less(String lhs,
String rhs)
Append a Less Than comparison to the search criteria. |
Criteria |
lessEqual(String lhs,
double rhs)
Append a Less Than or Equal comparison to the search criteria. |
Criteria |
lessEqual(String lhs,
int rhs)
Append a Less Than or Equal comparison to the search criteria. |
Criteria |
lessEqual(String lhs,
long rhs)
Append a Less Than or Equal comparison to the search criteria. |
Criteria |
lessEqual(String lhs,
String rhs)
Append a Less Than or Equal comparison to the search criteria. |
Criteria |
like(String lhs,
String rhs)
Append a Like comparison to the search criteria. |
Criteria |
like(String lhs,
String rhs,
char escape)
Append a Like comparison to the search criteria. |
int |
nodeType()
Returns the node type of this query tree node. |
Criteria |
not()
Create a new Criteria bound to the same class and database asn this Criteria and logically AND the inverse of the new Criteria with this Criteria. |
Criteria |
not(Criteria crit)
Logically AND this Criteria with the inverse of a second Criteria. |
Criteria |
notBetween(String lhs,
double lower,
double upper)
Append a Not Between comparison to the search criteria. |
Criteria |
notBetween(String lhs,
int lower,
int upper)
Append a Not Between comparison to the search criteria. |
Criteria |
notBetween(String lhs,
long lower,
long upper)
Append a Not Between comparison to the search criteria. |
Criteria |
notBetween(String lhs,
String lower,
String upper)
Append a Not Between comparison to the search criteria. |
Criteria |
notEqual(String lhs,
double rhs)
Append a Not Equal comparison to the search criteria. |
Criteria |
notEqual(String lhs,
int rhs)
Append a Not Equal comparison to the search criteria. |
Criteria |
notEqual(String lhs,
long rhs)
Append a Not Equal comparison to the search criteria. |
Criteria |
notEqual(String lhs,
String rhs)
Append a Not Equal comparison to the search criteria. |
Criteria |
notIn(String lhs,
Collection c)
Append a Not In comparison to the search criteria. |
Criteria |
notLike(String lhs,
String rhs)
Append a Not Like comparison to the search criteria. |
Criteria |
notLike(String lhs,
String rhs,
char escape)
Append a Not Like comparison to the search criteria. |
Criteria |
or()
Create a new Criteria bound to the same database and class as this Criteria and logically OR the two search criteria. |
Criteria |
or(Criteria crit)
Logically OR a Criteria with this Criteria. |
String |
query()
Create a string representation of the query defined by this Criteria. |
void |
query(StringBuffer sb)
Create a string representation of the query defined by this Criteria in the specified string buffer. |
void |
reset()
Reset this Criteria to an empty search criteria. |
Criteria |
setClass(String name)
Reset this Criteria and bind it to another persistent class. |
boolean |
validate()
Returns true if the node is valid. |
int |
valueType()
Returns the value type of this query tree node. |
String |
verboseQuery()
Create a string representation of the query defined by this Criteria. |
Methods inherited from class Operator |
booleanValue, doubleValue, integerValue, longValue, stringValue |
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public Criteria isNull(String lhs) throws PersistenceException
lhs
- an attribute name.
PersistenceException
public Criteria isNotNull(String lhs) throws PersistenceException
lhs
- an attribute name.
PersistenceException
public Criteria equal(String lhs, int rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria equal(String lhs, long rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria equal(String lhs, double rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria equal(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria notEqual(String lhs, int rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria notEqual(String lhs, long rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria notEqual(String lhs, double rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria notEqual(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greater(String lhs, int rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greater(String lhs, long rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greater(String lhs, double rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greater(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greaterEqual(String lhs, int rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greaterEqual(String lhs, long rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greaterEqual(String lhs, double rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria greaterEqual(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria less(String lhs, int rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria less(String lhs, long rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria less(String lhs, double rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria less(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria lessEqual(String lhs, int rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria lessEqual(String lhs, long rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria lessEqual(String lhs, double rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria lessEqual(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- an attribute value.
PersistenceException
public Criteria between(String lhs, int lower, int upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria between(String lhs, long lower, long upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria between(String lhs, double lower, double upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria between(String lhs, String lower, String upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria notBetween(String lhs, int lower, int upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria notBetween(String lhs, long lower, long upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria notBetween(String lhs, double lower, double upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria notBetween(String lhs, String lower, String upper) throws PersistenceException
lhs
- an attribute name.lower
- the lower bound of the comparison.upper
- the upper bound of the comparison.
PersistenceException
public Criteria in(String lhs, Collection c) throws PersistenceException
lhs
- an attribute name.c
- the collection of values compared with the attribute.
PersistenceException
public Criteria notIn(String lhs, Collection c) throws PersistenceException
lhs
- an attribute name.c
- the collection of values compared with the attribute.
PersistenceException
public Criteria like(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- a pattern possibly including wild card characters.
PersistenceException
public Criteria like(String lhs, String rhs, char escape) throws PersistenceException
lhs
- an attribute name.rhs
- a pattern possibly including wild card characters.
PersistenceException
public Criteria notLike(String lhs, String rhs) throws PersistenceException
lhs
- an attribute name.rhs
- a pattern possibly including wild card characters.
PersistenceException
public Criteria notLike(String lhs, String rhs, char escape) throws PersistenceException
lhs
- an attribute name.rhs
- a pattern possibly including wild card characters.
PersistenceException
public Criteria and(Criteria crit)
crit
- the second set of search criteria.
public Criteria and()
public Criteria or(Criteria crit)
crit
- the second set of search criteria.
public Criteria or()
public Criteria not(Criteria crit)
crit
- the second set of search criteria.
public Criteria not()
public Criteria setClass(String name) throws ClassNotSupportedException
name
- the class name.
ClassNotSupportedException
public Criteria database(String name) throws ClassNotSupportedException
name
- the database name.
ClassNotSupportedException
public void reset()
public String query()
public String verboseQuery()
public void query(StringBuffer sb)
sb
- a string buffer.public boolean isCompound()
public boolean isConstant()
public boolean validate()
public int nodeType()
public int valueType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |