db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1337015 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/
Date Fri, 11 May 2012 03:09:59 GMT
Author: tfischer
Date: Fri May 11 03:09:59 2012
New Revision: 1337015

URL: http://svn.apache.org/viewvc?rev=1337015&view=rev
Log:
- Record mappers must be Serializable in order to be useable in LargeSelect
- use final for nonmodifiable fields

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/BigDecimalMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/CompositeMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/DateMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/IntegerMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/LongMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/ObjectListMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/RecordMapper.java
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/StringMapper.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/BigDecimalMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/BigDecimalMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/BigDecimalMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/BigDecimalMapper.java
Fri May 11 03:09:59 2012
@@ -32,8 +32,11 @@ import org.apache.torque.TorqueException
  */
 public class BigDecimalMapper implements RecordMapper<BigDecimal>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
     /** The internal offset for the mapper. */
-    private int internalOffset;
+    private final int internalOffset;
 
     /**
      * Constructs a BigDecimalMapper with an offset of 0.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/CompositeMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/CompositeMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/CompositeMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/CompositeMapper.java
Fri May 11 03:09:59 2012
@@ -32,11 +32,14 @@ import org.apache.torque.TorqueException
  */
 public class CompositeMapper implements RecordMapper<List<Object>>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
     /**
      * All mappers which should be appliead to a result set, combined with
      * their individual offset.
      */
-    private List<MapperWithOffset> mapperList
+    private final List<MapperWithOffset> mapperList
         = new ArrayList<MapperWithOffset>();
 
     /**
@@ -77,10 +80,10 @@ public class CompositeMapper implements 
     private static class MapperWithOffset
     {
         /** The row mapper. */
-        private RecordMapper<?> mapper;
+        private final RecordMapper<?> mapper;
 
         /** The offset. */
-        private int offset;
+        private final int offset;
 
         /**
          * Constructor.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/DateMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/DateMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/DateMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/DateMapper.java
Fri May 11 03:09:59 2012
@@ -32,8 +32,11 @@ import org.apache.torque.TorqueException
  */
 public class DateMapper implements RecordMapper<Date>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
   /** The internal offset for the mapper. */
-  private int internalOffset;
+  private final int internalOffset;
 
   /**
    * Constructs a DateMapper with an offset of 0.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/IntegerMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/IntegerMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/IntegerMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/IntegerMapper.java
Fri May 11 03:09:59 2012
@@ -31,8 +31,11 @@ import org.apache.torque.TorqueException
  */
 public class IntegerMapper implements RecordMapper<Integer>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
     /** The internal offset for the mapper. */
-    private int internalOffset;
+    private final int internalOffset;
 
     /**
      * Constructs a IntegerMapper with an offset of 0.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/LongMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/LongMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/LongMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/LongMapper.java
Fri May 11 03:09:59 2012
@@ -31,8 +31,11 @@ import org.apache.torque.TorqueException
  */
 public class LongMapper implements RecordMapper<Long>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
     /** The internal offset for the mapper. */
-    private int internalOffset;
+    private final int internalOffset;
 
     /**
      * Constructs a LongMapper with an offset of 0.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/ObjectListMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/ObjectListMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/ObjectListMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/ObjectListMapper.java
Fri May 11 03:09:59 2012
@@ -46,6 +46,9 @@ import org.apache.torque.TorqueException
  */
 public class ObjectListMapper implements RecordMapper<List<Object>>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
     /**
      * Contains the classes to which the columns are mapped.
      * The size of the list determines how many columns are read.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/RecordMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/RecordMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/RecordMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/RecordMapper.java
Fri May 11 03:09:59 2012
@@ -19,6 +19,7 @@ package org.apache.torque.om.mapper;
  * under the License.
  */
 
+import java.io.Serializable;
 import java.sql.ResultSet;
 
 import org.apache.torque.TorqueException;
@@ -33,7 +34,7 @@ import org.apache.torque.TorqueException
  *
  * @version $Id$
  */
-public interface RecordMapper<T>
+public interface RecordMapper<T> extends Serializable
 {
     /**
      * Constructs the object from the current row in the resultSet.

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/StringMapper.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/StringMapper.java?rev=1337015&r1=1337014&r2=1337015&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/StringMapper.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/mapper/StringMapper.java
Fri May 11 03:09:59 2012
@@ -31,8 +31,11 @@ import org.apache.torque.TorqueException
  */
 public class StringMapper implements RecordMapper<String>
 {
+    /** Serial Version UID. */
+    private static final long serialVersionUID = 1L;
+
     /** The internal offset for the mapper. */
-    private int internalOffset;
+    private final int internalOffset;
 
     /**
      * Constructs a StringMapper with an offset of 0.



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


Mime
View raw message