|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.NumberVersionStrategy org.apache.openjpa.jdbc.meta.strats.MultiColumnVersionStrategy
public class MultiColumnVersionStrategy
Uses multiple version numbers spanning multiple columns for optimistic versioning.
Field Summary | |
---|---|
static String |
ALIAS
|
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy |
---|
vers |
Constructor Summary | |
---|---|
MultiColumnVersionStrategy()
|
Method Summary | |
---|---|
String |
getAlias()
Return the alias of this strategy. |
Number[] |
getInitialValues()
Return the initial values for version columns. |
protected int |
getJavaType()
Return the code from JavaTypes for the version values this
strategy uses. |
protected int |
getJavaType(int i)
Return the code from JavaTypes for the version value this given
column index uses. |
void |
initialize()
Perform caching and other initialization operations. |
(package private) Number |
nextValue(Object number,
int javaTypeCode)
|
protected Object |
nextVersion(Object version)
Return the next version given the current one, which may be null. |
void |
setInitialValues(Number[] initial)
Set the initial value for version columns. |
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.NumberVersionStrategy |
---|
getBulkUpdateValues, getInitialValue, setInitialValue |
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.ColumnVersionStrategy |
---|
checkVersion, compare, compare, compareVersion, delete, getColumnValue, insert, isSecondaryColumn, load, map, populateFromResult, 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, 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, isCustomDelete, isCustomInsert, isCustomUpdate |
Field Detail |
---|
public static final String ALIAS
Constructor Detail |
---|
public MultiColumnVersionStrategy()
Method Detail |
---|
public void initialize()
Strategy
Strategy.map(boolean)
, and after all related components have been
mapped as well.
initialize
in interface Strategy
initialize
in class AbstractStrategy
public void setInitialValues(Number[] initial)
public Number[] getInitialValues()
public String getAlias()
Strategy
getAlias
in interface Strategy
getAlias
in class NumberVersionStrategy
protected int getJavaType()
ColumnVersionStrategy
JavaTypes
for the version values this
strategy uses. This method is only used during mapping installation.
getJavaType
in class NumberVersionStrategy
protected int getJavaType(int i)
ColumnVersionStrategy
JavaTypes
for the version value this given
column index uses. Only used if the version strategy employs more than
one column.
getJavaType
in class ColumnVersionStrategy
protected Object nextVersion(Object version)
ColumnVersionStrategy
nextVersion
in class NumberVersionStrategy
Number nextValue(Object number, int javaTypeCode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |