The submitted file is a version of the entity.vsl
This template has additional functions added to support
the inclusion of ejb finder methods.
To use this template, simply use it in place of the
normal version. In your UML file, add a method to your
entity beans and set its sterotype to <ejbfinder>.
There are two ways you can specify finder methods.
1) Collection findBy<things>(param1, param2)
In this case the finder will return a colleciton of
local references to objects where param1 and param2
values are equal to that specified in the method calls.
Example:
UML
Add a method to a Person ejb as follows,
Collection findByName(String firstName, String lastName)
firstName and lasName must be CMP fields with
corresponding names.
USAGE
person.findByName( "John", "Smith" )
2) Collection findBy<thing>( param list )
A more general case is to specify the finder method
using ejbQL as follows -
UML
Add a methof to a Person ejb as follows,
Collection findByYoung( String lastName)
then add a tag method in the UML diagram e.g.
tag - ejbQL
value - SELECT object(c) FROM Person AS c WHERE c.name
= ?1 AND c.age<30
USAGE
person.findByYoung("Smith")
this should return all persons Smith under 30 !
See @ebj:finder at http://xdoclet.sourceforge.net/
and ejb specs for more
The above examples are not tested, but I am using the
template successfully.
Good luck.........
Entity bean template