public abstract class ColumnVersionStrategy extends AbstractVersionStrategy
vers| Constructor and Description |
|---|
ColumnVersionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkVersion(OpenJPAStateManager sm,
JDBCStore store,
boolean updateVersion)
Checks the version of the given state manager with the version
stored in memory.
|
protected int |
compare(Object[] a1,
Object[] a2)
Compare each element of the given arrays that must be of equal size.
|
protected int |
compare(Object v1,
Object v2)
Compare the two versions.
|
int |
compareVersion(Object v1,
Object v2) |
void |
delete(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set the where values appropriately to delete the proper instance,
and set all relations on non-secondary tables as updates.
|
protected abstract 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 |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
Object |
load(OpenJPAStateManager sm,
JDBCStore store,
Result res)
Load data.
|
Object |
load(OpenJPAStateManager sm,
JDBCStore store,
Result res,
Joins joins)
Load data.
|
void |
map(boolean adapt)
Map the owning mapping using this strategy.
|
protected abstract Object |
nextVersion(Object version)
Return the next version given the current one, which may be null.
|
boolean |
select(Select sel,
ClassMapping mapping)
Select the data for this indicator.
|
void |
update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows.
|
afterLoad, getBulkUpdateValues, setVersioncustomDelete, customInsert, customUpdate, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomDelete, customInsert, customUpdate, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdateprotected abstract int getJavaType()
JavaTypes for the version values this
strategy uses. This method is only used during mapping installation.protected int getJavaType(int i)
JavaTypes for the version value this given
column index uses. Only used if the version strategy employs more than
one column.protected abstract Object nextVersion(Object version)
protected int compare(Object v1, Object v2)
Comparable.Comparator.compare(T, T)protected int compare(Object[] a1, Object[] a2)
public void map(boolean adapt)
Strategymap in interface Strategymap in class AbstractStrategyadapt - if true, use the owning mapping's raw mapping info
to set its ORM data; if false, ORM data will already be setpublic void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategyinsert in interface Strategyinsert in class AbstractStrategySQLExceptionpublic void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategyupdate in interface Strategyupdate in class AbstractStrategySQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)public void delete(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException
Strategydelete in interface Strategydelete in class AbstractStrategySQLExceptionStrategy.insert(org.apache.openjpa.kernel.OpenJPAStateManager, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.sql.RowManager)public boolean select(Select sel, ClassMapping mapping)
VersionStrategyselect in interface VersionStrategyselect in class AbstractVersionStrategymapping - the known base class being selected; this may
not be the base class in the inheritance hierarchypublic Object load(OpenJPAStateManager sm, JDBCStore store, Result res) throws SQLException
VersionStrategyload in interface VersionStrategyload in class AbstractVersionStrategySQLExceptionpublic Object load(OpenJPAStateManager sm, JDBCStore store, Result res, Joins joins) throws SQLException
VersionStrategyload in interface VersionStrategyload in class AbstractVersionStrategySQLExceptionpublic boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException
VersionStrategycheckVersion in interface VersionStrategycheckVersion in class AbstractVersionStrategySQLExceptionpublic int compareVersion(Object v1, Object v2)
compareVersion in interface VersionStrategycompareVersion in class AbstractVersionStrategyStoreManager.compareVersion(org.apache.openjpa.kernel.OpenJPAStateManager, java.lang.Object, java.lang.Object)Copyright © 2006–2022 Apache Software Foundation. All rights reserved.