Author: tfischer Date: Thu Sep 4 21:02:24 2014 New Revision: 1622563 URL: http://svn.apache.org/r1622563 Log: TORQUE-317 use torqueGen.booleanOption() where sensible
Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/baseBean.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/setterMethodEnd.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanImports.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanMethods.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/copyMethods.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencedObject.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/referencingObjectMethods.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/saveMethods.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeer.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeerForView.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doSelect.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/saveMethods.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/tableConstantInit.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerForViewImpl.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerImpl.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doDelete.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelect.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoin.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoinAllExcept.vm db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/baseBean.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/baseBean.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/baseBean.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/baseBean.vm Thu Sep 4 21:02:24 2014 @@ -125,7 +125,7 @@ $torqueGen.mergepoint("fieldDefinitionsR $torqueGen.mergepoint("gettersSetters") ## -#if ($complexObjectModel == "true") +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) $torqueGen.mergepoint("gettersSettersReferencedObjects") $torqueGen.mergepoint("gettersSettersReferencingObjects") #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/setterMethodEnd.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/setterMethodEnd.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/setterMethodEnd.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/bean/base/setterMethodEnd.vm Thu Sep 4 21:02:24 2014 @@ -24,7 +24,7 @@ ## The template expects as input a "column" element from the torque schema, ## which was processed by the OMTransformer. ## -#if ($complexObjectModel == "true") +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) ## ## set referenced object(s) to null if the id has changed ## Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm Thu Sep 4 21:02:24 2014 @@ -37,7 +37,7 @@ $torqueGen.mergepoint("classAnnotations" #end public abstract class $baseDbObjectClassName $extendsBaseClass implements ## -#if ($addSaveMethods == true && $saveMethodsInDbObjects == "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects == "true") Persistent, ## #end Serializable## @@ -50,13 +50,13 @@ $torqueGen.mergepoint("serialVersionUid" ## field definitions for columns $torqueGen.mergepoint("fieldDefinitions")## $torqueGen.mergepoint("newModifiedFields")## -#if ($trackSaving == "true") +#if ($torqueGen.booleanOption("torque.om.trackSaving")) $torqueGen.mergepoint("savingField")## #end -#if ($trackLoading == "true") +#if ($torqueGen.booleanOption("torque.om.trackLoading")) $torqueGen.mergepoint("loadingField")## #end -#if ($trackDeleted == "true") +#if ($torqueGen.booleanOption("torque.om.trackDeleted")) $torqueGen.mergepoint("deletedField")## #end ## @@ -73,13 +73,13 @@ $torqueGen.mergepoint("fieldDefinitionsR ## getters and setters for member variables for columns $torqueGen.mergepoint("gettersSetters") $torqueGen.mergepoint("newModifiedMethods") -#if ($trackSaving == "true") +#if ($torqueGen.booleanOption("torque.om.trackSaving")) $torqueGen.mergepoint("savingMethods") #end -#if ($trackLoading == "true") +#if ($torqueGen.booleanOption("torque.om.trackLoading")) $torqueGen.mergepoint("loadingMethods") #end -#if ($trackDeleted == "true") +#if ($torqueGen.booleanOption("torque.om.trackDeleted")) $torqueGen.mergepoint("deletedMethods") #end #if ($torqueGen.booleanOption("torque.om.complexObjectModel")) @@ -90,11 +90,11 @@ $torqueGen.mergepoint("gettersSettersRef $torqueGen.mergepoint("referencingObjectMethods") #end -#if ($addGetByNameMethods == "true") +#if ($torqueGen.booleanOption("torque.om.addGetByNameMethods")) $torqueGen.mergepoint("getByNameMethods") #end -#if ($addSaveMethods == true && $saveMethodsInDbObjects == "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects == "true") $torqueGen.mergepoint("saveMethods") #end @@ -107,7 +107,7 @@ $torqueGen.mergepoint("tableMapGetter") #if ($torqueGen.booleanOption("torque.om.generateBeans")) $torqueGen.mergepoint("objectBeanMethods") #end -#if (${useManagers} == "true") +#if ($torqueGen.booleanOption("torque.om.useManagers")) $torqueGen.mergepoint("isCacheOnSave") #end $torqueGen.mergepoint("getCurrentDate")## Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObjectForView.vm Thu Sep 4 21:02:24 2014 @@ -49,20 +49,20 @@ import org.apache.torque.om.ObjectKey; import org.apache.torque.om.SimpleKey; import org.apache.torque.om.StringKey; import org.apache.torque.om.BooleanKey; -#if ($addSaveMethods == true && $saveMethodsInDbObjects == "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects == "true") import org.apache.torque.om.Persistent; #end #if ($torqueGen.booleanOption("torque.om.addGetByNameMethods")) import org.apache.torque.om.ColumnAccessByName; #end## import $torqueGen.option("torque.om.criteriaClass"); -#if ($addSaveMethods == true && $saveMethodsInDbObjects == "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects == "true") import org.apache.torque.util.Transaction; #end import org.apache.commons.lang.ObjectUtils; -#if ($complexObjectModel) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) #foreach ($col in $table.Columns) #if ($col.isForeignKey()) #set ( $tblFK = $table.Database.getTable($col.RelatedTableName) ) @@ -89,11 +89,7 @@ $torqueGen.mergepoint("classJavadoc") #set ($extendsBaseClass = "extends $baseClass" ) #end public abstract class $baseDbObjectClassName $extendsBaseClass - implements ## -#if ($torqueGen.booleanOption("torque.om.save.addSaveMethodsInDbObjects")) -Persistent, ## -#end -Serializable## + implements Serializable## #if ($torqueGen.booleanOption("torque.om.addIntakeRetrievable")), $torqueGen.option("torque.om.retrievableInterface")#end## #if ($torqueGen.booleanOption("torque.om.addGetByNameMethods")), ColumnAccessByName#end## @@ -110,10 +106,10 @@ $torqueGen.mergepoint("loadingField")## ## getters and setters for member variables for columns $torqueGen.mergepoint("gettersSetters") $torqueGen.mergepoint("newModifiedMethods") -#if ($trackLoading == "true") +#if ($torqueGen.booleanOption("torque.om.trackLoading")) $torqueGen.mergepoint("loadingMethods") #end -#if ($addGetByNameMethods == "true") +#if ($torqueGen.booleanOption("torque.om.addGetByNameMethods")) $torqueGen.mergepoint("getByNameMethods") #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanImports.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanImports.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanImports.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanImports.vm Thu Sep 4 21:02:24 2014 @@ -27,7 +27,7 @@ import org.apache.commons.collections.map.IdentityMap; import java.util.Iterator; import ${beanPackage}.${beanClassName}; -#if ($complexObjectModel) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) ## own foreign keys ## #set ( $foreignKeyElements = $torqueGen.getChildren("foreign-key") ) @@ -39,7 +39,7 @@ import ${foreignBeanPackage}.${foreignBe #end ## referencing foreign keys ## - #if ($objectIsCaching) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) #set ( $referencingForeignKeyElements = $torqueGen.getChild("referencing-foreign-keys").getChildren("foreign-key") ) #foreach ($foreignKeyElement in $referencingForeignKeyElements) #set ( $foreignTableElement = $foreignKeyElement.getParent() ) Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanMethods.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanMethods.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanMethods.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/bean/objectBeanMethods.vm Thu Sep 4 21:02:24 2014 @@ -25,7 +25,7 @@ ## /** * Creates a $beanClassName with the contents of this object. -#if ($complexObjectModel == "true") +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) * This also creates beans for cached related objects, if they exist #end * @@ -64,9 +64,9 @@ result.${setter}(${getter}()); #end -#if ($complexObjectModel == "true") +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) ## foreign references to this Object - #if ($objectIsCaching == "true") + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) #foreach ($foreignKeyElement in $referencingForeignKeyElements) #set ( $foreignTableElement = $foreignKeyElement.getParent() ) #set ( $foreignTableName = $foreignTableElement.getAttribute("name") ) @@ -170,9 +170,9 @@ result.${setter}(bean.${getter}()); #end -#if ($complexObjectModel == "true") +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) ## foreign references to this Object - #if ($objectIsCaching == "true") + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) #foreach ($foreignKeyElement in $referencingForeignKeyElements) #set ( $foreignTableElement = $foreignKeyElement.getParent() ) #set ( $foreignTableName = $foreignTableElement.getAttribute("name") ) @@ -227,9 +227,9 @@ return result; } -#if ($complexObjectModel == "true") +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) ## foreign references to this Object - #if ($objectIsCaching == "true") + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) #foreach ($foreignKeyElement in $referencingForeignKeyElements) #set ( $foreignFieldElement = $foreignKeyElement.getChild("foreign-field") ) ## if the referencing table is in an external schema, Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/copyMethods.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/copyMethods.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/copyMethods.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/copyMethods.vm Thu Sep 4 21:02:24 2014 @@ -26,14 +26,14 @@ /** * Makes a copy of this object. * It creates a new object filling in the simple attributes. - #if (($complexObjectModel == "true") && ($objectIsCaching == "true")) + #if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) * It then fills all the association collections and sets the * related objects to isNew=true. #end */ public $dbObjectClassName copy() throws TorqueException { -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) return copy(true); #else $torqueGen.mergepoint("createObjectInstance") @@ -41,7 +41,7 @@ $torqueGen.mergepoint("createObjectInsta #end } -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) /** * Makes a copy of this object using a connection. * It creates a new object filling in the simple attributes. @@ -87,7 +87,7 @@ $torqueGen.mergepoint("createObjectInsta } #end -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) /** * Fills the copyObj with the contents of this object. * The associated objects are also copied and treated as new objects. @@ -114,17 +114,17 @@ $torqueGen.mergepoint("createObjectInsta /** * Fills the copyObj with the contents of this object. -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) * If deepcopy is true, The associated objects are also copied * and treated as new objects. * #end * @param copyObj the object to fill. -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) * @param deepcopy whether the associated objects should be copied. #end */ -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) protected $dbObjectClassName copyInto($dbObjectClassName copyObj, boolean deepcopy) throws TorqueException #else protected $dbObjectClassName copyInto($dbObjectClassName copyObj) throws TorqueException @@ -147,7 +147,7 @@ $torqueGen.mergepoint("createObjectInsta #end #end -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) #set ($foreignKeyElements = $torqueGen.getChild("referencing-foreign-keys").getChildren("foreign-key")) if (deepcopy) { @@ -164,7 +164,7 @@ $torqueGen.mergepoint("createObjectInsta #set ( $getter = $foreignFieldElement.getAttribute("getter")) #set ( $adder = $foreignFieldElement.getAttribute("adder")) #if ($foreignTableName != $name) - #if (($objectIsCaching == "true")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) ## field can be null if the generator property ## torque.silentDbFetch is set to false if ($columnField != null) @@ -189,7 +189,7 @@ $torqueGen.mergepoint("createObjectInsta } -#if (($complexObjectModel == "true") && ($objectIsCaching == "true")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) /** * Fills the copyObj with the contents of this object using connection. * If deepcopy is true, The associated objects are also copied Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencedObject.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencedObject.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencedObject.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencedObject.vm Thu Sep 4 21:02:24 2014 @@ -51,13 +51,13 @@ #set ( $conditional = "$conditional${and}!org.apache.commons.lang.ObjectUtils.equals(this.${localColumnField}, null)" ) #end #if ($arglist != "" ) - #if (${useManagers} == "true") + #if ($torqueGen.booleanOption("torque.om.useManagers")) #set ( $arglist = "${arglist}, SimpleKey.keyFor(this.$localColumnField)" ) #else #set ( $arglist = "${arglist}, this.$localColumnField" ) #end #else - #if (${useManagers} == "true") + #if ($torqueGen.booleanOption("torque.om.useManagers")) #set ( $arglist = "SimpleKey.keyFor(this.$localColumnField)" ) #else #set ( $arglist = "this.$localColumnField" ) @@ -86,14 +86,14 @@ if ($field == null$conditional) { #if ($argsize > 1) - #if (${useManagers} == "true") + #if ($torqueGen.booleanOption("torque.om.useManagers")) SimpleKey[] keys = { $arglist }; $field = ${foreignTableManagerClass}.getInstance(new ComboKey(keys)); #else $field = ${foreignTablePeerClass}.retrieveByPK($arglist); #end #else - #if (${useManagers} == "true") + #if ($torqueGen.booleanOption("torque.om.useManagers")) $field = ${foreignTableManagerClass}.getInstance($arglist); #else $field = ${foreignTablePeerClass}.retrieveByPK(SimpleKey.keyFor($arglist)); @@ -130,7 +130,7 @@ if ($field == null$conditional) { #if ($argsize > 1) - #if (${useManagers} == "true") + #if ($torqueGen.booleanOption("torque.om.useManagers")) SimpleKey[] keys = { $arglist }; ComboKey comboid = new ComboKey(keys); @@ -144,7 +144,7 @@ $field = ${foreignTablePeerClass}.retrieveByPK($arglist, connection); #end #else - #if (${useManagers} == "true") + #if ($torqueGen.booleanOption("torque.om.useManagers")) $field = ${foreignTableManagerClass}.getCachedInstance($arglist); if ($field == null) { Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm Thu Sep 4 21:02:24 2014 @@ -26,7 +26,6 @@ ## "referencing-foreign-keys/foreign-key" element ## #set ( $silentDbFetch = $torqueGen.booleanOption("torque.om.silentDbFetch") ) -#set ( $objectIsCaching = $torqueGen.booleanOption("torque.om.objectIsCaching") ) #set ( $foreignKeyElement = $torqueGen.getParent() ) #set ( $thisObjectClassName = $foreignKeyElement.getChild("table").getAttribute("baseDbObjectClassName") ) #set ( $otherTable = $foreignKeyElement.getParent() ) @@ -34,7 +33,7 @@ #set ( $otherTablePeerPackage = $otherTable.getAttribute("peerPackage") ) #set ( $otherTablePeerName = "${otherTablePeerPackage}.${otherTablePeerClass}" ) #set ( $referenceElements = $foreignKeyElement.getChildren("reference") ) -#if ( $objectIsCaching ) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) /** * The criteria used to select the current contents of $field */ @@ -42,7 +41,7 @@ #end /** -#if ( $objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) #if (!$silentDbFetch) * Returns the Collection. #else @@ -64,7 +63,7 @@ throws TorqueException #end { -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) #if (!$silentDbFetch) if (isNew()) { @@ -85,7 +84,7 @@ $torqueGen.mergepoint("backreference")## } /** -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this $thisObjectClassName has previously @@ -101,7 +100,7 @@ $torqueGen.mergepoint("backreference")## */ public $fieldType ${getter}(Criteria criteria) throws TorqueException { -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if ($field == null) { if (isNew()) @@ -138,7 +137,7 @@ $torqueGen.mergepoint("backreference")## #set ( $thisTableColumnGetter = $thisTableColumnElement.getAttribute("getter") ) criteria.and(${otherTablePeerName}.${otherTablePeerColumnName}, ${thisTableColumnGetter}()); #end -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if (${criteriaCacheField} == null || !${criteriaCacheField}.equals(criteria)) { @@ -156,7 +155,7 @@ $torqueGen.mergepoint("backreference")## } /** -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) * If this collection has already been initialized, returns * the collection. Otherwise returns the results of * ${getter}(new Criteria(),Connection) @@ -169,7 +168,7 @@ $torqueGen.mergepoint("backreference")## */ public $fieldType ${getter}(Connection con) throws TorqueException { -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if ($field == null) { $field = ${getter}(new Criteria(), con); @@ -183,7 +182,7 @@ $torqueGen.mergepoint("backreference")## } /** -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this $thisObjectClassName has previously @@ -202,7 +201,7 @@ $torqueGen.mergepoint("backreference")## public $fieldType ${getter}(Criteria criteria, Connection con) throws TorqueException { -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if ($field == null) { if (isNew()) @@ -239,7 +238,7 @@ $torqueGen.mergepoint("backreference")## #set ( $thisTableColumnGetter = $thisTableColumnElement.getAttribute("getter") ) criteria.and(${otherTablePeerName}.${otherTablePeerColumnName}, ${thisTableColumnGetter}()); #end -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if (${criteriaCacheField} == null || !${criteriaCacheField}.equals(criteria)) { Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/imports.vm Thu Sep 4 21:02:24 2014 @@ -48,20 +48,20 @@ import org.apache.torque.om.ObjectKey; import org.apache.torque.om.SimpleKey; import org.apache.torque.om.StringKey; import org.apache.torque.om.BooleanKey; -#if ($addSaveMethods == true && $saveMethodsInDbObjects == "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects == "true") import org.apache.torque.om.Persistent; #end #if ($torqueGen.booleanOption("torque.om.addGetByNameMethods")) import org.apache.torque.om.ColumnAccessByName; #end## import $torqueGen.option("torque.om.criteriaClass"); -#if ($addSaveMethods == true && $saveMethodsInDbObjects == "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects == "true") import org.apache.torque.util.Transaction; #end import org.apache.commons.lang.ObjectUtils; -#if ($complexObjectModel) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) #foreach ($col in $table.Columns) #if ($col.isForeignKey()) #set ( $tblFK = $table.Database.getTable($col.RelatedTableName) ) Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm Thu Sep 4 21:02:24 2014 @@ -28,7 +28,7 @@ #set ( $argList2 = "" ) #set ( $comma = "" ) #foreach ($col in $table.PrimaryKey) - #if ($complexObjectModel) + #if ($torqueGen.booleanOption("torque.om.complexObjectModel")) #if ( $col.isForeignKey() || ($col.Referrers.size() > 0) ) #set ( $throwsClause = "throws TorqueException" ) #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/referencingObjectMethods.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/referencingObjectMethods.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/referencingObjectMethods.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/referencingObjectMethods.vm Thu Sep 4 21:02:24 2014 @@ -26,14 +26,13 @@ ## "foreign-key" element from the torque schema, which was generated ## by the OMTransformer. ## -#set ( $objectIsCaching = $torqueGen.booleanOption("torque.om.objectIsCaching") ) -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) $torqueGen.mergepoint("initializer") $torqueGen.mergepoint("isInitialized") $torqueGen.mergepoint("adder") $torqueGen.mergepoint("resetter") #end $torqueGen.mergepoint("getter") -#if ($objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.objectIsCaching")) $torqueGen.mergepoint("setter") #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/saveMethods.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/saveMethods.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/saveMethods.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/general/saveMethods.vm Thu Sep 4 21:02:24 2014 @@ -23,8 +23,6 @@ ## The template expects as input a "table" element from the torque schema, ## which was processed by the OMTransformer. ## -#set ( $complexObjectModel = $torqueGen.booleanOption("torque.om.complexObjectModel") ) -#set ( $objectIsCaching = $torqueGen.booleanOption("torque.om.objectIsCaching") ) #if (${saveMethodToSaveVariable}) #set( $methodInputParam = "${saveMethodInputType} ${saveMethodToSaveVariable}" ) #set( $methodInputParamWithComma = "${saveMethodInputType} ${saveMethodToSaveVariable}, " ) @@ -49,7 +47,7 @@ */ public void save(${methodInputParam}) throws $saveException { -#if ($complexObjectModel) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) save(${toSaveVariableWithComma}${peerClassName}.DATABASE_NAME); #else #if ($torqueGen.booleanOption("torque.om.trackSaving")) @@ -93,7 +91,7 @@ throws $saveException { Connection con = null; -#if ($complexObjectModel) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) try { con = Transaction.begin(dbName); @@ -111,7 +109,7 @@ try { con = Torque.getConnection(dbName); -#if ($trackSaving == "true") +#if ($torqueGen.booleanOption("torque.om.trackSaving")) ${toSaveVariableWithDot}setSaving(true); #end if (${toSaveVariableWithDot}isNew()) @@ -126,7 +124,7 @@ } finally { -#if ($trackSaving == "true") +#if ($torqueGen.booleanOption("torque.om.trackSaving")) ${toSaveVariableWithDot}setSaving(false); #end Torque.closeConnection(con); @@ -150,14 +148,14 @@ public void save(${methodInputParamWithComma}Connection con) throws $saveException { -#if ($complexObjectModel && $objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) if (${toSaveVariableWithDot}isSaving()) { return; } #end #if ($torqueGen.booleanOption("torque.om.trackSaving") - || ($complexObjectModel && $objectIsCaching)) + || ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching"))) try { ${toSaveVariableWithDot}setSaving(true); @@ -174,7 +172,7 @@ { ${peerClassName}.doUpdate($toSaveVariable, con); } -#if (${useManagers} == "true") +#if ($torqueGen.booleanOption("torque.om.useManagers")) #set ( $primaryKeyColumnElements = $torqueGen.getChild("primary-keys").getChildren("column") ) #if ( $primaryKeyColumnElements.size() != 0) if (isCacheOnSave()) @@ -186,7 +184,7 @@ #end } -#if ($complexObjectModel && $objectIsCaching) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching")) #set ( $referencingForeignKeyElements = $torqueGen.getChild("referencing-foreign-keys").getChildren("foreign-key") ) #set ( $thisTableName = $torqueGen.getSourceElement().getAttribute("name")) #foreach ($referencingForeignKeyElement in $referencingForeignKeyElements) @@ -221,7 +219,7 @@ #end #end #if ($torqueGen.booleanOption("torque.om.trackSaving") - || ($complexObjectModel && $objectIsCaching)) + || ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching"))) } finally { Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeer.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeer.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeer.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeer.vm Thu Sep 4 21:02:24 2014 @@ -43,7 +43,7 @@ $torqueGen.mergepoint("tableConstant") $torqueGen.mergepoint("columnConstants") $torqueGen.mergepoint("numColumnConstant") $torqueGen.mergepoint("inheritanceClasskeyConstants") -#if (($complexObjectModel == "true") && ($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) $torqueGen.mergepoint("fillerChunkSizeConstant") #end $torqueGen.mergepoint("peerImplField") @@ -58,7 +58,7 @@ $torqueGen.mergepoint("getDbObjectInstan $torqueGen.mergepoint("doInsert") $torqueGen.mergepoint("doUpdate") $torqueGen.mergepoint("executeStatement") -#if ($addSaveMethods == "true" && $saveMethodsInDbObjects != "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects != "true") $torqueGen.mergepoint("saveMethods") #end $torqueGen.mergepoint("doDelete") @@ -67,12 +67,12 @@ $torqueGen.mergepoint("buildSelectCriter $torqueGen.mergepoint("buildColumnValues") $torqueGen.mergepoint("retrieveByPK") $torqueGen.mergepoint("retrieveByPKs") -#if ($complexObjectModel == "true") - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) $torqueGen.mergepoint("doSelectJoin") $torqueGen.mergepoint("doSelectJoinAllExcept") #end - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) $torqueGen.mergepoint("fillReferencedObjects") $torqueGen.mergepoint("fillReferencingObjects") #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeerForView.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeerForView.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeerForView.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/basePeerForView.vm Thu Sep 4 21:02:24 2014 @@ -45,7 +45,7 @@ $torqueGen.mergepoint("tableMapConstant" $torqueGen.mergepoint("columnConstants") $torqueGen.mergepoint("numColumnConstant") $torqueGen.mergepoint("inheritanceClasskeyConstants") -#if (($complexObjectModel == "true") && ($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel") && $torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) $torqueGen.mergepoint("fillerChunkSizeConstant") #end $torqueGen.mergepoint("peerImplField") @@ -62,12 +62,12 @@ $torqueGen.mergepoint("buildSelectCriter $torqueGen.mergepoint("buildColumnValues") $torqueGen.mergepoint("retrieveByPK") $torqueGen.mergepoint("retrieveByPKs") -#if ($complexObjectModel == "true") - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) $torqueGen.mergepoint("doSelectJoin") $torqueGen.mergepoint("doSelectJoinAllExcept") #end - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) $torqueGen.mergepoint("fillReferencedObjects") $torqueGen.mergepoint("fillReferencingObjects") $torqueGen.mergepoint("fillerChunkSizeGetter") Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doSelect.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doSelect.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doSelect.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/doSelect.vm Thu Sep 4 21:02:24 2014 @@ -169,7 +169,7 @@ { return ${peerImplGetter}().doSelect(obj); } -#if (${addSelectSingleRecordMethods} == "true") +#if ($torqueGen.booleanOption("torque.om.addSelectSingleRecordMethods")) /** * Selects at most one ${dbObjectClassName} object from a database. Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/imports.vm Thu Sep 4 21:02:24 2014 @@ -71,7 +71,7 @@ import ${dbObjectPackage}.*; import ${peerPackage}.${peerClassName}; import ${peerPackage}.${peerImplClassName}; #end -#if (${generateMapInit} == "true") +#if ($torqueGen.booleanOption("torque.om.generateMapInit")) #set ($databaseMapInitPackage = $torqueGen.option("torque.om.mapInit.databaseMapInitPackage")) #set ($databaseMapInitClassName = $torqueGen.getParent().getAttribute("databaseMapInitClassName")) #if (($basePeerPackage != $databaseMapInitPackage)) Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/initDatabaseMap.vm Thu Sep 4 21:02:24 2014 @@ -33,7 +33,7 @@ #set ( $databaseOptionElements = $databaseElement.getChildren("option") ) public static void initDatabaseMap() { -#if (${generateMapInit} == "true") +#if ($torqueGen.booleanOption("torque.om.generateMapInit")) ${databaseMapInitClassName}.init(); #end ## TODO the following needs not be executed for every table Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/saveMethods.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/saveMethods.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/saveMethods.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/saveMethods.vm Thu Sep 4 21:02:24 2014 @@ -23,8 +23,6 @@ ## The template expects as input a "table" element from the torque schema, ## which was processed by the OMTransformer. ## -#set ( $complexObjectModel = $torqueGen.booleanOption("torque.om.complexObjectModel") ) -#set ( $objectIsCaching = $torqueGen.booleanOption("torque.om.objectIsCaching") ) #set ( $saveException = $torqueGen.option("torque.om.save.saveException") ) /** * Stores an object in the database. If the object is new, Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/tableConstantInit.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/tableConstantInit.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/tableConstantInit.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/tableConstantInit.vm Thu Sep 4 21:02:24 2014 @@ -54,7 +54,7 @@ TABLE.setPrimaryKeyMethodInfo(IDMethod.AUTO_INCREMENT, "$name"); #end #set ( $primaryKeyColumnElements = $torqueGen.getChild("primary-keys").getChildren("column") ) -#if ($useManagers == "true" && $primaryKeyColumnElements.size() > 0) +#if ($torqueGen.booleanOption("torque.om.useManagers") && $primaryKeyColumnElements.size() > 0) TABLE.setUseManager(true); TABLE.setManagerClass(${managerPackage}.${managerClassName}.class); #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerForViewImpl.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerForViewImpl.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerForViewImpl.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerForViewImpl.vm Thu Sep 4 21:02:24 2014 @@ -46,7 +46,7 @@ $torqueGen.mergepoint("doSelect") $torqueGen.mergepoint("getDbObjectInstance") $torqueGen.mergepoint("doInsert") $torqueGen.mergepoint("doUpdate") -#if ($addSaveMethods == "true" && $saveMethodsInDbObjects != "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects != "true") $torqueGen.mergepoint("saveMethods") #end $torqueGen.mergepoint("doDelete") @@ -55,12 +55,12 @@ $torqueGen.mergepoint("buildSelectCriter $torqueGen.mergepoint("buildColumnValues") $torqueGen.mergepoint("retrieveByPK") $torqueGen.mergepoint("retrieveByPKs") -#if ($complexObjectModel == "true") - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) $torqueGen.mergepoint("doSelectJoin") $torqueGen.mergepoint("doSelectJoinAllExcept") #end - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) $torqueGen.mergepoint("fillReferencedObjects") $torqueGen.mergepoint("fillReferencingObjects") #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerImpl.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerImpl.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerImpl.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/basePeerImpl.vm Thu Sep 4 21:02:24 2014 @@ -46,7 +46,7 @@ $torqueGen.mergepoint("doSelect") $torqueGen.mergepoint("getDbObjectInstance") $torqueGen.mergepoint("doInsert") $torqueGen.mergepoint("doUpdate") -#if ($addSaveMethods == "true" && $saveMethodsInDbObjects != "true") +#if ($torqueGen.booleanOption("torque.om.addSaveMethods") && $saveMethodsInDbObjects != "true") $torqueGen.mergepoint("saveMethods") #end $torqueGen.mergepoint("doDelete") @@ -55,12 +55,12 @@ $torqueGen.mergepoint("buildSelectCriter $torqueGen.mergepoint("buildColumnValues") $torqueGen.mergepoint("retrieveByPK") $torqueGen.mergepoint("retrieveByPKs") -#if ($complexObjectModel == "true") - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) +#if ($torqueGen.booleanOption("torque.om.complexObjectModel")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateDoSelectJoin")) $torqueGen.mergepoint("doSelectJoin") $torqueGen.mergepoint("doSelectJoinAllExcept") #end - #if (($objectIsCaching == "true") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching") && $torqueGen.booleanOption("torque.om.complexObjectModel.generateFillers")) $torqueGen.mergepoint("fillReferencedObjects") $torqueGen.mergepoint("fillReferencingObjects") #end Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doDelete.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doDelete.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doDelete.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doDelete.vm Thu Sep 4 21:02:24 2014 @@ -45,7 +45,7 @@ #else int result = doDelete(buildSelectCriteria(obj)); #end -#if ($trackDeleted == "true") +#if ($torqueGen.booleanOption("torque.om.trackDeleted")) obj.setDeleted(true); #end return result; @@ -72,7 +72,7 @@ #else int result = doDelete(buildSelectCriteria(obj), con); #end -#if ($trackDeleted == "true") +#if ($torqueGen.booleanOption("torque.om.trackDeleted")) obj.setDeleted(true); #end return result; @@ -94,7 +94,7 @@ throws TorqueException { int result = doDelete(buildPkCriteria(objects)); -#if ($trackDeleted == "true") +#if ($torqueGen.booleanOption("torque.om.trackDeleted")) for (${dbObjectClassName} object : objects) { object.setDeleted(true); @@ -124,7 +124,7 @@ throws TorqueException { int result = doDelete(buildPkCriteria(objects), con); -#if ($trackDeleted == "true") +#if ($torqueGen.booleanOption("torque.om.trackDeleted")) for (${dbObjectClassName} object : objects) { object.setDeleted(true); Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelect.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelect.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelect.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelect.vm Thu Sep 4 21:02:24 2014 @@ -41,7 +41,7 @@ { return doSelect(buildSelectCriteria(obj)); } -#if (${addSelectSingleRecordMethods} == "true") +#if ($torqueGen.booleanOption("torque.om.addSelectSingleRecordMethods")) /** * Selects at most one ${dbObjectClassName} object from the database Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoin.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoin.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoin.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoin.vm Thu Sep 4 21:02:24 2014 @@ -125,13 +125,13 @@ if (temp_obj2.getPrimaryKey().equals(obj2.getPrimaryKey())) { newObject = false; - #if ($objectIsCaching) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) temp_obj2.${adder}(obj1); #end break; } } - #if ($objectIsCaching) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if (newObject) { obj2.${initializer}(); Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoinAllExcept.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoinAllExcept.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoinAllExcept.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/doSelectJoinAllExcept.vm Thu Sep 4 21:02:24 2014 @@ -164,13 +164,13 @@ if (temp_obj${index}.getPrimaryKey().equals(obj${index}.getPrimaryKey())) { newObject = false; - #if ($objectIsCaching) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) temp_obj${index}.${adderInJoinedDbObject}($tableField); #end break; } } - #if ($objectIsCaching) + #if ($torqueGen.booleanOption("torque.om.objectIsCaching")) if (newObject) { obj${index}.${initializerInJoinedDbObject}(); Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm?rev=1622563&r1=1622562&r2=1622563&view=diff ============================================================================== --- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm (original) +++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/recordmapper/base/recordMapperBase.vm Thu Sep 4 21:02:24 2014 @@ -114,7 +114,7 @@ $torqueGen.mergepoint("createDbObjectIns #else $torqueGen.mergepoint("createDbObjectInstance") #end -#if ($trackLoading == "true") +#if ($torqueGen.booleanOption("torque.om.trackLoading")) try { ${field}.setLoading(true); @@ -167,7 +167,7 @@ $torqueGen.mergepoint("createDbObjectIns } ${field}.setNew(false); ${field}.setModified(false); -#if ($trackLoading == "true") +#if ($torqueGen.booleanOption("torque.om.trackLoading")) } finally { --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org