org.datanucleus.store.rdbms.sql.method
Class MapGetMethod

java.lang.Object
  extended by org.datanucleus.store.rdbms.sql.method.AbstractSQLMethod
      extended by org.datanucleus.store.rdbms.sql.method.MapGetMethod
All Implemented Interfaces:
SQLMethod

public class MapGetMethod
extends AbstractSQLMethod

Method for evaluating {mapExpr1}.get(). Returns an ObjectExpression representing the value


Field Summary
 
Fields inherited from class org.datanucleus.store.rdbms.sql.method.AbstractSQLMethod
clr, exprFactory, LOCALISER, stmt
 
Constructor Summary
MapGetMethod()
           
 
Method Summary
protected  SQLExpression getAsInnerJoin(MapExpression mapExpr, SQLExpression keyValExpr)
          Implementation of Map.get() using an inner join to the table representing the map, adding a condition on the key and returning the value.
protected  SQLExpression getAsSubquery(MapExpression mapExpr, SQLExpression keyValExpr)
          Implementation of Map.get() using a subquery on the table representing the map, adding a condition on the key and returning the value.
 SQLExpression getExpression(SQLExpression expr, java.util.List args)
          Return the expression for this SQL function.
 
Methods inherited from class org.datanucleus.store.rdbms.sql.method.AbstractSQLMethod
getMappingForClass, setStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapGetMethod

public MapGetMethod()
Method Detail

getExpression

public SQLExpression getExpression(SQLExpression expr,
                                   java.util.List args)
Description copied from interface: SQLMethod
Return the expression for this SQL function.

Parameters:
expr - The expression that it is invoked on
args - Arguments passed in
Returns:
The SQL expression using the SQL function

getAsSubquery

protected SQLExpression getAsSubquery(MapExpression mapExpr,
                                      SQLExpression keyValExpr)
Implementation of Map.get() using a subquery on the table representing the map, adding a condition on the key and returning the value.

Parameters:
mapExpr - The map expression
keyValExpr - The key value expression
Returns:
The value expression

getAsInnerJoin

protected SQLExpression getAsInnerJoin(MapExpression mapExpr,
                                       SQLExpression keyValExpr)
Implementation of Map.get() using an inner join to the table representing the map, adding a condition on the key and returning the value.

Parameters:
mapExpr - The map expression
keyValExpr - The key value expression
Returns:
The value expression


Copyright © 2009. All Rights Reserved.