org.datanucleus.store.rdbms.sql.method
Class MapGetMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.AbstractSQLMethod
org.datanucleus.store.rdbms.sql.method.MapGetMethod
- All Implemented Interfaces:
- SQLMethod
public class MapGetMethod
- extends AbstractSQLMethod
Method for evaluating {mapExpr}.get(keyExpr).
Returns an ObjectExpression representing the value
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapGetMethod
public MapGetMethod()
getExpression
public SQLExpression getExpression(SQLExpression expr,
List args)
- Description copied from interface:
SQLMethod
- Return the expression for this SQL function.
- Parameters:
expr - The expression that it is invoked onargs - 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 expressionkeyValExpr - 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 expressionkeyValExpr - The key value expression
- Returns:
- The value expression
Copyright © 2012. All Rights Reserved.