db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1244895 - in /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base: newModifiedFields.vm newModifiedMethods.vm
Date Thu, 16 Feb 2012 09:01:42 GMT
Author: tfischer
Date: Thu Feb 16 09:01:42 2012
New Revision: 1244895

URL: http://svn.apache.org/viewvc?rev=1244895&view=rev
Log:
honor trackNew and trackModified options

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm?rev=1244895&r1=1244894&r2=1244895&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
Thu Feb 16 09:01:42 2012
@@ -22,11 +22,16 @@
 ## Creates the isNew and modified fields.
 ## This template expects as input a "table" element from the torque schema.
 ##
+#if ($torqueGen.booleanOption("torque.om.trackModified"))
     /** Whether this object was modified after loading or after last save. */
     private boolean modified = true;
 
+#end
+#if ($torqueGen.booleanOption("torque.om.trackNew"))
     /** 
      * Whether this object was loaded from the database or already saved 
      * (false) or whether it is not yet in the database(true).
      */
     private boolean isNew = true;
+
+#end
\ No newline at end of file

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm?rev=1244895&r1=1244894&r2=1244895&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
Thu Feb 16 09:01:42 2012
@@ -22,6 +22,7 @@
 ## Creates the getters and setters for the isNew and modified fields.
 ## This template expects as input a "table" element from the torque schema.
 ##
+#if ($torqueGen.booleanOption("torque.om.trackNew"))
     /**
      * Returns whether the object has ever been saved.  This will
      * be false, if the object was retrieved from storage or was created
@@ -44,6 +45,8 @@
         this.isNew = isNew;
     }
 
+#end
+#if ($torqueGen.booleanOption("torque.om.trackModified"))
     /**
      * Returns whether the object has been modified.
      *
@@ -72,4 +75,4 @@
         modified = false;
     }
 
-
+#end



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