public class IntegerLiteral extends NumericExpression implements SQLLiteral
SQLExpression.ColumnExpressionList
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
Constructor and Description |
---|
IntegerLiteral(SQLStatement stmt,
JavaTypeMapping mapping,
Object value,
String parameterName)
Constructor for an integer literal with a value.
|
Modifier and Type | Method and Description |
---|---|
SQLExpression |
add(SQLExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type.
|
SQLExpression |
div(SQLExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type.
|
BooleanExpression |
eq(SQLExpression expr)
Equality operator (equals to)
|
BooleanExpression |
ge(SQLExpression expr)
Relational operator (greater than or equals)
|
Object |
getValue()
Accessor to the literal value
|
BooleanExpression |
gt(SQLExpression expr)
Relational operator (greater than)
|
BooleanExpression |
le(SQLExpression expr)
Relational operator (lower than or equals)
|
BooleanExpression |
lt(SQLExpression expr)
Relational operator (lower than)
|
SQLExpression |
mod(SQLExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type.
|
SQLExpression |
mul(SQLExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type.
|
BooleanExpression |
ne(SQLExpression expr)
Not equality operator (not equals to)
|
SQLExpression |
neg()
Negate operation.
|
void |
setNotParameter()
Method to set this literal as not being a parameter.
|
protected void |
setStatement() |
SQLExpression |
sub(SQLExpression expr)
If both operands are instances of IntegerLiteral, the operation results in BigInteger type.
|
com, in
and, cast, distinct, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, invoke, ior, is, isParameter, not, setJavaTypeMapping, toSQLText
public IntegerLiteral(SQLStatement stmt, JavaTypeMapping mapping, Object value, String parameterName)
stmt
- the SQL statementmapping
- the mappingvalue
- the valueparameterName
- Name of the parameter that this represents if any (as JDBC "?")public BooleanExpression eq(SQLExpression expr)
SQLExpression
eq
in class NumericExpression
expr
- the right-hand operandpublic BooleanExpression ne(SQLExpression expr)
SQLExpression
ne
in class NumericExpression
expr
- the right-hand operandpublic BooleanExpression lt(SQLExpression expr)
SQLExpression
lt
in class NumericExpression
expr
- the right-hand operandpublic BooleanExpression le(SQLExpression expr)
SQLExpression
le
in class NumericExpression
expr
- the right-hand operandpublic BooleanExpression gt(SQLExpression expr)
SQLExpression
gt
in class NumericExpression
expr
- the right-hand operandpublic BooleanExpression ge(SQLExpression expr)
SQLExpression
ge
in class NumericExpression
expr
- the right-hand operandpublic SQLExpression add(SQLExpression expr)
add
in class NumericExpression
expr
- the right-hand operandpublic SQLExpression sub(SQLExpression expr)
sub
in class NumericExpression
expr
- the right-hand operandpublic SQLExpression mul(SQLExpression expr)
mul
in class NumericExpression
expr
- the right-hand operatorpublic SQLExpression div(SQLExpression expr)
div
in class NumericExpression
expr
- the right-hand operatorpublic SQLExpression mod(SQLExpression expr)
mod
in class NumericExpression
expr
- The expression to modulus againstpublic SQLExpression neg()
neg
in class NumericExpression
public Object getValue()
SQLLiteral
getValue
in interface SQLLiteral
public void setNotParameter()
SQLLiteral
setNotParameter
in interface SQLLiteral
protected void setStatement()
Copyright © 2015. All rights reserved.