mirror of https://github.com/apache/openjpa.git
OPENJPA-697: Implement newly added getJavaType(int i) abstarct method to save derivations unaware of multi-column versioning support from compiler error
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@689219 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
42f2f394fb
commit
62c0cba64b
|
@ -66,8 +66,11 @@ public abstract class ColumnVersionStrategy
|
|||
* column index uses. Only used if the version strategy employs more than
|
||||
* one column.
|
||||
*/
|
||||
protected abstract int getJavaType(int i);
|
||||
|
||||
protected int getJavaType(int i) {
|
||||
throw new AbstractMethodError(
|
||||
_loc.get("multi-column-version-unsupported",getAlias()).toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the next version given the current one, which may be null.
|
||||
*/
|
||||
|
|
|
@ -60,10 +60,6 @@ public class NumberVersionStrategy
|
|||
return JavaTypes.INT;
|
||||
}
|
||||
|
||||
protected int getJavaType(int i) {
|
||||
throw new InternalException("multi-column-version-not-supported");
|
||||
}
|
||||
|
||||
protected Object nextVersion(Object version) {
|
||||
if (version == null)
|
||||
return _initial;
|
||||
|
|
|
@ -45,10 +45,6 @@ public class TimestampVersionStrategy
|
|||
return JavaSQLTypes.TIMESTAMP;
|
||||
}
|
||||
|
||||
protected int getJavaType(int i) {
|
||||
throw new InternalException("multi-column-version-not-supported");
|
||||
}
|
||||
|
||||
protected Object nextVersion(Object version) {
|
||||
return new Timestamp(System.currentTimeMillis());
|
||||
}
|
||||
|
|
|
@ -137,3 +137,6 @@ unmapped-datastore-value: Instances of type "{0}" are not valid query \
|
|||
cache-hit: SQL Cache hit with key: {0} in {1}
|
||||
cache-missed: SQL Cache missed with key: {0} in {1}
|
||||
cant-set-value: Field "{1}" of "{0}" can not be set to "{2}" value.
|
||||
multi-column-version-unsupported:You have specified more than one column for \
|
||||
version data, but the "{1}" version strategy does not support multi-column \
|
||||
versioning.
|
Loading…
Reference in New Issue