org.apache.openjpa.jdbc.meta.strats
Interface LRSCollectionFieldStrategy

All Superinterfaces:
FieldStrategy, Serializable, Strategy
All Known Implementing Classes:
HandlerCollectionTableFieldStrategy, RelationCollectionInverseKeyFieldStrategy, RelationCollectionTableFieldStrategy

public interface LRSCollectionFieldStrategy
extends FieldStrategy

Interface implemented by collection strategies so that they can support large result set collections.

Author:
Abe White

Method Summary
 Column[] getElementColumns(ClassMapping elem)
          Return the columns holding the data for a collection element for the given element mapping from getIndependentElementMappings(boolean) (or null).
 FieldMapping getFieldMapping()
          The owning field mapping.
 ClassMapping[] getIndependentElementMappings(boolean traverse)
          Return all independent mappings to which this strategy must join in order to access collection elements, or empty array if none.
 ForeignKey getJoinForeignKey(ClassMapping elem)
          Return the foreign key used to join to the owning field for the given element mapping from getIndependentElementMappings(boolean) (or null).
 Joins joinElementRelation(Joins joins, ClassMapping elem)
          Join this value's table to the table for the given element mapping from getIndependentElementMappings(boolean) (or null).
 Object loadElement(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins)
          Load an element of the collection.
 void selectElement(Select sel, ClassMapping elem, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode, Joins joins)
          Implement this method to select the elements of this field for the given element mapping from getIndependentElementMappings(boolean) (or null).
 
Methods inherited from interface org.apache.openjpa.jdbc.meta.FieldStrategy
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, isEagerSelectToMany, isVersionable, join, joinKey, joinKeyRelation, joinRelation, load, load, loadEagerJoin, loadEagerParallel, loadKeyProjection, loadProjection, select, selectEagerJoin, selectEagerParallel, setFieldMapping, supportsSelect, toDataStoreValue, toKeyDataStoreValue, where
 
Methods inherited from interface org.apache.openjpa.jdbc.meta.Strategy
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, update
 

Method Detail

getFieldMapping

FieldMapping getFieldMapping()
The owning field mapping.


getIndependentElementMappings

ClassMapping[] getIndependentElementMappings(boolean traverse)
Return all independent mappings to which this strategy must join in order to access collection elements, or empty array if none.

Parameters:
traverse - whether we're traversing through to the related type
See Also:
ValueMapping.getIndependentTypeMappings(), ClassMapping.EMPTY_MAPPINGS

getJoinForeignKey

ForeignKey getJoinForeignKey(ClassMapping elem)
Return the foreign key used to join to the owning field for the given element mapping from getIndependentElementMappings(boolean) (or null).


getElementColumns

Column[] getElementColumns(ClassMapping elem)
Return the columns holding the data for a collection element for the given element mapping from getIndependentElementMappings(boolean) (or null).


selectElement

void selectElement(Select sel,
                   ClassMapping elem,
                   JDBCStore store,
                   JDBCFetchConfiguration fetch,
                   int eagerMode,
                   Joins joins)
Implement this method to select the elements of this field for the given element mapping from getIndependentElementMappings(boolean) (or null). Elements of the result will be loaded with loadElement(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration, org.apache.openjpa.jdbc.sql.Result, org.apache.openjpa.jdbc.sql.Joins).


loadElement

Object loadElement(OpenJPAStateManager sm,
                   JDBCStore store,
                   JDBCFetchConfiguration fetch,
                   Result res,
                   Joins joins)
                   throws SQLException
Load an element of the collection. The given state manager might be null if the load is for a projection or for processing eager parallel results.

Throws:
SQLException

joinElementRelation

Joins joinElementRelation(Joins joins,
                          ClassMapping elem)
Join this value's table to the table for the given element mapping from getIndependentElementMappings(boolean) (or null).

See Also:
FieldMapping.joinRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean)


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.