public class RelationCollectionTableFieldStrategy extends RelationToManyTableFieldStrategy implements LRSCollectionFieldStrategy
field| Constructor and Description |
|---|
RelationCollectionTableFieldStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set the where values appropriately to delete the proper instance,
and set all relations on non-secondary tables as updates.
|
Column[] |
getElementColumns(ClassMapping elem)
Return the columns holding the data for a collection element for the
given element mapping from
LRSCollectionFieldStrategy.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
ContainerFieldStrategy.getIndependentElementMappings(boolean) (or null). |
void |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
Joins |
join(Joins joins,
ClassMapping elem)
Join to the owning field table for the given element mapping from
ContainerFieldStrategy.getIndependentElementMappings(boolean) (or null). |
Joins |
joinElementRelation(Joins joins,
ClassMapping elem)
Join this value's table to the table for the given element mapping
from
ContainerFieldStrategy.getIndependentElementMappings(boolean) (or null). |
Object |
loadElement(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
Load an element of the collection.
|
void |
map(boolean adapt)
Map the owning mapping using this strategy.
|
protected Proxy |
newLRSProxy()
Return a large result set proxy for this field.
|
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
ContainerFieldStrategy.getIndependentElementMappings(boolean)
(or null). |
void |
update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
join, joinRelation, toDataStoreValueadd, getJoinForeignKey, isEagerSelectToMany, load, loadEagerJoin, loadEagerParallel, loadProjection, selectAll, selectEagerJoin, selectEagerParallel, supportsSelect, toCollectionappendIndex, appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendJoinCount, appendSize, appendUnaliasedJoinappendType, assertNotMappedBy, isVersionable, joinKey, joinKeyRelation, load, loadKeyProjection, select, setFieldMapping, toKeyDataStoreValue, wherecustomDelete, customInsert, customUpdate, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendIndex, 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, wherecustomDelete, customInsert, customUpdate, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdatepublic RelationCollectionTableFieldStrategy()
public FieldMapping getFieldMapping()
LRSCollectionFieldStrategygetFieldMapping in interface LRSCollectionFieldStrategypublic ClassMapping[] getIndependentElementMappings(boolean traverse)
ContainerFieldStrategygetIndependentElementMappings in interface LRSCollectionFieldStrategygetIndependentElementMappings in class RelationToManyTableFieldStrategytraverse - whether we're traversing through to the related typeValueMapping.getIndependentTypeMappings(),
ClassMapping.EMPTY_MAPPINGSpublic Column[] getElementColumns(ClassMapping elem)
LRSCollectionFieldStrategyLRSCollectionFieldStrategy.getIndependentElementMappings(boolean)
(or null).getElementColumns in interface LRSCollectionFieldStrategypublic ForeignKey getJoinForeignKey(ClassMapping elem)
StoreCollectionFieldStrategyContainerFieldStrategy.getIndependentElementMappings(boolean) (or null).getJoinForeignKey in interface LRSCollectionFieldStrategygetJoinForeignKey in class RelationToManyTableFieldStrategypublic void selectElement(Select sel, ClassMapping elem, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode, Joins joins)
StoreCollectionFieldStrategyContainerFieldStrategy.getIndependentElementMappings(boolean)
(or null). Elements of the result will be loaded with
StoreCollectionFieldStrategy.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).selectElement in interface LRSCollectionFieldStrategyselectElement in class RelationToManyTableFieldStrategypublic Object loadElement(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException
StoreCollectionFieldStrategyloadElement in interface LRSCollectionFieldStrategyloadElement in class RelationToManyTableFieldStrategySQLExceptionpublic Joins join(Joins joins, ClassMapping elem)
StoreCollectionFieldStrategyContainerFieldStrategy.getIndependentElementMappings(boolean) (or null).join in class RelationToManyTableFieldStrategypublic Joins joinElementRelation(Joins joins, ClassMapping elem)
StoreCollectionFieldStrategyContainerFieldStrategy.getIndependentElementMappings(boolean) (or null).joinElementRelation in interface LRSCollectionFieldStrategyjoinElementRelation in class RelationToManyTableFieldStrategyFieldMapping.joinRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean)protected Proxy newLRSProxy()
StoreCollectionFieldStrategynewLRSProxy in class StoreCollectionFieldStrategypublic void map(boolean adapt)
Strategymap in interface Strategymap in class RelationToManyTableFieldStrategyadapt - if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be setpublic void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategyinsert in interface Strategyinsert in class RelationToManyTableFieldStrategySQLExceptionpublic void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategyupdate in interface Strategyupdate in class RelationToManyTableFieldStrategySQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)public void delete(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategydelete in interface Strategydelete in class RelationToManyTableFieldStrategySQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)Copyright © 2006–2022 Apache Software Foundation. All rights reserved.