db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mka...@apache.org
Subject svn commit: r411874 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypes.java
Date Mon, 05 Jun 2006 17:58:38 GMT
Author: mkalen
Date: Mon Jun  5 10:58:38 2006
New Revision: 411874

URL: http://svn.apache.org/viewvc?rev=411874&view=rev
Log:
JDK5.0 downgrade (http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(long)).
serialVersionUid on inner classes.

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypes.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypes.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypes.java?rev=411874&r1=411873&r2=411874&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypes.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcTypes.java
Mon Jun  5 10:58:38 2006
@@ -162,7 +162,9 @@
 
     public static final class T_Char extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(Long identifier)
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(Long identifier)
         {
             return identifier.toString();
         }
@@ -195,7 +197,9 @@
 
     public static final class T_Varchar extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(Long identifier)
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(Long identifier)
         {
             return identifier.toString();
         }
@@ -228,7 +232,9 @@
 
     public static final class T_LongVarChar extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(Long identifier)
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(Long identifier)
         {
             return identifier.toString();
         }
@@ -261,9 +267,11 @@
 
     public static final class T_Numeric extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
-            return new BigDecimal(identifier.longValue());
+            return BigDecimal.valueOf(identifier.longValue());
         }
 
 //        Object readValueFromStatement(CallableStatement stmt, String columnName) throws
SQLException
@@ -294,9 +302,11 @@
 
     public static final class T_Decimal extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(Long identifier)
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(Long identifier)
         {
-            return new BigDecimal(identifier.longValue());
+        	return BigDecimal.valueOf(identifier.longValue());
         }
 
 //        Object readValueFromStatement(CallableStatement stmt, String columnName) throws
SQLException
@@ -327,7 +337,9 @@
 
     public static final class T_Bit extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'BIT'");
         }
@@ -366,7 +378,9 @@
 
     public static final class T_Boolean extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(final Long identifier) throws SequenceManagerException
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(final Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'BOOLEAN'");
         }
@@ -404,7 +418,9 @@
 
     public static final class T_TinyInt extends JdbcTypes.BaseType
     {
-        public Object sequenceKeyConversion(final Long identifier)
+		private static final long serialVersionUID = 1L;
+
+		public Object sequenceKeyConversion(final Long identifier)
         {
             return new Byte(identifier.byteValue());
         }
@@ -441,6 +457,8 @@
 
     public static final class T_SmallInt extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+		
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Short(identifier.shortValue());
@@ -478,6 +496,8 @@
 
     public static final class T_Integer extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Integer(identifier.intValue());
@@ -515,6 +535,8 @@
 
     public static final class T_BigInt extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return identifier;
@@ -552,6 +574,8 @@
 
     public static final class T_Real extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Float(identifier.floatValue());
@@ -589,6 +613,8 @@
 
     public static final class T_Float extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Double(identifier.doubleValue());
@@ -626,6 +652,8 @@
 
     public static final class T_Double extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Double(identifier.doubleValue());
@@ -663,6 +691,8 @@
 
     public static final class T_Binary extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return identifier.toString().getBytes();
@@ -696,6 +726,8 @@
 
     public static final class T_VarBinary extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return identifier.toString().getBytes();
@@ -729,7 +761,8 @@
 
     public static final class T_LongVarBinary extends JdbcTypes.BaseType
     {
-        protected static final int BUFSZ = 2048;
+		private static final long serialVersionUID = 1L;
+        private static final int BUFSZ = 2048;
 
         /**
          * Retrieve LONGVARBINARY InputStream data and pack into a byte array.
@@ -811,6 +844,8 @@
 
     public static final class T_Date extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Date(identifier.longValue());
@@ -844,6 +879,8 @@
 
     public static final class T_Time extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Time(identifier.longValue());
@@ -877,6 +914,8 @@
 
     public static final class T_Timestamp extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier)
         {
             return new Timestamp(identifier.longValue());
@@ -910,6 +949,8 @@
 
     public static final class T_Clob extends JdbcTypes.BaseType
     {
+		private static final long serialVersionUID = 1L;
+
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'CLOB'");
@@ -947,7 +988,8 @@
 
     public static final class T_ClobToString extends JdbcTypes.BaseType
     {
-        protected static final int BUFSZ = 32768;
+		private static final long serialVersionUID = 1L;
+        private static final int BUFSZ = 32768;
 
         /**
          * Convert CLOB to String. Safe for very large objects.
@@ -1024,6 +1066,8 @@
 
     public static final class T_Blob extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'BLOB'");
@@ -1061,6 +1105,8 @@
 
     public static final class T_BlobToByteArray extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'BLOB'");
@@ -1103,6 +1149,8 @@
 
     public static final class T_Array extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'ARRAY'");
@@ -1136,6 +1184,8 @@
 
     public static final class T_Struct extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'STRUCT'");
@@ -1169,6 +1219,8 @@
 
     public static final class T_Ref extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'REF'");
@@ -1202,6 +1254,8 @@
 
     public static final class T_JavaObject extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'JAVA_OBJECT'");
@@ -1237,6 +1291,8 @@
 
     public static final class T_Datalink extends JdbcTypes.BaseType
     {
+    	private static final long serialVersionUID = 1L;
+    	
         public Object sequenceKeyConversion(Long identifier) throws SequenceManagerException
         {
             throw new SequenceManagerException("Not supported sequence key type 'DATALINK'");



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message