From: Vance K. <va...@us...> - 2006-01-26 06:53:21
|
User: vancek Date: 06/01/25 22:53:15 Modified: andromda-ejb3/src/main/resources/templates/ejb3 Entity.vsl Log: added constructor setting all attributes and relations Revision Changes Path 1.9 +20 -0 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.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- Entity.vsl 26 Jan 2006 04:36:42 -0000 1.8 +++ Entity.vsl 26 Jan 2006 06:53:14 -0000 1.9 @@ -57,8 +57,28 @@ { super($entity.getAttributesAsList($allAttributes, false, true, false)); } + #end +#set ($relations = $entity.allEntityRelations) +#if (!$relations.empty) +#**##if ($entity.syntheticCreateMethodAllowed) + /** + * Constructor with all POJO attribute values and CMR relations. + * +#* *##foreach($attribute in $transform.filterUpdatableAttributes($allAttributes, $entity.compositePrimaryKeyPresent)) + * @param $attribute.name Value for the ${attribute.name} property +#* *##end +#* *##foreach ($relation in $relations) + * @param $relation.otherEnd.name Value for the ${relation.otherEnd.name} relation role +#* *##end + */ + public ${entity.entityName}($entity.getAttributesAsList($allAttributes, true, true, false)#if(!$allAttributes.empty), #end#foreach ($relation in $relations)${relation.otherEnd.getterSetterTypeName} $relation.otherEnd.name#if($velocityCount != $relations.size()), #end#end) + { + super($entity.getAttributesAsList($allAttributes, false, true, false)#if(!$allAttributes.empty), #end#foreach ($relation in $relations)$relation.otherEnd.name#if($velocityCount != $relations.size()), #end#end); + } +#**##end +#end #foreach ($operation in $entity.getCreateMethods(true)) #**##set ($opArguments = $transform.getArgumentsAsList(${operation.argumentNames})) /** |