|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.meta.strats.AbstractStrategy
org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy
org.apache.openjpa.jdbc.meta.strats.ColumnVersionStrategy
public abstract class ColumnVersionStrategy
Uses a single column and corresponding version object.
| Field Summary |
|---|
| Fields inherited from class org.apache.openjpa.jdbc.meta.strats.AbstractVersionStrategy |
|---|
vers |
| Constructor Summary | |
|---|---|
ColumnVersionStrategy()
|
|
| Method Summary | |
|---|---|
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 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. |
void |
insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
Set values for the mapping into the proper rows. |
void |
load(OpenJPAStateManager sm,
JDBCStore store,
Result res)
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. |
| 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, getAlias, 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, getAlias, initialize, isCustomDelete, isCustomInsert, isCustomUpdate |
| Constructor Detail |
|---|
public ColumnVersionStrategy()
| Method Detail |
|---|
protected abstract int getJavaType()
JavaTypes for the version values this
strategy uses. This method is only used during mapping installation.
protected abstract Object nextVersion(Object version)
protected int compare(Object v1,
Object v2)
Comparable.
Comparator.compare(T, T)public void map(boolean adapt)
Strategy
map 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 set
public void insert(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
throws SQLException
Strategy
insert in interface Strategyinsert in class AbstractStrategySQLException
public void update(OpenJPAStateManager sm,
JDBCStore store,
RowManager rm)
throws SQLException
Strategy
update 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
Strategy
delete 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)
VersionStrategy
select in interface VersionStrategyselect in class AbstractVersionStrategymapping - the known base class being selected; this may
not be the base class in the inheritance hierarchy
public void load(OpenJPAStateManager sm,
JDBCStore store,
Result res)
throws SQLException
VersionStrategy
load in interface VersionStrategyload in class AbstractVersionStrategySQLException
public boolean checkVersion(OpenJPAStateManager sm,
JDBCStore store,
boolean updateVersion)
throws SQLException
VersionStrategy
checkVersion in interface VersionStrategycheckVersion in class AbstractVersionStrategySQLException
public 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||