kodo.jdbc.meta.strats
Class LockGroupStateComparisonVersionStrategy
java.lang.Object
org.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
kodo.jdbc.meta.strats.LockGroupStateComparisonVersionStrategy
- All Implemented Interfaces:
- Serializable, Strategy, VersionStrategy
public class LockGroupStateComparisonVersionStrategy
- extends AbstractVersionStrategy
Uses a state image to determine whether concurrency violations take
place.
- See Also:
- Serialized Form
Method Summary |
void |
afterLoad(OpenJPAStateManager sm,
JDBCStore store)
|
boolean |
checkVersion(OpenJPAStateManager sm,
JDBCStore store,
boolean updateVersion)
|
int |
compareVersion(Object v1,
Object v2)
|
void |
customInsert(OpenJPAStateManager sm,
JDBCStore store)
This method is for class mappings that take over the insert
process, but still want to use this indicator for optimistic locking. |
LockGroupStateComparisonVersionStrategy.CustomUpdate |
customUpdate(OpenJPAStateManager sm,
JDBCStore store,
Table table,
boolean record)
This method is for class mappings that take over the update
process, but still want to use this indicator for optimistic locking. |
String |
getAlias()
|
void |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
|
void |
map(boolean adapt)
|
void |
update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALIAS
public static final String ALIAS
- See Also:
- Constant Field Values
LockGroupStateComparisonVersionStrategy
public LockGroupStateComparisonVersionStrategy()
getAlias
public String getAlias()
- Specified by:
getAlias
in interface Strategy
- Overrides:
getAlias
in class AbstractStrategy
map
public void map(boolean adapt)
- Specified by:
map
in interface Strategy
- Overrides:
map
in class AbstractStrategy
insert
public void insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
throws SQLException
- Specified by:
insert
in interface Strategy
- Overrides:
insert
in class AbstractStrategy
- Throws:
SQLException
customInsert
public void customInsert(OpenJPAStateManager sm,
JDBCStore store)
throws SQLException
- This method is for class mappings that take over the insert
process, but still want to use this indicator for optimistic locking.
- Specified by:
customInsert
in interface Strategy
- Overrides:
customInsert
in class AbstractStrategy
- Throws:
SQLException
update
public void update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
throws SQLException
- Specified by:
update
in interface Strategy
- Overrides:
update
in class AbstractStrategy
- Throws:
SQLException
customUpdate
public LockGroupStateComparisonVersionStrategy.CustomUpdate customUpdate(OpenJPAStateManager sm,
JDBCStore store,
Table table,
boolean record)
throws SQLException
- This method is for class mappings that take over the update
process, but still want to use this indicator for optimistic locking.
- Parameters:
sm
- the instance to teststore
- store manager contexttable
- only state image values in this table will be tested;
if the custom mapping uses different updates for
different tables, this method can be called multiple
times for the multiple tablesrecord
- set this parameter to true the last time you call
this method, so the indicator can setup the next
version of the given state manager
- Returns:
- a
LockGroupStateComparisonVersionStrategy.CustomUpdate
whose getSQL method yields a
boolean SQL expression that tests whether the current
record is equal to our recorded state image, and whose
setParameters method parameterizes the given prepared
statement with the values used in the above boolean
expression
- Throws:
SQLException
afterLoad
public void afterLoad(OpenJPAStateManager sm,
JDBCStore store)
- Specified by:
afterLoad
in interface VersionStrategy
- Overrides:
afterLoad
in class AbstractVersionStrategy
checkVersion
public boolean checkVersion(OpenJPAStateManager sm,
JDBCStore store,
boolean updateVersion)
throws SQLException
- Specified by:
checkVersion
in interface VersionStrategy
- Overrides:
checkVersion
in class AbstractVersionStrategy
- Throws:
SQLException
compareVersion
public int compareVersion(Object v1,
Object v2)
- Specified by:
compareVersion
in interface VersionStrategy
- Overrides:
compareVersion
in class AbstractVersionStrategy
Copyright 2011 Oracle, Inc. All Rights Reserved.This documentation is deprecated and will be removed in the next release of WebLogic Server.
Oracle Fusion Middleware Oracle Kodo 4.2.0 API Reference (DEPRECATED)
12c Release 1 (12.1.1)
Part Number E24400_01