db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r440958 - in /db/torque: generator/trunk/src/java/org/apache/torque/task/ templates/trunk/src/templates/om/
Date Thu, 07 Sep 2006 03:10:03 GMT
Author: tv
Date: Wed Sep  6 20:10:01 2006
New Revision: 440958

URL: http://svn.apache.org/viewvc?view=rev&rev=440958
Log:
Add serialVersionUIDs if ...addTimeStamp is true

Modified:
    db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueDataModelTask.java
    db/torque/templates/trunk/src/templates/om/BaseManager.vm
    db/torque/templates/trunk/src/templates/om/ExtensionManager.vm
    db/torque/templates/trunk/src/templates/om/ExtensionObject.vm
    db/torque/templates/trunk/src/templates/om/ExtensionPeer.vm
    db/torque/templates/trunk/src/templates/om/MultiExtendObject.vm
    db/torque/templates/trunk/src/templates/om/Object.vm
    db/torque/templates/trunk/src/templates/om/ObjectWithManager.vm
    db/torque/templates/trunk/src/templates/om/Peer.vm

Modified: db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueDataModelTask.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueDataModelTask.java?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueDataModelTask.java (original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueDataModelTask.java Wed
Sep  6 20:10:01 2006
@@ -17,22 +17,19 @@
  */
 
 import java.io.File;
-
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
-
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
 import org.apache.tools.ant.types.FileSet;
-
 import org.apache.torque.engine.EngineException;
 import org.apache.torque.engine.database.model.Database;
 import org.apache.torque.engine.database.transform.XmlToAppData;
-
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.context.Context;
 import org.apache.velocity.texen.ant.TexenTask;
@@ -285,8 +282,19 @@
         context.put("databaseNames", databaseNames);
         context.put("targetDatabase", targetDatabase);
         context.put("targetPackage", targetPackage);
-
+        
         return context;
+    }
+
+    /**
+     * Change type of "now" to java.util.Date
+     * 
+     * @see org.apache.velocity.texen.ant.TexenTask#populateInitialContext(org.apache.velocity.context.Context)
+     */
+    protected void populateInitialContext(Context context) throws Exception
+    {
+        super.populateInitialContext(context);
+        context.put("now", new Date());
     }
 
     /**

Modified: db/torque/templates/trunk/src/templates/om/BaseManager.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/BaseManager.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/BaseManager.vm (original)
+++ db/torque/templates/trunk/src/templates/om/BaseManager.vm Wed Sep  6 20:10:01 2006
@@ -68,6 +68,11 @@
 public abstract class $basePrefix${interfaceName}Manager
     extends AbstractBaseManager
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
     /** The name of the manager */
     protected static final String MANAGED_CLASS = "${package}.${interfaceName}";
 

Modified: db/torque/templates/trunk/src/templates/om/ExtensionManager.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/ExtensionManager.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/ExtensionManager.vm (original)
+++ db/torque/templates/trunk/src/templates/om/ExtensionManager.vm Wed Sep  6 20:10:01 2006
@@ -43,6 +43,11 @@
 public class ${interfaceName}Manager
     extends ${packageBaseManager}.$basePrefix${interfaceName}Manager
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
     /**
      * Creates a new <code>${interfaceName}Manager</code> instance.
      *

Modified: db/torque/templates/trunk/src/templates/om/ExtensionObject.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/ExtensionObject.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/ExtensionObject.vm (original)
+++ db/torque/templates/trunk/src/templates/om/ExtensionObject.vm Wed Sep  6 20:10:01 2006
@@ -42,4 +42,9 @@
     extends ${packageBaseObject}.${basePrefix}${table.JavaName}
     implements Persistent$interface
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
 }

Modified: db/torque/templates/trunk/src/templates/om/ExtensionPeer.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/ExtensionPeer.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/ExtensionPeer.vm (original)
+++ db/torque/templates/trunk/src/templates/om/ExtensionPeer.vm Wed Sep  6 20:10:01 2006
@@ -31,4 +31,9 @@
 public class ${table.JavaName}Peer
     extends ${packageBasePeer}.$basePrefix${table.JavaName}Peer
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
 }

Modified: db/torque/templates/trunk/src/templates/om/MultiExtendObject.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/MultiExtendObject.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/MultiExtendObject.vm (original)
+++ db/torque/templates/trunk/src/templates/om/MultiExtendObject.vm Wed Sep  6 20:10:01 2006
@@ -32,6 +32,11 @@
  */
 public class $child.ClassName extends $parent
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
     public ${child.ClassName}()
     {
 #set ($col = $child.Column)

Modified: db/torque/templates/trunk/src/templates/om/Object.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/Object.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/Object.vm (original)
+++ db/torque/templates/trunk/src/templates/om/Object.vm Wed Sep  6 20:10:01 2006
@@ -90,6 +90,11 @@
     implements $retrievableInterface
 #end
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
     /** The Peer class */
     private static final ${table.JavaName}Peer peer =
         new ${table.JavaName}Peer();

Modified: db/torque/templates/trunk/src/templates/om/ObjectWithManager.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/ObjectWithManager.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/ObjectWithManager.vm (original)
+++ db/torque/templates/trunk/src/templates/om/ObjectWithManager.vm Wed Sep  6 20:10:01 2006
@@ -99,6 +99,11 @@
     implements $retrievableInterface
 #end
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
     /** The Peer class */
     private static final ${table.JavaName}Peer peer =
         new ${table.JavaName}Peer();

Modified: db/torque/templates/trunk/src/templates/om/Peer.vm
URL: http://svn.apache.org/viewvc/db/torque/templates/trunk/src/templates/om/Peer.vm?view=diff&rev=440958&r1=440957&r2=440958
==============================================================================
--- db/torque/templates/trunk/src/templates/om/Peer.vm (original)
+++ db/torque/templates/trunk/src/templates/om/Peer.vm Wed Sep  6 20:10:01 2006
@@ -66,6 +66,11 @@
 public abstract class $basePrefix${table.JavaName}Peer
     extends ${table.BasePeer}
 {
+#if ($addTimeStamp)
+    /** Serial version */
+    private static final long serialVersionUID = ${now.Time}L;
+
+#end
 #if (!$table.isAlias())
 
     /** the default database name for this class */



---------------------------------------------------------------------
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