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
Representation of an Enum literal.
-
Nested Class Summary
Nested classes/interfaces inherited from class SQLExpression
SQLExpression.ColumnExpressionList -
Field Summary
FieldsFields inherited from class DelegatedExpression
delegateFields inherited from class SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table -
Constructor Summary
ConstructorsConstructorDescriptionEnumLiteral(SQLStatement stmt, JavaTypeMapping mapping, Object value, String parameterName) Constructor for an Enum literal with a value. -
Method Summary
Modifier and TypeMethodDescriptionprivate ObjectgetStoredValueForEnum(JavaTypeMapping mapping) getValue()Accessor to the literal valuebooleanvoidsetJavaTypeMapping(JavaTypeMapping mapping) voidMethod to set this literal as not being a parameter.Methods inherited from class DelegatedExpression
add, div, eq, ge, getDelegate, gt, invoke, le, lt, mod, mul, ne, sub, toSQLTextMethods inherited from class SQLExpression
and, bitAnd, bitOr, cast, com, distinct, encloseInParentheses, eor, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, in, ior, is, neg, not, unDistinct
-
Field Details
-
value
-
-
Constructor Details
-
EnumLiteral
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 Details
-
setJavaTypeMapping
- Overrides:
setJavaTypeMappingin classEnumExpression
-
getValue
Description copied from interface:SQLLiteralAccessor to the literal value- Specified by:
getValuein interfaceSQLLiteral- Returns:
- the value of the literal
-
isParameter
public boolean isParameter()- Overrides:
isParameterin classDelegatedExpression
-
setNotParameter
public void setNotParameter()Description copied from interface:SQLLiteralMethod 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:
setNotParameterin interfaceSQLLiteral
-
getStoredValueForEnum
-