Class SuperclassVersionStrategy
- java.lang.Object
-
- org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
-
- org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
-
- org.apache.openjpa.jdbc.meta.strats.SuperclassVersionStrategy
-
- All Implemented Interfaces:
java.io.Serializable,Strategy,VersionStrategy
public class SuperclassVersionStrategy extends AbstractVersionStrategy
Version strategy that delegates to the suerpclass version.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
vers
-
-
Constructor Summary
Constructors Constructor Description SuperclassVersionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterLoad(OpenJPAStateManager sm, JDBCStore store)This method is called after data is loaded into the instance, in case the version indicator works off of a state image.booleancheckVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion)Checks the version of the given state manager with the version stored in memory.intcompareVersion(java.lang.Object v1, java.lang.Object v2)java.util.MapgetBulkUpdateValues()-
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
load, load, select, setVersion
-
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, update
-
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.Strategy
customDelete, customInsert, customUpdate, delete, getAlias, initialize, insert, isCustomDelete, isCustomInsert, isCustomUpdate, map, update
-
-
-
-
Method Detail
-
afterLoad
public void afterLoad(OpenJPAStateManager sm, JDBCStore store)
Description copied from interface:VersionStrategyThis method is called after data is loaded into the instance, in case the version indicator works off of a state image.- Specified by:
afterLoadin interfaceVersionStrategy- Overrides:
afterLoadin classAbstractVersionStrategy
-
checkVersion
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws java.sql.SQLException
Description copied from interface:VersionStrategyChecks the version of the given state manager with the version stored in memory.- Specified by:
checkVersionin interfaceVersionStrategy- Overrides:
checkVersionin classAbstractVersionStrategy- Returns:
- true if the in-memory version was up-to-date, false otherwise
- Throws:
java.sql.SQLException
-
compareVersion
public int compareVersion(java.lang.Object v1, java.lang.Object v2)- Specified by:
compareVersionin interfaceVersionStrategy- Overrides:
compareVersionin classAbstractVersionStrategy- See Also:
StoreManager.compareVersion(org.apache.openjpa.kernel.OpenJPAStateManager, java.lang.Object, java.lang.Object)
-
getBulkUpdateValues
public java.util.Map getBulkUpdateValues()
- Specified by:
getBulkUpdateValuesin interfaceVersionStrategy- Overrides:
getBulkUpdateValuesin classAbstractVersionStrategy- Returns:
- a Map
specifying how to update each version column during a bulk update.
-
-