org.datanucleus.store.rdbms.sql.expression
Class MapExpression

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.expression.SQLExpression
      extended by org.datanucleus.store.rdbms.sql.expression.MapExpression
Direct Known Subclasses:
MapLiteral

public class MapExpression
extends SQLExpression

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.

When navigated through using containsKey(expr) the keys of the Map are relationally joined onto the query statement. When navigated through using containsValue(expr) the values of the Map are relationally joined onto the query statement. These 2 methods are required for JDO 2.0, whilst the isEmpty() and contains() are JDO 1.0.1. containsEntry() is an extension.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
SQLExpression.ColumnExpressionList
 
Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
isParameter, LOCALISER, lowestOperator, mapping, st, stmt, subExprs, table
 
Constructor Summary
MapExpression(SQLStatement stmt, SQLTable table, org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
          Constructor.
 
Method Summary
 BooleanExpression eq(SQLExpression expr)
          Method to return the expression for comparing a map with a value.
 SQLExpression invoke(java.lang.String methodName, java.util.List args)
          Invocation of a method on this expression.
 BooleanExpression ne(SQLExpression expr)
          Method to return the expression for comparing a map with a value.
 
Methods inherited from class org.datanucleus.store.rdbms.sql.expression.SQLExpression
add, and, cast, checkForAndCorrectParameterComparison, com, div, encloseInParentheses, eor, ge, getJavaTypeMapping, getNumberOfSubExpressions, getSQLStatement, getSQLTable, gt, in, ior, is, isParameter, le, lt, mod, mul, neg, not, sub, toSQLText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapExpression

public MapExpression(SQLStatement stmt,
                     SQLTable table,
                     org.datanucleus.store.mapped.mapping.JavaTypeMapping mapping)
Constructor.

Parameters:
stmt - The SQL Statement
table - Table containing the map field
mapping - The java field mapping
Method Detail

invoke

public SQLExpression invoke(java.lang.String methodName,
                            java.util.List args)
Description copied from class: SQLExpression
Invocation of a method on this expression.

Overrides:
invoke in class SQLExpression
Parameters:
methodName - name of the method to invoke
args - Args to this method (if any)
Returns:
the converted value

eq

public BooleanExpression eq(SQLExpression expr)
Method to return the expression for comparing a map with a value. Only supports comparisons with null currently.

Overrides:
eq in class SQLExpression
Parameters:
expr - The value to compare with.
Returns:
The expression of equality

ne

public BooleanExpression ne(SQLExpression expr)
Method to return the expression for comparing a map with a value. Only supports comparisons with null currently.

Overrides:
ne in class SQLExpression
Parameters:
expr - The value to compare with.
Returns:
The expression of inequality


Copyright © 2009. All Rights Reserved.