Class MapLiteral
java.lang.Object
org.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.MapExpression
org.datanucleus.store.rdbms.sql.expression.MapLiteral
- All Implemented Interfaces:
SQLLiteral
An SQL expression that will test if a column of a table falls within the given Map.
This is used for queries where a Map is passed in as a parameter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn SQL expression that will test if a column of a table falls within the given Map's keys.static classAn SQL expression that will test if a column of a table falls within the given Map's values.Nested classes/interfaces inherited from class SQLExpression
SQLExpression.ColumnExpressionList -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MapLiteral.MapKeyLiteralprivate final MapLiteral.MapValueLiteralprivate final MapFields inherited from class MapExpression
aliasFields inherited from class SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table -
Constructor Summary
ConstructorsConstructorDescriptionMapLiteral(SQLStatement stmt, JavaTypeMapping mapping, Object value, String parameterName) Constructor for a map literal with a value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Accessor to the literal valuevoidMethod to set this literal as not being a parameter.Methods inherited from class MapExpression
eq, getAliasForMapTable, invoke, ne, setAliasForMapTableMethods inherited from class SQLExpression
add, and, bitAnd, bitOr, cast, com, distinct, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getLowestOperator, getNumberOfSubExpressions, getParameterName, getSQLStatement, getSQLTable, getSubExpression, gt, in, ior, is, isParameter, le, lt, mod, mul, neg, not, setJavaTypeMapping, sub, toSQLText, unDistinct
-
Field Details
-
value
-
mapValueLiteral
-
mapKeyLiteral
-
-
Constructor Details
-
MapLiteral
Constructor for a map literal with a value.- Parameters:
stmt- The SQLStatement the MapLiteral will be used in.mapping- The mapping to the Mapvalue- The Map that is the value.parameterName- Name of the parameter that this represents if any (JDBC "?")
-
-
Method Details
-
getValue
Description copied from interface:SQLLiteralAccessor to the literal value- Specified by:
getValuein interfaceSQLLiteral- Returns:
- the value of the literal
-
getKeyLiteral
-
getValueLiteral
-
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
-