public class BooleanLiteral extends BooleanExpression implements SQLLiteral
SQLExpression.ColumnExpressionList
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
Constructor and Description |
---|
BooleanLiteral(SQLStatement stmt,
JavaTypeMapping mapping,
Boolean value)
Creates a boolean literal with the specified value, using the provided mapping.
|
BooleanLiteral(SQLStatement stmt,
JavaTypeMapping mapping,
Object value,
String parameterName)
Creates a boolean literal with the specified value, using the provided mapping.
|
Modifier and Type | Method and Description |
---|---|
BooleanExpression |
and(SQLExpression expr)
Conditional AND.
|
BooleanExpression |
eor(SQLExpression expr)
Exclusive OR
|
BooleanExpression |
eq(SQLExpression expr)
Equality operator (equals to)
|
Object |
getValue()
Accessor to the literal value
|
BooleanExpression |
ior(SQLExpression expr)
Conditional OR.
|
BooleanExpression |
ne(SQLExpression expr)
Not equality operator (not equals to)
|
BooleanExpression |
not()
Logical complement
|
void |
setJavaTypeMapping(JavaTypeMapping mapping) |
void |
setNotParameter()
Method to set this literal as not being a parameter.
|
protected void |
setStatement() |
hasClosure, in, invoke, neg
add, bitAnd, bitOr, cast, com, distinct, div, encloseInParentheses, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, gt, is, isParameter, le, lt, mod, mul, sub, toSQLText
public BooleanLiteral(SQLStatement stmt, JavaTypeMapping mapping, Object value, String parameterName)
stmt
- The SQL statementmapping
- the mappingvalue
- the valueparameterName
- Parameter name (represented as JDBC "?")public BooleanLiteral(SQLStatement stmt, JavaTypeMapping mapping, Boolean value)
stmt
- The SQL statementmapping
- the mappingvalue
- the boolean valuepublic void setJavaTypeMapping(JavaTypeMapping mapping)
setJavaTypeMapping
in class SQLExpression
public Object getValue()
SQLLiteral
getValue
in interface SQLLiteral
public BooleanExpression and(SQLExpression expr)
SQLExpression
and
in class BooleanExpression
expr
- the right-hand operandpublic BooleanExpression eor(SQLExpression expr)
SQLExpression
eor
in class BooleanExpression
expr
- the right-hand operandpublic BooleanExpression ior(SQLExpression expr)
SQLExpression
ior
in class BooleanExpression
expr
- the right-hand operandpublic BooleanExpression not()
SQLExpression
not
in class BooleanExpression
public BooleanExpression eq(SQLExpression expr)
SQLExpression
eq
in class BooleanExpression
expr
- the right-hand operandpublic BooleanExpression ne(SQLExpression expr)
SQLExpression
ne
in class BooleanExpression
expr
- the right-hand operandpublic void setNotParameter()
SQLLiteral
setNotParameter
in interface SQLLiteral
protected void setStatement()
Copyright © 2017. All rights reserved.