|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.expression.ScalarExpression
org.jpox.store.expression.NumericExpression
org.jpox.store.expression.IntegerLiteral
Representation of an Integer literal.
Nested Class Summary |
Nested classes inherited from class org.jpox.store.expression.ScalarExpression |
ScalarExpression.DyadicOperator, ScalarExpression.ExpressionList, ScalarExpression.FieldExpression, ScalarExpression.IllegalArgumentTypeException, ScalarExpression.IllegalOperationException, ScalarExpression.MethodInvocationException, ScalarExpression.MonadicOperator, ScalarExpression.Operator |
Field Summary |
Fields inherited from class org.jpox.store.expression.ScalarExpression |
aliasIdentifier, expressionList, FILTER, LOCALISER, lowestOperator, mapping, OP_ADD, OP_AND, OP_BETWEEN, OP_COM, OP_CONCAT, OP_DIV, OP_EQ, OP_GT, OP_GTEQ, OP_IN, OP_IS, OP_ISNOT, OP_LIKE, OP_LT, OP_LTEQ, OP_MOD, OP_MUL, OP_NEG, OP_NOT, OP_NOTEQ, OP_OR, OP_SUB, PROJECTION, qs, st, te |
Constructor Summary | |
IntegerLiteral(QueryExpression qs,
JavaTypeMapping mapping,
java.lang.Number value)
Creates a integer literal |
|
IntegerLiteral(QueryExpression qs,
JavaTypeMapping mapping,
java.lang.Number value,
boolean useParameter)
Creates a integer literal. |
Method Summary | |
ScalarExpression |
add(ScalarExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type. |
ScalarExpression |
div(ScalarExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type. |
BooleanExpression |
eq(ScalarExpression expr)
Equality operator (equals to) |
java.lang.Object |
getValue()
Accessor to the literal value |
BooleanExpression |
gt(ScalarExpression expr)
Relational operator (greater than) |
BooleanExpression |
gteq(ScalarExpression expr)
Relational operator (greater than or equals) |
BooleanExpression |
lt(ScalarExpression expr)
Relational operator (lower than) |
BooleanExpression |
lteq(ScalarExpression expr)
Relational operator (lower than or equals) |
ScalarExpression |
mod(ScalarExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type. |
ScalarExpression |
mul(ScalarExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type. |
ScalarExpression |
neg()
Operation results in BigInteger type. |
BooleanExpression |
noteq(ScalarExpression expr)
Equality operator (not equals to) |
ScalarExpression |
sub(ScalarExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type. |
StatementText |
toStatementText(int mode)
StatementText representation of this expression. |
Methods inherited from class org.jpox.store.expression.NumericExpression |
com, in |
Methods inherited from class org.jpox.store.expression.ScalarExpression |
accessField, and, as, callMethod, cast, encloseWithInParentheses, eor, equals, getAlias, getExpressionList, getLogicSetExpression, getMapping, getNonAliasExpression, getQueryExpression, instanceOf, ior, not, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IntegerLiteral(QueryExpression qs, JavaTypeMapping mapping, java.lang.Number value)
qs
- the QueryExpressionmapping
- the mappingvalue
- the integer valuepublic IntegerLiteral(QueryExpression qs, JavaTypeMapping mapping, java.lang.Number value, boolean useParameter)
value
will not change if the Query is run several times.
qs
- the QueryExpressionmapping
- the mappingvalue
- the integer valueuseParameter
- whether to use parameter or a literal in the expression when preparing the statementMethod Detail |
public java.lang.Object getValue()
Literal
getValue
in interface Literal
public BooleanExpression eq(ScalarExpression expr)
ScalarExpression
eq
in class NumericExpression
public BooleanExpression noteq(ScalarExpression expr)
ScalarExpression
noteq
in class NumericExpression
public BooleanExpression lt(ScalarExpression expr)
ScalarExpression
lt
in class NumericExpression
public BooleanExpression lteq(ScalarExpression expr)
ScalarExpression
lteq
in class NumericExpression
public BooleanExpression gt(ScalarExpression expr)
ScalarExpression
gt
in class NumericExpression
public BooleanExpression gteq(ScalarExpression expr)
ScalarExpression
gteq
in class NumericExpression
public ScalarExpression add(ScalarExpression expr)
add
in class NumericExpression
public ScalarExpression sub(ScalarExpression expr)
sub
in class NumericExpression
public ScalarExpression mul(ScalarExpression expr)
mul
in class NumericExpression
public ScalarExpression div(ScalarExpression expr)
div
in class NumericExpression
public ScalarExpression mod(ScalarExpression expr)
mod
in class NumericExpression
expr
- The expression to modulus against
public ScalarExpression neg()
neg
in class NumericExpression
public StatementText toStatementText(int mode)
ScalarExpression
toStatementText
in class ScalarExpression
mode
- (0=PROJECTION;1=FILTER)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |