For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > April 2005 > What are the JBoss xdoclet tags for an unidirectional Customer-Address









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author What are the JBoss xdoclet tags for an unidirectional Customer-Address
Joost Kraaijeveld

2005-04-11, 3:57 am

Can anyone tell me what the xdoclet tags are for a unidirectional 1-1
relation between a Customer and an Address in JBoss?

TIA

Joost
Frank Langelage

2005-04-11, 3:57 am

Joost Kraaijeveld wrote:
> Can anyone tell me what the xdoclet tags are for a unidirectional 1-1
> relation between a Customer and an Address in JBoss?
>


Here it is (debit = customer and adres = address):
/**
* @ejb.interface-method
* @ejb.relation
* name="Debit-Adres"
* role-name="1-debit-1-adres"
* multiple="no"
* target-multiple="no"
* target-cascade-delete="no"
* target-ejb="Adres"
* target-role-name="1-adres-1-debit"
* @jboss.relation
* related-pk-field="adressNr"
* fk-column="adress_nr"
* @jboss.relation-read-ahead strategy="on-find"
*/
public abstract AdresLocal getAdres();
/**
* @ejb.interface-method
*/
public abstract void setAdres( final AdresLocal adres );

Table debit has a field adress_nr as foreign key column.
Adres_nr is the primary key column for table adres.
Joost Kraaijeveld

2005-04-11, 8:58 pm

Hi Frank,


Frank Langelage wrote:
> Here it is (debit = customer and adres = address):
> /**

....

> Table debit has a field adress_nr as foreign key column.
> Adres_nr is the primary key column for table adres.

Thanks for the useful response.

Joost
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com