org.datanucleus.store.rdbms.sql.method
Class ListGetMethod
java.lang.Object
org.datanucleus.store.rdbms.sql.method.AbstractSQLMethod
org.datanucleus.store.rdbms.sql.method.ListGetMethod
- All Implemented Interfaces:
- SQLMethod
public class ListGetMethod
- extends AbstractSQLMethod
Method for evaluating {listExpr}.get(idxExpr).
Returns an ObjectExpression representing the element
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListGetMethod
public ListGetMethod()
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(CollectionExpression listExpr,
SQLExpression idxExpr)
- Implementation of Collection.get() using a subquery on the table representing the collection,
adding a condition on the index and returning the element.
- Parameters:
listExpr - The list expressionidxExpr - The index expression
- Returns:
- The element expression
getAsInnerJoin
protected SQLExpression getAsInnerJoin(CollectionExpression listExpr,
SQLExpression idxExpr)
- Implementation of List.get() using an inner join to the table representing the list,
adding a condition on the index and returning the element.
- Parameters:
listExpr - The list expressionidxExpr - The index expression
- Returns:
- The element expression
Copyright © 2012. All Rights Reserved.