From: Vance K. <va...@us...> - 2006-01-03 01:05:46
|
User: vancek Date: 06/01/02 17:05:35 Modified: andromda-ejb3/src/main/resources/templates/ejb3 SessionBeanImpl.vsl Log: fixed to work with ejb3 session bean Revision Changes Path 1.2 +48 -13 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanImpl.vsl Index: SessionBeanImpl.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/SessionBeanImpl.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- SessionBeanImpl.vsl 28 Dec 2005 00:32:55 -0000 1.1 +++ SessionBeanImpl.vsl 3 Jan 2006 01:05:35 -0000 1.2 @@ -11,30 +11,65 @@ public class ${service.serviceImplementationName} extends ${service.serviceName} { -#foreach ($operation in $service.operations) -#set ($returnType = $operation.returnType.fullyQualifiedName) -#set ($signature = $operation.signature) -#set ($visibility = $operation.visibility) -## Public static methods are exposed on the home -## interface instead of the component interface and must -## be prepended with "ejbHome" -#if ($visibility == "public" && $operation.static) -#set ($signature = "ejbHome${stringUtils.capitalize($signature)}") + // --------------- Constructors --------------- + +## Default create method with no arguments. + public ${service.serviceImplementationName}() + { + super(); + } +#foreach ($operation in $service.getCreateMethods(false)) + + /** +$operation.getDocumentation(" * ") + * + */ + public ${service.serviceImplementationName}($operation.typedArgumentList) + { + // implementation + } +#end +## Autogenerated create method with all attributes. Only present for stateful beans. +#set ($allAttributes = $service.allInstanceAttributes) +#if (!$allAttributes.empty) + + /** + * Constructor with all attribute values. +#**##foreach($attribute in $allAttributes) + * @param $attribute.name Value for the ${attribute.name} property +#**##end + */ + public ${service.serviceImplementationName}(${service.getAttributesAsList($allAttributes, true, true)}) + { +#**##if(!$allAttributes.empty) + super($service.getAttributesAsList($allAttributes, false, true)); +#**##end + } #end +#set ($operations = $service.operations) +#if (!$operations.empty) + + // -------- Business Methods -------------- + +#**##foreach ($operation in $operations) +#* *##set ($returnType = $operation.returnType.fullyQualifiedName) +#* *##set ($signature = $operation.signature) +#* *##set ($visibility = $operation.visibility) /** * @see ${service.fullyQualifiedName}#${operation.getSignature(false)} */ $visibility $returnType $signature -#if ($operation.exceptionsPresent) +#* *##if ($operation.exceptionsPresent) throws $operation.exceptionList -#end +#* *##end { //TODO: put your implementation here. -#if ($operation.returnTypePresent) +#* *##if ($operation.returnTypePresent) // Dummy return value, just that the file compiles return $operation.returnType.javaNullString; -#end +#* *##end } +#**##end #end } |