|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractFieldStrategy
org.apache.openjpa.jdbc.meta.strats.ContainerFieldStrategy
org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy
org.apache.openjpa.jdbc.meta.strats.HandlerCollectionTableFieldStrategy
public class HandlerCollectionTableFieldStrategy
Mapping for a collection of values in a separate table controlled by a
ValueHandler.
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractFieldStrategy |
|---|
field |
| Constructor Summary | |
|---|---|
HandlerCollectionTableFieldStrategy()
|
|
| Method Summary | |
|---|---|
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 |
initialize()
Perform caching and other initialization operations. |
void |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows. |
Joins |
join(Joins joins,
boolean forceOuter)
Join this value to the class table. |
protected 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). |
Joins |
joinRelation(Joins joins,
boolean forceOuter,
boolean traverse)
Join this value's table to the table for the related first class object type, if any. |
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). |
int |
supportsSelect(Select sel,
int type,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch)
Return whether this mapping can perform the given select type. |
Object |
toDataStoreValue(Object val,
JDBCStore store)
Translate the given external field value to its datastore equivalent. |
void |
update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows. |
| Methods inherited from class org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy |
|---|
add, getJoinForeignKey, isEagerSelectToMany, load, loadEagerJoin, loadEagerParallel, loadProjection, selectAll, selectEagerJoin, selectEagerParallel, toCollection |
| Methods inherited from class org.apache.openjpa.jdbc.meta.strats.ContainerFieldStrategy |
|---|
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendJoinCount, appendSize, appendUnaliasedJoin |
| Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractFieldStrategy |
|---|
assertNotMappedBy, isVersionable, joinKey, joinKeyRelation, load, loadKeyProjection, select, setFieldMapping, toKeyDataStoreValue, where |
| Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy |
|---|
customDelete, customInsert, customUpdate, getAlias, isCustomDelete, isCustomInsert, isCustomUpdate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.openjpa.jdbc.meta.FieldStrategy |
|---|
appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, isEagerSelectToMany, isVersionable, joinKey, joinKeyRelation, load, load, loadEagerJoin, loadEagerParallel, loadKeyProjection, loadProjection, select, selectEagerJoin, selectEagerParallel, setFieldMapping, toKeyDataStoreValue, where |
| Methods inherited from interface org.apache.openjpa.jdbc.meta.Strategy |
|---|
customDelete, customInsert, customUpdate, getAlias, isCustomDelete, isCustomInsert, isCustomUpdate |
| Constructor Detail |
|---|
public HandlerCollectionTableFieldStrategy()
| Method Detail |
|---|
public FieldMapping getFieldMapping()
LRSCollectionFieldStrategy
getFieldMapping in interface LRSCollectionFieldStrategypublic ClassMapping[] getIndependentElementMappings(boolean traverse)
ContainerFieldStrategy
getIndependentElementMappings in interface LRSCollectionFieldStrategygetIndependentElementMappings in class ContainerFieldStrategytraverse - 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 StoreCollectionFieldStrategy
public 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 StoreCollectionFieldStrategy
public Object loadElement(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
throws SQLException
StoreCollectionFieldStrategy
loadElement in interface LRSCollectionFieldStrategyloadElement in class StoreCollectionFieldStrategySQLException
protected Joins join(Joins joins,
ClassMapping elem)
StoreCollectionFieldStrategyContainerFieldStrategy.getIndependentElementMappings(boolean) (or null).
join in class StoreCollectionFieldStrategy
public Joins joinElementRelation(Joins joins,
ClassMapping elem)
StoreCollectionFieldStrategyContainerFieldStrategy.getIndependentElementMappings(boolean) (or null).
joinElementRelation in interface LRSCollectionFieldStrategyjoinElementRelation in class StoreCollectionFieldStrategyFieldMapping.joinRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean)protected Proxy newLRSProxy()
StoreCollectionFieldStrategy
newLRSProxy in class StoreCollectionFieldStrategypublic void map(boolean adapt)
Strategy
map in interface Strategymap in class AbstractStrategyadapt - if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be setpublic void initialize()
StrategyStrategy.map(boolean), and after all related components have been
mapped as well.
initialize in interface Strategyinitialize in class AbstractStrategy
public void insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
throws SQLException
Strategy
insert in interface Strategyinsert in class AbstractStrategySQLException
public void update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
throws SQLException
Strategy
update in interface Strategyupdate in class AbstractStrategySQLExceptionStrategy.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
Strategy
delete in interface Strategydelete in class AbstractStrategySQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)
public int supportsSelect(Select sel,
int type,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch)
FieldStrategy
supportsSelect in interface FieldStrategysupportsSelect in class StoreCollectionFieldStrategySelect
public Object toDataStoreValue(Object val,
JDBCStore store)
FieldStrategy
toDataStoreValue in interface FieldStrategytoDataStoreValue in class AbstractFieldStrategy
public Joins join(Joins joins,
boolean forceOuter)
FieldStrategy
join in interface FieldStrategyjoin in class AbstractFieldStrategy
public Joins joinRelation(Joins joins,
boolean forceOuter,
boolean traverse)
FieldStrategy
joinRelation in interface FieldStrategyjoinRelation in class AbstractFieldStrategytraverse - if true, throw proper exception if it is not
possible for this mapping to traverse into the related type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||