com.triactive.jdo.store
Interface CollectionStore

All Known Subinterfaces:
SetStore
All Known Implementing Classes:
com.triactive.jdo.store.AbstractSetStore

public interface CollectionStore

The backing store for a collection.

The collection involved might be a SetStore or might be the keys or values in a MapStore viewed as a CollectionStore.

Author:
Mike Martin

Method Summary
 boolean allowsNulls()
          Indicates whether or not null elements are allowed to be stored.
 java.lang.Class getElementType()
          Returns the type of elements stored in the collection.
 boolean isEmbeddedElement()
          Indicates whether or not elements are "embedded" in the store.
 QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs, CorrelationName collectionRangeVar)
          Creates a subquery of the given query that selects all the relationships in the collection.
 QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs, CorrelationName collectionRangeVar, CorrelationName elementRangeVar, java.lang.Class elementSubtype)
          Creates a subquery of the given query that selects all the relationships in the collection to elements of a specific type.
 

Method Detail

getElementType

public java.lang.Class getElementType()
Returns the type of elements stored in the collection.


isEmbeddedElement

public boolean isEmbeddedElement()
Indicates whether or not elements are "embedded" in the store. An embedded object is stored by value (SCO), otherwise an OID reference is stored (FCO).


allowsNulls

public boolean allowsNulls()
Indicates whether or not null elements are allowed to be stored.


newSubqueryStatement

public QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs,
                                                         CorrelationName collectionRangeVar)
Creates a subquery of the given query that selects all the relationships in the collection. No columns have been selected yet in the new subquery.

Parameters:
qs - The surrounding query statement.
collectionRangeVar - The range variable to be used for the "Set" table in the subquery.
Returns:
An array of two QueryColumns representing the owner ID column and the element or element ID column, respectively, in the subquery.

newSubqueryStatement

public QueryStatement.QueryColumn[] newSubqueryStatement(QueryStatement qs,
                                                         CorrelationName collectionRangeVar,
                                                         CorrelationName elementRangeVar,
                                                         java.lang.Class elementSubtype)
Creates a subquery of the given query that selects all the relationships in the collection to elements of a specific type. No columns have been selected yet in the new subquery.

Parameters:
qs - The surrounding query statement.
collectionRangeVar - The range variable to be used for the "Set" table in the subquery.
elementRangeVar - The range variable to be used for the "Element" table in the subquery, if necessary.
elementSubtype - Attempts to query only over elements of this type.
Returns:
An array of two QueryColumns representing the owner ID column and the element or element ID column, respectively, in the subquery.


Copyright © 2001-2007 The TJDO Project All Rights Reserved.