org.datanucleus.store.rdbms.sql.expression
Class EnumLiteral
java.lang.Object
org.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.DelegatedExpression
org.datanucleus.store.rdbms.sql.expression.EnumExpression
org.datanucleus.store.rdbms.sql.expression.EnumLiteral
- All Implemented Interfaces:
- SQLLiteral
public class EnumLiteral
- extends EnumExpression
- implements SQLLiteral
Representation of an Enum literal.
|
Constructor Summary |
EnumLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String parameterName)
Constructor for an Enum literal with a value. |
| Methods inherited from class org.datanucleus.store.rdbms.sql.expression.DelegatedExpression |
add, div, eq, ge, getDelegate, gt, invoke, le, lt, mod, mul, ne, sub, toSQLText |
| Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression |
and, cast, com, distinct, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, in, ior, is, neg, not |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumLiteral
public EnumLiteral(SQLStatement stmt,
org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping,
Object value,
String parameterName)
- Constructor for an Enum literal with a value.
- Parameters:
stmt - the SQL statementmapping - the mappingvalue - the valueparameterName - Name of the parameter that this represents if any (as JDBC "?")
setJavaTypeMapping
public void setJavaTypeMapping(org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
- Overrides:
setJavaTypeMapping in class EnumExpression
getValue
public Object getValue()
- Description copied from interface:
SQLLiteral
- Accessor to the literal value
- Specified by:
getValue in interface SQLLiteral
- Returns:
- the value of the literal
isParameter
public boolean isParameter()
- Overrides:
isParameter in class SQLExpression
setNotParameter
public void setNotParameter()
- Description copied from interface:
SQLLiteral
- Method to set this literal as not being a parameter.
If the literal if not currently a parameter then does nothing.
Updates any underlying SQL to have the value.
- Specified by:
setNotParameter in interface SQLLiteral
Copyright © 2012. All Rights Reserved.