|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.josql.expressions.Expression org.josql.expressions.BinaryExpression org.josql.expressions.BetweenExpression
public class BetweenExpression
Represents a "BETWEEN x AND y" expression.
Field Summary |
---|
Fields inherited from class org.josql.expressions.BinaryExpression |
---|
left, right |
Constructor Summary | |
---|---|
BetweenExpression()
|
Method Summary | |
---|---|
Expression |
getEnd()
Get the end expression. |
Expression |
getStart()
Get the start expression. |
void |
init(Query q)
Inits the expression. |
boolean |
isNot()
|
boolean |
isTrue(Object o,
Query q)
Return whether this expression evaluates to true . |
void |
setEnd(ValueExpression e)
|
void |
setNot(boolean v)
|
void |
setStart(ValueExpression s)
|
String |
toString()
Returns a string version of this expression. |
Methods inherited from class org.josql.expressions.BinaryExpression |
---|
getExpectedReturnType, getLeft, getRight, getValue, hasFixedResult, setLeft, setRight |
Methods inherited from class org.josql.expressions.Expression |
---|
isBracketed, setBracketed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BetweenExpression()
Method Detail |
---|
public void init(Query q) throws QueryParseException
init
in class BinaryExpression
q
- The Query object.
QueryParseException
- If the LHS, start or end cannot be inited.public Expression getStart()
ValueExpression
.public Expression getEnd()
ValueExpression
.public void setEnd(ValueExpression e)
public void setStart(ValueExpression s)
public boolean isNot()
public void setNot(boolean v)
public boolean isTrue(Object o, Query q) throws QueryExecutionException
true
.
Is equivalent to: LHS >= START AND LHS <= END. And of course if the
expression is NOTed then it returns !(LHS >= START AND LHS <= END).
isTrue
in class Expression
o
- The object to perform the expression on.q
- The Query object.
true
if the LHS is between the start and end values.
QueryExecutionException
- If the expression cannot be executed.public String toString()
Expression
[ NOT ] BETWEENExpression
ANDExpression
toString
in class Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |