From: Vance K. <va...@us...> - 2006-01-23 05:43:51
|
User: vancek Date: 06/01/22 21:43:43 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Entity.vsl Log: won't generate auto constructor if syntheticCreateMethodAllowed is false Revision Changes Path 1.6 +6 -3 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl Index: Entity.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/Entity.vsl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -r1.5 -r1.6 --- Entity.vsl 18 Jan 2006 08:45:33 -0000 1.5 +++ Entity.vsl 23 Jan 2006 05:43:43 -0000 1.6 @@ -42,19 +42,21 @@ ## Autogenerate a constructor implementation with all attributes. #set ($instanceAttributes = $transform.filterByVisibility($entity.instanceAttributes, "public")) #set ($allAttributes = $transform.filterByVisibility($entity.allInstanceAttributes, "public")) +#if ($entity.syntheticCreateMethodAllowed) /** * Implementation for the main constructor with all POJO attributes. * This method sets all POJO fields defined in this/super class to the * values provided by the parameters. * -#foreach($attribute in $transform.filterUpdatableAttributes($instanceAttributes)) +#**##foreach($attribute in $transform.filterUpdatableAttributes($instanceAttributes)) * @param $attribute.name Value for the ${attribute.name} property -#end +#**##end */ public ${entity.entityName}($entity.getAttributesAsList($allAttributes, true, true, false)) { super($entity.getAttributesAsList($allAttributes, false, true, false)); } +#end #foreach ($operation in $entity.getCreateMethods(true)) #**##set ($opArguments = $transform.getArgumentsAsList(${operation.argumentNames})) @@ -69,6 +71,7 @@ { super(${operation.argumentNames}); } + #end #set ($operations = $entity.businessOperations) #if (!$operations.empty) |