public class StringLiteral extends StringExpression implements SQLLiteral
SQLExpression.ColumnExpressionList
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
Constructor and Description |
---|
StringLiteral(SQLStatement stmt,
JavaTypeMapping mapping,
Object value,
String parameterName)
Constructor for a String literal with a value.
|
Modifier and Type | Method and Description |
---|---|
SQLExpression |
add(SQLExpression expr)
Additive Operator.
|
BooleanExpression |
eq(SQLExpression expr)
Equality operator (equals to)
|
BooleanExpression |
ge(SQLExpression expr)
Relational operator (greater than or equals)
|
void |
generateStatementWithoutQuotes()
Convenience method to generate the statement without any quotes.
|
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)
|
BooleanExpression |
ne(SQLExpression expr)
Not equality operator (not equals to)
|
void |
setNotParameter()
Method to set this literal as not being a parameter.
|
protected void |
setStatement() |
in, invoke
and, bitAnd, bitOr, cast, com, distinct, div, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, ior, is, isParameter, mod, mul, neg, not, setJavaTypeMapping, sub, toSQLText
public StringLiteral(SQLStatement stmt, JavaTypeMapping mapping, Object value, String parameterName)
stmt
- the SQL statementmapping
- the mappingvalue
- the valueparameterName
- Name of the parameter that this represents (as JDBC "?")public void generateStatementWithoutQuotes()
public Object getValue()
SQLLiteral
getValue
in interface SQLLiteral
public BooleanExpression eq(SQLExpression expr)
SQLExpression
eq
in class StringExpression
expr
- the right-hand operandpublic BooleanExpression ne(SQLExpression expr)
SQLExpression
ne
in class StringExpression
expr
- the right-hand operandpublic BooleanExpression lt(SQLExpression expr)
SQLExpression
lt
in class StringExpression
expr
- the right-hand operandpublic BooleanExpression le(SQLExpression expr)
SQLExpression
le
in class StringExpression
expr
- the right-hand operandpublic BooleanExpression gt(SQLExpression expr)
SQLExpression
gt
in class StringExpression
expr
- the right-hand operandpublic BooleanExpression ge(SQLExpression expr)
SQLExpression
ge
in class StringExpression
expr
- the right-hand operandpublic SQLExpression add(SQLExpression expr)
SQLExpression
add
in class StringExpression
expr
- the right-hand operandpublic void setNotParameter()
SQLLiteral
setNotParameter
in interface SQLLiteral
protected void setStatement()
Copyright © 2017. All rights reserved.