|
||||||||||
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.MapTableFieldStrategy
org.apache.openjpa.jdbc.meta.strats.RelationRelationMapTableFieldStrategy
public class RelationRelationMapTableFieldStrategy
Mapping for a map whose keys and values are both relations to other persistent objects.
Field Summary |
---|
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractFieldStrategy |
---|
field |
Constructor Summary | |
---|---|
RelationRelationMapTableFieldStrategy()
|
Method Summary | |
---|---|
Column[] |
getKeyColumns(ClassMapping cls)
Return the columns holding data for a map key for the given key mapping from LRSMapFieldStrategy.getIndependentKeyMappings(boolean) or
LRSMapFieldStrategy.getIndependentValueMappings(boolean) (or null). |
Result[] |
getResults(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
int eagerMode,
Joins[] resJoins,
boolean lrs)
Return results containing all keys and values for this map. |
Column[] |
getValueColumns(ClassMapping cls)
Return the columns holding data for a map value for the given value mapping from LRSMapFieldStrategy.getIndependentKeyMappings(boolean) or
LRSMapFieldStrategy.getIndependentValueMappings(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 |
joinKeyRelation(Joins joins,
boolean forceOuter,
boolean traverse)
Join this value's table to the table for the related first class object key type, if any. |
Joins |
joinKeyRelation(Joins joins,
ClassMapping key)
Invokes FieldStrategy.joinKeyRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean) by default. |
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. |
Joins |
joinValueRelation(Joins joins,
ClassMapping val)
Invokes FieldStrategy.joinRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean) by default. |
Object |
loadKey(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
Load a key from the given result. |
Object |
loadValue(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
Load a value from the given result. |
void |
map(boolean adapt)
Map the owning mapping using this strategy. |
void |
selectKey(Select sel,
ClassMapping key,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Joins joins)
Implement this method to select the keys of this field. |
void |
selectValue(Select sel,
ClassMapping val,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Joins joins)
Implement this method to select the values of this field. |
Object |
toDataStoreValue(Object val,
JDBCStore store)
Translate the given external field value to its datastore equivalent. |
Object |
toKeyDataStoreValue(Object val,
JDBCStore store)
Translate the given key 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.MapTableFieldStrategy |
---|
delete, deriveKey, deriveValue, getFieldMapping, getIndependentElementMappings, getIndependentKeyMappings, getIndependentValueMappings, getJoinForeignKey, getJoinForeignKey, join, joinKey, load, loadKeyProjection, loadProjection, supportsSelect |
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, isEagerSelectToMany, isVersionable, load, loadEagerJoin, loadEagerParallel, select, selectEagerJoin, selectEagerParallel, setFieldMapping, 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, load, loadEagerJoin, loadEagerParallel, select, selectEagerJoin, selectEagerParallel, setFieldMapping, where |
Methods inherited from interface org.apache.openjpa.jdbc.meta.Strategy |
---|
customDelete, customInsert, customUpdate, getAlias, isCustomDelete, isCustomInsert, isCustomUpdate |
Constructor Detail |
---|
public RelationRelationMapTableFieldStrategy()
Method Detail |
---|
public Column[] getKeyColumns(ClassMapping cls)
LRSMapFieldStrategy
LRSMapFieldStrategy.getIndependentKeyMappings(boolean)
or
LRSMapFieldStrategy.getIndependentValueMappings(boolean)
(or null).
public Column[] getValueColumns(ClassMapping cls)
LRSMapFieldStrategy
LRSMapFieldStrategy.getIndependentKeyMappings(boolean)
or
LRSMapFieldStrategy.getIndependentValueMappings(boolean)
(or null).
public void selectKey(Select sel, ClassMapping key, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins)
LRSMapFieldStrategy
LRSMapFieldStrategy.loadKey(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)
.
This method is only used if the key is not derived from the value.
public void selectValue(Select sel, ClassMapping val, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Joins joins)
LRSMapFieldStrategy
LRSMapFieldStrategy.loadValue(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)
.
public Result[] getResults(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode, Joins[] resJoins, boolean lrs) throws SQLException
LRSMapFieldStrategy
LRSMapFieldStrategy.loadKey(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)
or
LRSMapFieldStrategy.deriveKey(org.apache.openjpa.jdbc.kernel.JDBCStore, java.lang.Object)
and LRSMapFieldStrategy.loadValue(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)
methods.
SQLException
public Object loadKey(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException
LRSMapFieldStrategy
SQLException
public Object loadValue(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException
LRSMapFieldStrategy
SQLException
public Joins joinKeyRelation(Joins joins, ClassMapping key)
MapTableFieldStrategy
FieldStrategy.joinKeyRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean)
by default.
joinKeyRelation
in interface LRSMapFieldStrategy
joinKeyRelation
in class MapTableFieldStrategy
public Joins joinValueRelation(Joins joins, ClassMapping val)
MapTableFieldStrategy
FieldStrategy.joinRelation(org.apache.openjpa.jdbc.sql.Joins, boolean, boolean)
by default.
joinValueRelation
in interface LRSMapFieldStrategy
joinValueRelation
in class MapTableFieldStrategy
public void map(boolean adapt)
Strategy
map
in interface Strategy
map
in class MapTableFieldStrategy
adapt
- 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()
Strategy
Strategy.map(boolean)
, and after all related components have been
mapped as well.
initialize
in interface Strategy
initialize
in class AbstractStrategy
public void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategy
insert
in interface Strategy
insert
in class AbstractStrategy
SQLException
public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategy
update
in interface Strategy
update
in class AbstractStrategy
SQLException
Strategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)
public Joins joinRelation(Joins joins, boolean forceOuter, boolean traverse)
FieldStrategy
joinRelation
in interface FieldStrategy
joinRelation
in class AbstractFieldStrategy
traverse
- if true, throw proper exception if it is not
possible for this mapping to traverse into the related typepublic Joins joinKeyRelation(Joins joins, boolean forceOuter, boolean traverse)
FieldStrategy
joinKeyRelation
in interface FieldStrategy
joinKeyRelation
in class AbstractFieldStrategy
traverse
- if true, throw proper exception if it is not
possible for this mapping to traverse into the related typepublic Object toDataStoreValue(Object val, JDBCStore store)
FieldStrategy
toDataStoreValue
in interface FieldStrategy
toDataStoreValue
in class AbstractFieldStrategy
public Object toKeyDataStoreValue(Object val, JDBCStore store)
FieldStrategy
toKeyDataStoreValue
in interface FieldStrategy
toKeyDataStoreValue
in class AbstractFieldStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.