public abstract class AbstractStrategy extends Object implements Strategy
| Constructor and Description |
|---|
AbstractStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
customDelete(OpenJPAStateManager sm,
JDBCStore store)
Override this method to customize flushing this mapping.
|
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.
|
String |
getAlias()
Return the alias of this strategy.
|
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.
|
Boolean |
isCustomDelete(OpenJPAStateManager sm,
JDBCStore store)
Return
Boolean.FALSE if this mapping does not customize the
delete process, Boolean.TRUE if it does, or null if it does
customize the delete, but also relies on the standard delete method
being called. |
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. |
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. |
void |
map(boolean adapt)
Map the owning mapping using this strategy.
|
void |
update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
public String getAlias()
Strategypublic void map(boolean adapt)
Strategypublic void initialize()
StrategyStrategy.map(boolean), and after all related components have been
mapped as well.initialize in interface Strategypublic void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategyinsert in interface StrategySQLExceptionpublic void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategyupdate in interface StrategySQLExceptionStrategy.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 StrategySQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)public 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 Strategypublic 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 Strategypublic Boolean isCustomDelete(OpenJPAStateManager sm, JDBCStore store)
StrategyBoolean.FALSE if this mapping does not customize the
delete process, Boolean.TRUE if it does, or null if it does
customize the delete, but also relies on the standard delete method
being called. Implement the Strategy.customDelete(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore) method
to override the default deletion behavior.isCustomDelete in interface Strategypublic void customInsert(OpenJPAStateManager sm, JDBCStore store) throws SQLException
StrategycustomInsert in interface StrategySQLExceptionpublic void customUpdate(OpenJPAStateManager sm, JDBCStore store) throws SQLException
StrategycustomUpdate in interface StrategySQLExceptionpublic void customDelete(OpenJPAStateManager sm, JDBCStore store) throws SQLException
StrategycustomDelete in interface StrategySQLExceptionCopyright © 2006–2022 Apache Software Foundation. All rights reserved.