Class AbstractStrategy
java.lang.Object
org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
- All Implemented Interfaces:
- Serializable,- Strategy
- Direct Known Subclasses:
- AbstractClassStrategy,- AbstractDiscriminatorStrategy,- AbstractFieldStrategy,- AbstractVersionStrategy
No-op strategy for easy extension.
- Author:
- Abe White
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcustomDelete(OpenJPAStateManager sm, JDBCStore store) Override this method to customize flushing this mapping.voidcustomInsert(OpenJPAStateManager sm, JDBCStore store) Override this method to customize flushing this mapping.voidcustomUpdate(OpenJPAStateManager sm, JDBCStore store) Override this method to customize flushing this mapping.voiddelete(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.getAlias()Return the alias of this strategy.voidPerform caching and other initialization operations.voidinsert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) Set values for the mapping into the proper rows.isCustomDelete(OpenJPAStateManager sm, JDBCStore store) ReturnBoolean.FALSEif this mapping does not customize the delete process,Boolean.TRUEif it does, or null if it does customize the delete, but also relies on the standard delete method being called.isCustomInsert(OpenJPAStateManager sm, JDBCStore store) ReturnBoolean.FALSEif this mapping does not customize the insert process,Boolean.TRUEif it does, or null if it does customize the insert, but also relies on the standard insert method being called.isCustomUpdate(OpenJPAStateManager sm, JDBCStore store) ReturnBoolean.FALSEif this mapping does not customize the update process,Boolean.TRUEif it does, or null if it does customize the update, but also relies on the standard update method being called.voidmap(boolean adapt) Map the owning mapping using this strategy.voidupdate(OpenJPAStateManager sm, JDBCStore store, RowManager rm) Set values for the mapping into the proper rows.
- 
Constructor Details- 
AbstractStrategypublic AbstractStrategy()
 
- 
- 
Method Details- 
getAliasDescription copied from interface:StrategyReturn the alias of this strategy. For custom strategies, return the full class name.
- 
mappublic void map(boolean adapt) Description copied from interface:StrategyMap the owning mapping using this strategy.
- 
initializepublic void initialize()Description copied from interface:StrategyPerform caching and other initialization operations. This method is called afterStrategy.map(boolean), and after all related components have been mapped as well.- Specified by:
- initializein interface- Strategy
 
- 
insertDescription copied from interface:StrategySet values for the mapping into the proper rows. For class mappings, this method will be called only after the corresponding method has been called for all fields of this mapping.- Specified by:
- insertin interface- Strategy
- Throws:
- SQLException
 
- 
updateDescription copied from interface:StrategySet values for the mapping into the proper rows.- Specified by:
- updatein interface- Strategy
- Throws:
- SQLException
- See Also:
 
- 
deleteDescription copied from interface:StrategySet the where values appropriately to delete the proper instance, and set all relations on non-secondary tables as updates. This allows foreign key analysis.- Specified by:
- deletein interface- Strategy
- Throws:
- SQLException
- See Also:
 
- 
isCustomInsertDescription copied from interface:StrategyReturnBoolean.FALSEif this mapping does not customize the insert process,Boolean.TRUEif it does, or null if it does customize the insert, but also relies on the standard insert method being called. Implement theStrategy.customInsert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore)method to implement the custom insertion behavior.- Specified by:
- isCustomInsertin interface- Strategy
 
- 
isCustomUpdateDescription copied from interface:StrategyReturnBoolean.FALSEif this mapping does not customize the update process,Boolean.TRUEif it does, or null if it does customize the update, but also relies on the standard update method being called. Implement theStrategy.customUpdate(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore)method to override the default update behavior.- Specified by:
- isCustomUpdatein interface- Strategy
 
- 
isCustomDeleteDescription copied from interface:StrategyReturnBoolean.FALSEif this mapping does not customize the delete process,Boolean.TRUEif it does, or null if it does customize the delete, but also relies on the standard delete method being called. Implement theStrategy.customDelete(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore)method to override the default deletion behavior.- Specified by:
- isCustomDeletein interface- Strategy
 
- 
customInsertDescription copied from interface:StrategyOverride this method to customize flushing this mapping. For classes, this method must also flush all fields. For fields, this method is called after the owning object is inserted, so if this field is in a row with other fields, that row will already exist.- Specified by:
- customInsertin interface- Strategy
- Throws:
- SQLException
 
- 
customUpdateDescription copied from interface:StrategyOverride this method to customize flushing this mapping. For classes, this method must also flush all fields.- Specified by:
- customUpdatein interface- Strategy
- Throws:
- SQLException
 
- 
customDeleteDescription copied from interface:StrategyOverride this method to customize flushing this mapping. For classes, this method must also flush all fields. For fields, this method will be called after the owning object is deleted.- Specified by:
- customDeletein interface- Strategy
- Throws:
- SQLException
 
 
-