org.datanucleus.store.mapped.expression
Interface ArrayStoreQueryable

All Known Implementing Classes:
AbstractArrayStore, FKArrayStore, JoinArrayStore

public interface ArrayStoreQueryable

Interface representation of the querying capabilities of a backing store for an array. This is part of the JDOQL "expression" design that will be refactored out when the new query engine replaces it.


Method Summary
 QueryExpression getExistsSubquery(QueryExpression stmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier collRangeVar)
          Create a subquery for the given query that joins a SetStore element table to the owner table.
 QueryExpression getSizeSubquery(QueryExpression stmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier collRangeVar)
          Create a subquery for the size of the collection.
 ScalarExpression joinElementsTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTe, DatastoreIdentifier collRangeVar, java.lang.Class filteredElementType, ScalarExpression elmExpr, DatastoreIdentifier elementRangeVar)
          Method used in queries when contains() has been invoked.
 

Method Detail

getExistsSubquery

QueryExpression getExistsSubquery(QueryExpression stmt,
                                  JavaTypeMapping ownerMapping,
                                  LogicSetExpression ownerTe,
                                  DatastoreIdentifier collRangeVar)
Create a subquery for the given query that joins a SetStore element table to the owner table. This subquery can subsequently be used in an EXISTS expression to determine whether a Collection is empty.

Parameters:
stmt - The Query Statement.
ownerMapping - the mapping for the owner.
ownerTe - Table Expression for the owner
collRangeVar - The range variable for the "Collection" table.
Returns:
A subquery for the given query that joins a SetStore element table to the owner table.

getSizeSubquery

QueryExpression getSizeSubquery(QueryExpression stmt,
                                JavaTypeMapping ownerMapping,
                                LogicSetExpression ownerTe,
                                DatastoreIdentifier collRangeVar)
Create a subquery for the size of the collection.

Parameters:
stmt - The Query Statement
ownerMapping - Mapping for the owner
ownerTe - Table Expression for the owner
collRangeVar - Range variable for the owner
Returns:
The subquery

joinElementsTo

ScalarExpression joinElementsTo(QueryExpression stmt,
                                QueryExpression parentStmt,
                                JavaTypeMapping ownerMapping,
                                LogicSetExpression ownerTe,
                                DatastoreIdentifier collRangeVar,
                                java.lang.Class filteredElementType,
                                ScalarExpression elmExpr,
                                DatastoreIdentifier elementRangeVar)
Method used in queries when contains() has been invoked.

Parameters:
stmt - The Query Statement
parentStmt - the parent Query Statement. If there is no parent, parentStmt must be equals to stmt
ownerMapping - the mapping for the owner.
ownerTe - Table Expression for the owner
collRangeVar - The range variable for the "Collection" table.
filteredElementType - The Class Type for the filtered element
elmExpr - The Expression for the element
elementRangeVar - The SQL alias, or "range variable", to assign to the expression or to the element table.
Returns:
expression to the join


Copyright © 2010. All Rights Reserved.