Class TimestampVersionStrategy
- java.lang.Object
-
- org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
-
- org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
-
- org.apache.openjpa.jdbc.meta.strats.ColumnVersionStrategy
-
- org.apache.openjpa.jdbc.meta.strats.TimestampVersionStrategy
-
- All Implemented Interfaces:
Serializable,Strategy,VersionStrategy
- Direct Known Subclasses:
NanoPrecisionTimestampVersionStrategy
public class TimestampVersionStrategy extends ColumnVersionStrategy
Uses a timestamp for optimistic versioning.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringALIAS-
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
vers
-
-
Constructor Summary
Constructors Constructor Description TimestampVersionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAlias()Return the alias of this strategy.MapgetBulkUpdateValues()protected intgetJavaType()Return the code fromJavaTypesfor the version values this strategy uses.protected ObjectnextVersion(Object version)Return the next version given the current one, which may be null.-
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.ColumnVersionStrategy
checkVersion, compare, compare, compareVersion, delete, getJavaType, insert, load, load, map, select, update
-
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
afterLoad, setVersion
-
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
customDelete, customInsert, customUpdate, initialize, isCustomDelete, isCustomInsert, isCustomUpdate
-
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, initialize, isCustomDelete, isCustomInsert, isCustomUpdate
-
-
-
-
Field Detail
-
ALIAS
public static final String ALIAS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAlias
public String getAlias()
Description copied from interface:StrategyReturn the alias of this strategy. For custom strategies, return the full class name.- Specified by:
getAliasin interfaceStrategy- Overrides:
getAliasin classAbstractStrategy
-
getJavaType
protected int getJavaType()
Description copied from class:ColumnVersionStrategyReturn the code fromJavaTypesfor the version values this strategy uses. This method is only used during mapping installation.- Specified by:
getJavaTypein classColumnVersionStrategy
-
nextVersion
protected Object nextVersion(Object version)
Description copied from class:ColumnVersionStrategyReturn the next version given the current one, which may be null.- Specified by:
nextVersionin classColumnVersionStrategy
-
getBulkUpdateValues
public Map getBulkUpdateValues()
- Specified by:
getBulkUpdateValuesin interfaceVersionStrategy- Overrides:
getBulkUpdateValuesin classAbstractVersionStrategy- Returns:
- a Map
specifying how to update each version column during a bulk update.
-
-