Kodo 4.2.0. generated on July 28 2008

kodo.jdbc.meta.strats
Class LockGroupNumberVersionStrategy

java.lang.Object
  extended by org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
      extended by org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
          extended by kodo.jdbc.meta.strats.ColumnPerLockGroupVersionStrategy
              extended by kodo.jdbc.meta.strats.LockGroupNumberVersionStrategy
All Implemented Interfaces:
Serializable, Strategy, VersionStrategy

public class LockGroupNumberVersionStrategy
extends ColumnPerLockGroupVersionStrategy

Uses a version number for optimistic versioning.

See Also:
Serialized Form

Field Summary
static String ALIAS
           
 
Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
vers
 
Constructor Summary
LockGroupNumberVersionStrategy()
           
 
Method Summary
 String getAlias()
           
 int getInitialValue()
          Return the initial value for version column.
protected  int getJavaType()
          Return the code from JavaTypes for the version values this strategy uses.
protected  Object nextVersion(Object version)
          Return the next version given the current one, which may be null.
 void setInitialValue(int initial)
          Set the initial value for version column.
 
Methods inherited from class kodo.jdbc.meta.strats.ColumnPerLockGroupVersionStrategy
checkVersion, compare, compareVersion, delete, insert, load, map, select, update
 
Methods inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
afterLoad, getBulkUpdateValues, 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
Constructor Detail

LockGroupNumberVersionStrategy

public LockGroupNumberVersionStrategy()
Method Detail

setInitialValue

public void setInitialValue(int initial)
Set the initial value for version column. Defaults to 1.


getInitialValue

public int getInitialValue()
Return the initial value for version column. Defaults to 1.


getAlias

public String getAlias()
Specified by:
getAlias in interface Strategy
Overrides:
getAlias in class AbstractStrategy

getJavaType

protected int getJavaType()
Description copied from class: ColumnPerLockGroupVersionStrategy
Return the code from JavaTypes for the version values this strategy uses. This method is only used during mapping installation.

Specified by:
getJavaType in class ColumnPerLockGroupVersionStrategy

nextVersion

protected Object nextVersion(Object version)
Description copied from class: ColumnPerLockGroupVersionStrategy
Return the next version given the current one, which may be null.

Specified by:
nextVersion in class ColumnPerLockGroupVersionStrategy

Kodo 4.2.0. generated on July 28 2008

Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.