public class HandlerHandlerMapTableFieldStrategy extends MapTableFieldStrategy
ValueHandler
s.field
Constructor and Description |
---|
HandlerHandlerMapTableFieldStrategy() |
Modifier and Type | Method and Description |
---|---|
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[] joins,
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 |
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 |
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 cls,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Joins joins)
Implement this method to select the keys of this field.
|
void |
selectValue(Select sel,
ClassMapping cls,
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.
|
delete, deriveKey, deriveValue, getFieldMapping, getIndependentElementMappings, getIndependentKeyMappings, getIndependentValueMappings, getJoinForeignKey, getJoinForeignKey, handleMappedByForeignKey, isTypeUnjoinedSubclass, join, joinKey, joinKeyRelation, joinValueRelation, load, loadKeyProjection, loadProjection, populateKey, supportsSelect
appendIndex, appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendJoinCount, appendSize, appendUnaliasedJoin
appendType, assertNotMappedBy, isEagerSelectToMany, isVersionable, load, loadEagerJoin, loadEagerParallel, select, selectEagerJoin, selectEagerParallel, setFieldMapping, where
customDelete, customInsert, customUpdate, getAlias, isCustomDelete, isCustomInsert, isCustomUpdate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendIndex, appendIsEmpty, appendIsNotEmpty, appendIsNotNull, appendIsNull, appendSize, appendType, isEagerSelectToMany, isVersionable, load, loadEagerJoin, loadEagerParallel, select, selectEagerJoin, selectEagerParallel, setFieldMapping, where
customDelete, customInsert, customUpdate, getAlias, isCustomDelete, isCustomInsert, isCustomUpdate
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 cls, 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 cls, 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[] joins, 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 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 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
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 typeCopyright © 2006–2018 Apache Software Foundation. All rights reserved.