Class MapExpression
java.lang.Object
org.datanucleus.store.rdbms.sql.expression.SQLExpression
org.datanucleus.store.rdbms.sql.expression.MapExpression
- Direct Known Subclasses:
MapLiteral
An expression that represents some Map field in a query candidate class, or a Map field in an object linked from the candidate class by navigation.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
-
Field Summary
FieldsFields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
lowestOperator, mapping, parameterName, st, stmt, subExprs, table
-
Constructor Summary
ConstructorsConstructorDescriptionMapExpression
(SQLStatement stmt, SQLTable table, JavaTypeMapping mapping) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioneq
(SQLExpression expr) Method to return the expression for comparing a map with a value.Accessor for the "map" table where this expression represents an alias set in the FROM clause, so already joined.invoke
(String methodName, List<SQLExpression> args) Invocation of a method on this expression.ne
(SQLExpression expr) Method to return the expression for comparing a map with a value.void
setAliasForMapTable
(String alias) Method to set the alias for the "map" table (join table, or key table when value in key, or value table when key in value) when specified in FROM.Methods inherited from class org.datanucleus.store.rdbms.sql.expression.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
-
alias
String alias
-
-
Constructor Details
-
MapExpression
Constructor.- Parameters:
stmt
- The SQL Statementtable
- Table containing the map fieldmapping
- The java field mapping
-
-
Method Details
-
setAliasForMapTable
Method to set the alias for the "map" table (join table, or key table when value in key, or value table when key in value) when specified in FROM.- Parameters:
alias
- The alias for the map table
-
getAliasForMapTable
Accessor for the "map" table where this expression represents an alias set in the FROM clause, so already joined.- Returns:
- Alias for the "map" table (if defined in FROM)
-
invoke
Description copied from class:SQLExpression
Invocation of a method on this expression.- Overrides:
invoke
in classSQLExpression
- Parameters:
methodName
- name of the method to invokeargs
- Args to this method (if any)- Returns:
- the converted value
-
eq
Method to return the expression for comparing a map with a value. Only supports comparisons with null currently.- Overrides:
eq
in classSQLExpression
- Parameters:
expr
- The value to compare with.- Returns:
- The expression of equality
-
ne
Method to return the expression for comparing a map with a value. Only supports comparisons with null currently.- Overrides:
ne
in classSQLExpression
- Parameters:
expr
- The value to compare with.- Returns:
- The expression of inequality
-