openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r689219 - in /openjpa/trunk/openjpa-jdbc/src/main: java/org/apache/openjpa/jdbc/meta/strats/ resources/org/apache/openjpa/jdbc/meta/strats/
Date Tue, 26 Aug 2008 20:51:30 GMT
Author: ppoddar
Date: Tue Aug 26 13:51:30 2008
New Revision: 689219

URL: http://svn.apache.org/viewvc?rev=689219&view=rev
Log:
OPENJPA-697: Implement newly added getJavaType(int i) abstarct method to save derivations
unaware of multi-column versioning support from compiler error

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ColumnVersionStrategy.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/NumberVersionStrategy.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/TimestampVersionStrategy.java
    openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ColumnVersionStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ColumnVersionStrategy.java?rev=689219&r1=689218&r2=689219&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ColumnVersionStrategy.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ColumnVersionStrategy.java
Tue Aug 26 13:51:30 2008
@@ -66,8 +66,11 @@
      * 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.
      */

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/NumberVersionStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/NumberVersionStrategy.java?rev=689219&r1=689218&r2=689219&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/NumberVersionStrategy.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/NumberVersionStrategy.java
Tue Aug 26 13:51:30 2008
@@ -60,10 +60,6 @@
         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;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/TimestampVersionStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/TimestampVersionStrategy.java?rev=689219&r1=689218&r2=689219&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/TimestampVersionStrategy.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/TimestampVersionStrategy.java
Tue Aug 26 13:51:30 2008
@@ -45,10 +45,6 @@
         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());
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties?rev=689219&r1=689218&r2=689219&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/strats/localizer.properties
Tue Aug 26 13:51:30 2008
@@ -137,3 +137,6 @@
 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.
\ No newline at end of file



Mime
View raw message