ibm.com/developerWorks
Presented by developerWorks, your source for great tutorials
Many
EmployeeBean
dept
DeptHasEmployees
One
DeptBean
employees
java.util.Collection
With XDoclet you had to write one tag with two attributes for each side of the
relationship. Compare this to the 26 lines of XML you would have had to have written
without XDoclet. I don t see how anyone would want to do EJB development without
XDoclet.
XDoclet and EJB technology: Setup OR relationship
mappings between two Entities
So far you have defined the relationship between two beans. This does not amount to a
hill of beans, unless you add relationship mapping details about the underlying
database tables. The generated vendor implementations need these mappings so it
knows how to implement the relationship.
Unfortunately there is not a common way with XDoclet to specify the OR relationship
mappings. Currently you have to learn each set of vendor specific tags. Below is an
example that uses both the vendor neutral tag and Resin s OR relationship mapping
tag.
/**
* @return Return the group this user is in.
Page 40 of 49
Enhance J2EE component reuse with XDoclets
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved