From: Vance K. <va...@us...> - 2006-02-01 08:38:52
|
User: vancek Date: 06/02/01 00:38:44 Modified: andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: when defining attributes use allInstanceAttributes, fixed comments for constants, added mappedBy property for ManyToMany annotation, if method is modelled as classifier(static) do not declare it here. Revision Changes Path 1.13 +17 -11 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl Index: EntityEmbeddable.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- EntityEmbeddable.vsl 31 Jan 2006 15:17:57 -0000 1.12 +++ EntityEmbeddable.vsl 1 Feb 2006 08:38:44 -0000 1.13 @@ -82,7 +82,7 @@ public static final $constant.type.fullyQualifiedName $constant.name = $constant.defaultValue; #**##end #end -#set ($attributes = $entity.attributes) +#set ($attributes = $entity.allInstanceAttributes) #if (!$attributes.empty) // ----------- Attribute Definitions ------------ @@ -214,7 +214,7 @@ /** * Get the <code>$constant.name</code> constant $constant.getDocumentation(" * ") - * + */ $constant.visibility $constant.type.fullyQualifiedName ${constant.getterName}() { return $constant.name; @@ -262,7 +262,7 @@ // -------- Attribute Accessors ---------- -#**##foreach ($attribute in $entity.attributes) +#**##foreach ($attribute in $attributes) ## Only include accessors for identifier attributes if entity does not have a composite primary key #* *##if ($entity.compositePrimaryKeyPresent && $attribute.identifier) #* *##set ($doAttributeAccessors = false) @@ -439,7 +439,7 @@ * @return $target.getterSetterTypeName */ #* *##set ($argExists = false) - @javax.persistence.ManyToMany(#if ($target.cascadeType)cascade = {${target.cascadeType}}#set ($argExists = true)#end#if ($target.eager)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.EAGER#end) + @javax.persistence.ManyToMany(#if ($target.cascadeType)cascade = {${target.cascadeType}}#set ($argExists = true)#end#if(!$associationEnd.owning)#if ($argExists), #end#**#mappedBy = "${associationEnd.name}"#set ($argExists = true)#end#if ($target.eager)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.EAGER#end) ## Use Aggregation and Composition to determine owning side #* *##if(($associationEnd.owning) && ${associationEnd.association.tableName}) @javax.persistence.JoinTable(table = @javax.persistence.Table(name = "${associationEnd.association.tableName}")) @@ -579,9 +579,13 @@ #set ($businessOperations = $entity.businessOperations) #if (!$businessOperations.empty) - // --------------- Business Methods ----------------- + // --------------- Entity Methods ----------------- +## +## Method with a static modifier will be defined in the inheriting subclass +## #**##foreach ($operation in $businessOperations) +#* *##if (!$operation.static) #* *##set ($signature = $operation.signature) #* *##set ($visibility = $operation.visibility.toString()) #* *##set ($returnType = $operation.returnType.fullyQualifiedName) @@ -594,6 +598,8 @@ #* *##else $visibility abstract $returnType $signature; #* *##end + +#* *##end #**##end #end } \ No newline at end of file |