abstract class MaxEmbeddedLobFieldStrategy extends HandlerFieldStrategy
_args, _cols, _io, _load, _lobfieldUNSUPPORTED| Constructor and Description |
|---|
MaxEmbeddedLobFieldStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
customInsert(OpenJPAStateManager sm,
JDBCStore store)
Override this method to customize flushing this mapping.
|
void |
customUpdate(OpenJPAStateManager sm,
JDBCStore store)
Override this method to customize flushing this mapping.
|
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.
|
protected abstract int |
getExpectedJavaType()
Return the expected type of the field from
JavaTypes or
JavaSQLTypes. |
protected abstract java.lang.Object |
getValue(OpenJPAStateManager sm) |
void |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
protected abstract java.lang.Boolean |
isCustom(OpenJPAStateManager sm,
JDBCStore store)
Return whether this is a custom insert/update.
|
java.lang.Boolean |
isCustomInsert(OpenJPAStateManager sm,
JDBCStore store)
Return
Boolean.FALSE if this mapping does not customize the
insert process, Boolean.TRUE if it does, or null if it does
customize the insert, but also relies on the standard insert method
being called. |
java.lang.Boolean |
isCustomUpdate(OpenJPAStateManager sm,
JDBCStore store)
Return
Boolean.FALSE if this mapping does not customize the
update process, Boolean.TRUE if it does, or null if it does
customize the update, but also relies on the standard update method
being called. |
boolean |
isVersionable()
Return true if this field can be used as part of a state image for
optimistic locking.
|
Joins |
join(Joins joins,
boolean forceOuter)
Join this value to the class table.
|
protected java.lang.Object |
load(Column col,
Result res,
Joins joins)
Load this value from the given result.
|
void |
load(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch)
Load secondary data using a connection from the store manager.
|
void |
load(OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res)
Load virtual row data; the given result is not guaranteed to contain
data for this field, so the field mapping should make sure the
result contains its needed column data before loading.
|
java.lang.Object |
loadProjection(JDBCStore store,
JDBCFetchConfiguration fetch,
Result res,
Joins joins)
Load this field value using the given result.
|
void |
map(boolean adapt)
Map the owning mapping using this strategy.
|
protected abstract void |
putData(OpenJPAStateManager sm,
java.sql.ResultSet rs,
DBDictionary dict)
Set the data from the given state manager into the result set.
|
int |
select(Select sel,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch,
int eagerMode)
Select the virtual row columns of this mapping.
|
int |
supportsSelect(Select sel,
int type,
OpenJPAStateManager sm,
JDBCStore store,
JDBCFetchConfiguration fetch)
Return whether this mapping can perform the given select type.
|
void |
update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
protected abstract void |
update(OpenJPAStateManager sm,
Row row)
Set the value of the owning field into the given row.
|
void |
where(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm,
java.lang.Object prevValue)
Add a WHERE condition to the row for this field such that the field's
current DB value must equal the given previous value.
|
appendIsNotNull, appendIsNull, getColumnIO, getColumns, getFieldIndex, getJoinValue, getJoinValue, getPrimaryKeyValue, getResultArguments, initialize, joinRelation, loadEmbedded, setAutoAssignedValue, toDataStoreValue, toEmbeddedDataStoreValue, toEmbeddedObjectValueappendIndex, appendIsEmpty, appendIsNotEmpty, appendSize, appendType, assertNotMappedBy, isEagerSelectToMany, joinKey, joinKeyRelation, loadEagerJoin, loadEagerParallel, loadKeyProjection, selectEagerJoin, selectEagerParallel, setFieldMapping, toKeyDataStoreValuecustomDelete, getAlias, isCustomDeleteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomDelete, getAlias, isCustomDeleteprotected abstract int getExpectedJavaType()
JavaTypes or
JavaSQLTypes.protected abstract void update(OpenJPAStateManager sm, Row row) throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract java.lang.Boolean isCustom(OpenJPAStateManager sm, JDBCStore store)
protected abstract void putData(OpenJPAStateManager sm, java.sql.ResultSet rs, DBDictionary dict) throws java.sql.SQLException
java.sql.SQLExceptionpublic void map(boolean adapt)
Strategymap in interface Strategymap in class HandlerFieldStrategyadapt - if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be setpublic java.lang.Boolean isCustomInsert(OpenJPAStateManager sm, JDBCStore store)
StrategyBoolean.FALSE if this mapping does not customize the
insert process, Boolean.TRUE if it does, or null if it does
customize the insert, but also relies on the standard insert method
being called. Implement the Strategy.customInsert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore) method
to implement the custom insertion behavior.isCustomInsert in interface StrategyisCustomInsert in class AbstractStrategypublic java.lang.Boolean isCustomUpdate(OpenJPAStateManager sm, JDBCStore store)
StrategyBoolean.FALSE if this mapping does not customize the
update process, Boolean.TRUE if it does, or null if it does
customize the update, but also relies on the standard update method
being called. Implement the Strategy.customUpdate(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore) method
to override the default update behavior.isCustomUpdate in interface StrategyisCustomUpdate in class AbstractStrategypublic void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws java.sql.SQLException
Strategyinsert in interface Strategyinsert in class HandlerFieldStrategyjava.sql.SQLExceptionpublic void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws java.sql.SQLException
Strategyupdate in interface Strategyupdate in class HandlerFieldStrategyjava.sql.SQLExceptionStrategy.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 java.sql.SQLException
Strategydelete in interface Strategydelete in class HandlerFieldStrategyjava.sql.SQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)public void customInsert(OpenJPAStateManager sm, JDBCStore store) throws java.sql.SQLException
StrategycustomInsert in interface StrategycustomInsert in class AbstractStrategyjava.sql.SQLExceptionpublic void customUpdate(OpenJPAStateManager sm, JDBCStore store) throws java.sql.SQLException
StrategycustomUpdate in interface StrategycustomUpdate in class AbstractStrategyjava.sql.SQLExceptionpublic int supportsSelect(Select sel, int type, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch)
FieldStrategysupportsSelect in interface FieldStrategysupportsSelect in class HandlerFieldStrategySelectpublic int select(Select sel, OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode)
FieldStrategyselect in interface FieldStrategyselect in class HandlerFieldStrategysel - the select to add tosm - the instance being loaded, or null if not
initialized yet or selecting for multiple instancesstore - the current store managerfetch - fetch configurationeagerMode - the eager fetch mode to use; this may be more
restrictive than the mode of the fetch configurationpublic void load(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch, Result res) throws java.sql.SQLException
FieldStrategyload in interface FieldStrategyload in class HandlerFieldStrategyjava.sql.SQLExceptionpublic void load(OpenJPAStateManager sm, JDBCStore store, JDBCFetchConfiguration fetch) throws java.sql.SQLException
FieldStrategyload in interface FieldStrategyload in class HandlerFieldStrategyjava.sql.SQLExceptionprotected java.lang.Object load(Column col, Result res, Joins joins) throws java.sql.SQLException
java.sql.SQLExceptionpublic Joins join(Joins joins, boolean forceOuter)
FieldStrategyjoin in interface FieldStrategyjoin in class HandlerFieldStrategypublic java.lang.Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws java.sql.SQLException
FieldStrategyValueMapping.getColumns().loadProjection in interface FieldStrategyloadProjection in class HandlerFieldStrategyjava.sql.SQLExceptionpublic boolean isVersionable()
FieldStrategyisVersionable in interface FieldStrategyisVersionable in class HandlerFieldStrategypublic void where(OpenJPAStateManager sm, JDBCStore store, RowManager rm, java.lang.Object prevValue) throws java.sql.SQLException
FieldStrategywhere in interface FieldStrategywhere in class HandlerFieldStrategyjava.sql.SQLExceptionprotected abstract java.lang.Object getValue(OpenJPAStateManager sm)
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.