From: Vance K. <va...@us...> - 2006-04-30 01:47:47
|
User: vancek Date: 06/04/29 18:47:44 Modified: andromda-ejb3/src/main/resources/templates/ejb3 DaoBase.vsl DaoLocal.vsl Log: fix create methods that include dao properties to limit to instance properties only Revision Changes Path 1.3 +6 -6 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl Index: DaoBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- DaoBase.vsl 26 Apr 2006 15:10:51 -0000 1.2 +++ DaoBase.vsl 30 Apr 2006 01:47:44 -0000 1.3 @@ -222,28 +222,28 @@ } #**##if ($enableDaoPropertiesCreateMethod.equalsIgnoreCase('true')) -#* *##set ($attributes = $entity.getAttributes(true, $entity.usingAssignedIdentifier)) +#* *##set ($attributes = $entity.getInstanceAttributes(true, $entity.usingAssignedIdentifier)) #* *##if (!$attributes.empty) /** - * @see ${rootDaoType}#create(${entity.getAttributeTypeList(true, false)}) + * @see ${rootDaoType}#create(${entity.getInstanceAttributeTypeList(true, false)}) */ public $rootEntityType create( #* *##foreach($attribute in $attributes) - $attribute.type.fullyQualifiedName $attribute.name#if($velocityCount != $attributes.size()),#else) + #if ($stringUtils.isNotBlank($attribute.lobType))${attribute.lobType}#else${attribute.type.fullyQualifiedName}#end $attribute.name#if($velocityCount != $attributes.size()),#else) throws ${entity.fullyQualifiedDaoDefaultExceptionName}#end #* *##end { - return ($rootEntityType)this.create($entity.daoNoTransformationConstantName, ${entity.getAttributeNameList(true, $entity.usingAssignedIdentifier)}); + return ($rootEntityType)this.create($entity.daoNoTransformationConstantName, ${entity.getInstanceAttributeNameList(true, $entity.usingAssignedIdentifier)}); } /** - * @see ${rootDaoType}#create(int, ${entity.getAttributeTypeList(true, false)}) + * @see ${rootDaoType}#create(int, ${entity.getInstanceAttributeTypeList(true, false)}) */ public Object create( final int transform, #* *##foreach($attribute in $attributes) - $attribute.type.fullyQualifiedName $attribute.name#if($velocityCount != $attributes.size()),#else) + #if ($stringUtils.isNotBlank($attribute.lobType))${attribute.lobType}#else${attribute.type.fullyQualifiedName}#end $attribute.name#if($velocityCount != $attributes.size()),#else) throws ${entity.fullyQualifiedDaoDefaultExceptionName}#end #* *##end 1.2 +4 -4 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoLocal.vsl Index: DaoLocal.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoLocal.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- DaoLocal.vsl 24 Apr 2006 02:21:43 -0000 1.1 +++ DaoLocal.vsl 30 Apr 2006 01:47:44 -0000 1.2 @@ -196,7 +196,7 @@ throws ${entity.fullyQualifiedDaoDefaultExceptionName}; #**##if ($enableDaoPropertiesCreateMethod.equalsIgnoreCase('true')) -#* *##set ($attributes = $entity.getAttributes(true, $entity.usingAssignedIdentifier)) +#* *##set ($attributes = $entity.getInstanceAttributes(true, $entity.usingAssignedIdentifier)) #* *##if (!$attributes.empty) /** * <p> @@ -207,14 +207,14 @@ */ public $rootEntityType create( #* *##foreach($attribute in $attributes) - $attribute.type.fullyQualifiedName $attribute.name#if($velocityCount != $attributes.size()),#else) + #if ($stringUtils.isNotBlank($attribute.lobType))${attribute.lobType}#else${attribute.type.fullyQualifiedName}#end $attribute.name#if($velocityCount != $attributes.size()),#else) throws ${entity.fullyQualifiedDaoDefaultExceptionName};#end #* *##end /** * <p> - * Does the same thing as {@link #create($entity.getAttributeTypeList(true,false))} with an + * Does the same thing as {@link #create($entity.getInstanceAttributeTypeList(true,false))} with an * additional flag called <code>transform</code>. If this flag is set to <code>$entity.daoNoTransformationConstantName</code> then * the returned entity will <strong>NOT</strong> be transformed. If this flag is any of the other constants * defined here then the result <strong>WILL BE</strong> passed through an operation which can optionally @@ -227,7 +227,7 @@ public Object create( int transform, #* *##foreach($attribute in $attributes) - $attribute.type.fullyQualifiedName $attribute.name#if($velocityCount != $attributes.size()),#else) + #if ($stringUtils.isNotBlank($attribute.lobType))${attribute.lobType}#else${attribute.type.fullyQualifiedName}#end $attribute.name#if($velocityCount != $attributes.size()),#else) throws ${entity.fullyQualifiedDaoDefaultExceptionName};#end #* *##end |