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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Enum
value
-
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.DelegatedExpression
delegate
-
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
-
-
Constructor Summary
Constructors Constructor Description EnumLiteral(SQLStatement stmt, JavaTypeMapping mapping, java.lang.Object value, java.lang.String parameterName)
Constructor for an Enum literal with a value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Object
getStoredValueForEnum(JavaTypeMapping mapping)
java.lang.Object
getValue()
Accessor to the literal valueboolean
isParameter()
void
setJavaTypeMapping(JavaTypeMapping mapping)
void
setNotParameter()
Method to set this literal as not being a parameter.-
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, bitAnd, bitOr, cast, com, distinct, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, in, ior, is, neg, not, unDistinct
-
-
-
-
Constructor Detail
-
EnumLiteral
public EnumLiteral(SQLStatement stmt, JavaTypeMapping mapping, java.lang.Object value, java.lang.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 "?")
-
-
Method Detail
-
setJavaTypeMapping
public void setJavaTypeMapping(JavaTypeMapping mapping)
- Overrides:
setJavaTypeMapping
in classEnumExpression
-
getValue
public java.lang.Object getValue()
Description copied from interface:SQLLiteral
Accessor to the literal value- Specified by:
getValue
in interfaceSQLLiteral
- Returns:
- the value of the literal
-
isParameter
public boolean isParameter()
- Overrides:
isParameter
in classDelegatedExpression
-
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 interfaceSQLLiteral
-
getStoredValueForEnum
private java.lang.Object getStoredValueForEnum(JavaTypeMapping mapping)
-
-