Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C35C5972A for ; Thu, 16 Feb 2012 09:02:03 +0000 (UTC) Received: (qmail 16835 invoked by uid 500); 16 Feb 2012 09:02:03 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 16816 invoked by uid 500); 16 Feb 2012 09:02:03 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 16807 invoked by uid 500); 16 Feb 2012 09:02:03 -0000 Received: (qmail 16804 invoked by uid 99); 16 Feb 2012 09:02:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 09:02:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 09:02:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CC174238890D; Thu, 16 Feb 2012 09:01:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: torque-commits@db.apache.org From: tfischer@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120216090142.CC174238890D@eris.apache.org> 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