Interface LRSCollectionFieldStrategy
- All Superinterfaces:
FieldStrategy
,Serializable
,Strategy
- All Known Implementing Classes:
HandlerCollectionTableFieldStrategy
,RelationCollectionInverseKeyFieldStrategy
,RelationCollectionTableFieldStrategy
Interface implemented by collection strategies so that they can
support large result set collections.
- Author:
- Abe White
-
Method Summary
Modifier and TypeMethodDescriptionColumn[]
Return the columns holding the data for a collection element for the given element mapping fromgetIndependentElementMappings(boolean)
(or null).The owning field mapping.getIndependentElementMappings
(boolean traverse) Return all independent mappings to which this strategy must join in order to access collection elements, or empty array if none.Return the foreign key used to join to the owning field for the given element mapping fromgetIndependentElementMappings(boolean)
(or null).joinElementRelation
(Joins joins, ClassMapping elem) Join this value's table to the table for the given element mapping fromgetIndependentElementMappings(boolean)
(or null).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 fromgetIndependentElementMappings(boolean)
(or null).Methods inherited from interface org.apache.openjpa.jdbc.meta.FieldStrategy
appendIndex, appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, appendType, 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 Details
-
getFieldMapping
FieldMapping getFieldMapping()The owning field mapping. -
getIndependentElementMappings
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:
-
getJoinForeignKey
Return the foreign key used to join to the owning field for the given element mapping fromgetIndependentElementMappings(boolean)
(or null). -
getElementColumns
Return the columns holding the data for a collection element for the given element mapping fromgetIndependentElementMappings(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 fromgetIndependentElementMappings(boolean)
(or null). Elements of the result will be loaded withloadElement(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
Join this value's table to the table for the given element mapping fromgetIndependentElementMappings(boolean)
(or null).
-