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:
Serializable
,Strategy
,VersionStrategy
Version strategy that delegates to the suerpclass version.
- Author:
- Abe White
- See Also:
-
Field Summary
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
vers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterLoad
(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.boolean
checkVersion
(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) Checks the version of the given state manager with the version stored in memory.int
compareVersion
(Object v1, Object v2) 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
-
Constructor Details
-
SuperclassVersionStrategy
public SuperclassVersionStrategy()
-
-
Method Details
-
afterLoad
Description copied from interface:VersionStrategy
This method is called after data is loaded into the instance, in case the version indicator works off of a state image.- Specified by:
afterLoad
in interfaceVersionStrategy
- Overrides:
afterLoad
in classAbstractVersionStrategy
-
checkVersion
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException Description copied from interface:VersionStrategy
Checks the version of the given state manager with the version stored in memory.- Specified by:
checkVersion
in interfaceVersionStrategy
- Overrides:
checkVersion
in classAbstractVersionStrategy
- Returns:
- true if the in-memory version was up-to-date, false otherwise
- Throws:
SQLException
-
compareVersion
- Specified by:
compareVersion
in interfaceVersionStrategy
- Overrides:
compareVersion
in classAbstractVersionStrategy
- See Also:
-
getBulkUpdateValues
- Specified by:
getBulkUpdateValues
in interfaceVersionStrategy
- Overrides:
getBulkUpdateValues
in classAbstractVersionStrategy
- Returns:
- a Map<Column,Object> specifying how to update each version column during a bulk update.
-