| org.jpox.store.scostore.CollectionStore
CollectionStore | public interface CollectionStore extends Store(Code) | | Interface representation of the backing store for a Collection.
version: $Revision: 1.17 $ |
Method Summary | |
boolean | add(StateManager sm, Object element, int size) Method to add an element to the collection.
Parameters: sm - State Manager for the collection. | boolean | addAll(StateManager sm, Collection elements, int size) Method to add a collection of elements to the collection.
Parameters: sm - State Manager for the collection. | void | clear(StateManager sm) Method to clear the collection.
Parameters: sm - State Manager for the collection. | boolean | contains(StateManager sm, Object element) Method to check if an element exists in the collection.
Parameters: sm - State Manager for the collection. | String | getElementType() Accessor for the element type in the collection. | QueryExpression | getExistsSubquery(QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTableExpr, DatastoreIdentifier existsTableAlias) Create a subquery for the given query that selects elements, joining to the owner table. | QueryExpression | getSizeSubquery(QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTableExpr, DatastoreIdentifier sizeTableAlias) Create a subquery for the size of the collection. | boolean | hasOrderMapping() Accessor for whether the store utilises an order mapping. | Iterator | iterator(StateManager sm) Accessor for an iterator for the collection.
Parameters: sm - State Manager for the collection. | ScalarExpression | joinElementsTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTableExpr, DatastoreIdentifier collectionTableAlias, Class filteredElementType, ScalarExpression elementExpr, DatastoreIdentifier elementTableAlias, boolean existsQuery) Method used in queries when contains() has been invoked.
Parameters: stmt - The Query Statement Parameters: parentStmt - the parent Query Statement. | QueryExpression | newQueryStatement(StateManager sm, String candidateClass, DatastoreIdentifier candidateAlias) Method to return a new Query Statement containing the candidate class. | ResultObjectFactory | newResultObjectFactory(StateManager sm, QueryExpression stmt, boolean ignoreCache, boolean useFetchPlan) Method to return an object factory for processing query statements. | boolean | remove(StateManager sm, Object element, int size, boolean allowDependentField) Method to remove an element from the collection.
Parameters: sm - State Manager for the collection. | boolean | removeAll(StateManager sm, Collection elements, int size) Method to remove a collection of elements from the collection.
Parameters: sm - State Manager for the collection. | int | size(StateManager sm) Accessor for the size of the collection.
Parameters: sm - State Manager for the collection. | boolean | updateEmbeddedElement(StateManager sm, Object element, int fieldNumber, Object value) Method to update en embedded element in the collection. |
add | boolean add(StateManager sm, Object element, int size)(Code) | | Method to add an element to the collection.
Parameters: sm - State Manager for the collection. Parameters: element - Element to add Parameters: size - Current size of the collection if known. -1 if not known Whether the element was added ok |
addAll | boolean addAll(StateManager sm, Collection elements, int size)(Code) | | Method to add a collection of elements to the collection.
Parameters: sm - State Manager for the collection. Parameters: elements - Elements to add Parameters: size - Current size of collection (if known). -1 if not known Whether the elements were added ok |
clear | void clear(StateManager sm)(Code) | | Method to clear the collection.
Parameters: sm - State Manager for the collection. |
contains | boolean contains(StateManager sm, Object element)(Code) | | Method to check if an element exists in the collection.
Parameters: sm - State Manager for the collection. Parameters: element - Element to check Whether the element exists in the collection. |
getElementType | String getElementType()(Code) | | Accessor for the element type in the collection.
The element type. |
getExistsSubquery | QueryExpression getExistsSubquery(QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTableExpr, DatastoreIdentifier existsTableAlias)(Code) | | Create a subquery for the given query that selects elements, joining to the owner table.
This subquery can subsequently be used in an EXISTS expression to determine whether a Collection is empty.
Parameters: parentStmt - Parent query statement for this subquery Parameters: ownerMapping - Id mapping for the owner Parameters: ownerTableExpr - Table Expression for the owner that the subquery joins to Parameters: existsTableAlias - Alias for this subquery main table Subquery returning the existence of elements |
getSizeSubquery | QueryExpression getSizeSubquery(QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTableExpr, DatastoreIdentifier sizeTableAlias)(Code) | | Create a subquery for the size of the collection.
Parameters: parentStmt - Parent query statement for this subquery Parameters: ownerMapping - Id mapping for the owner Parameters: ownerTableExpr - Table Expression for the owner in the parent statement that the subquery joins to Parameters: sizeTableAlias - Alias for this subquery main table Subquery returning the size |
hasOrderMapping | boolean hasOrderMapping()(Code) | | Accessor for whether the store utilises an order mapping.
An order mapping is used to allow for ordering of elements or to allow duplicates.
Whether it uses an order mapping. |
iterator | Iterator iterator(StateManager sm)(Code) | | Accessor for an iterator for the collection.
Parameters: sm - State Manager for the collection. Iterator for the collection. |
joinElementsTo | ScalarExpression joinElementsTo(QueryExpression stmt, QueryExpression parentStmt, JavaTypeMapping ownerMapping, LogicSetExpression ownerTableExpr, DatastoreIdentifier collectionTableAlias, Class filteredElementType, ScalarExpression elementExpr, DatastoreIdentifier elementTableAlias, boolean existsQuery)(Code) | | Method used in queries when contains() has been invoked.
Parameters: stmt - The Query Statement Parameters: parentStmt - the parent Query Statement. If there is no parent, "parentStmt" must be equals to "stmt". Parameters: ownerMapping - the mapping for the owner Parameters: ownerTableExpr - Table Expression for the owner Parameters: collectionTableAlias - Alias for the "Collection" table. Parameters: filteredElementType - The Class Type for the filtered element Parameters: elementExpr - The Expression for the element Parameters: elementTableAlias - The SQL alias to assign to the element table expression Parameters: existsQuery - Whether this is joining for an EXISTS query expression to the join |
newQueryStatement | QueryExpression newQueryStatement(StateManager sm, String candidateClass, DatastoreIdentifier candidateAlias)(Code) | | Method to return a new Query Statement containing the candidate class.
Parameters: sm - State Manager for the collection. Parameters: candidateClass - Class of the elements. Parameters: candidateAlias - Alias for the candidate The Query Statement. |
newResultObjectFactory | ResultObjectFactory newResultObjectFactory(StateManager sm, QueryExpression stmt, boolean ignoreCache, boolean useFetchPlan)(Code) | | Method to return an object factory for processing query statements.
Parameters: sm - State Manager for the collection. Parameters: stmt - The Query Statement. Parameters: ignoreCache - Whether to ignore the cache. Parameters: useFetchPlan - whether to use the fetch plan to retrieve fields in the same query The Persistent object factory. |
remove | boolean remove(StateManager sm, Object element, int size, boolean allowDependentField)(Code) | | Method to remove an element from the collection.
Parameters: sm - State Manager for the collection. Parameters: element - Element to remove Parameters: size - Current size of collection if known. -1 if not known Parameters: allowDependentField - Whether to allow any cascading delete actions to be fired from this removal Whether the element was removed ok |
removeAll | boolean removeAll(StateManager sm, Collection elements, int size)(Code) | | Method to remove a collection of elements from the collection.
Parameters: sm - State Manager for the collection. Parameters: elements - Element to remove Parameters: size - Current size of collection if known. -1 if not known Whether the elements were removed ok |
size | int size(StateManager sm)(Code) | | Accessor for the size of the collection.
Parameters: sm - State Manager for the collection. The size of the collection. |
updateEmbeddedElement | boolean updateEmbeddedElement(StateManager sm, Object element, int fieldNumber, Object value)(Code) | | Method to update en embedded element in the collection.
Parameters: sm - State Manager of the owner Parameters: element - The element Parameters: fieldNumber - Field to update in the element Parameters: value - The new value for the field Whether the element was modified |
|
|