Am Mittwoch, 28. Mai 2003 19:52 schrieb Craig Hamilton: > I have a FacilityLink bean which has two relations (source,destination) > to another object which we defined Facility.
I have a profile object with two references to country (native language,
nationality):
/**
* gets the value of the EJB foreign key field "Nationality", referencing to
Country
* @see com.dev3m5.gp.ejb.country.EntityCountryLocal
* @return CountryLightValue
* @ejb.interface-method
* @ejb.transaction
* type="Supports"
* @ejb.relation
* name="Country-ProfileNationality"
* role-name="Profile-in-Country"
* cascade-delete="yes"
* @jboss.relation
* related-pk-field="id"
* fk-column="nationality"
* fk-constraint="true"
* @jboss.relation-read-ahead
* strategy="on-find"
* page-size="1"
* @ejb.value-object
* aggregate="com.dev3m5.gp.ejb.country.CountryLightValue"
* aggregate-name="Nationality"
* relation="external"
*/
public abstract com.dev3m5.gp.ejb.country.EntityCountryLocal
getNationality();
/**
* sets the value of the EJB foreign key field "Nationality", referencing to
Country
* @see com.dev3m5.gp.ejb.country.EntityCountryLocal
* @param pNationality new value of the EJB field "Nationality"
* @ejb.interface-method
*/
public abstract void
setNationality(com.dev3m5.gp.ejb.country.EntityCountryLocal pNationality);
/**
* gets the value of the EJB foreign key field "NativeLanguage", referencing
to Country
* @see com.dev3m5.gp.ejb.country.EntityCountryLocal
* @return CountryLightValue
* @ejb.interface-method
* @ejb.transaction
* type="Supports"
* @ejb.relation
* name="Country-ProfileNativeLanguage"
* role-name="Profile-in-Country"
* cascade-delete="yes"
* @jboss.relation
* related-pk-field="id"
* fk-column="native_language"
* fk-constraint="true"
* @jboss.relation-read-ahead
* strategy="on-find"
* page-size="1"
* @ejb.value-object
* aggregate="com.dev3m5.gp.ejb.country.CountryLightValue"
* aggregate-name="NativeLanguage"
* relation="external"
*/
public abstract com.dev3m5.gp.ejb.country.EntityCountryLocal
getNativeLanguage();
/**
* sets the value of the EJB foreign key field "NativeLanguage", referencing
to Country
* @see com.dev3m5.gp.ejb.country.EntityCountryLocal
* @param pNativeLanguage new value of the EJB field "NativeLanguage"
* @ejb.interface-method
*/
public abstract void
setNativeLanguage(com.dev3m5.gp.ejb.country.EntityCountryLocal
pNativeLanguage);
Hope, this example helps.
--
----------------------------------------------------------------------
%> ln -s /dev/null /dev/brain
%> ln -s /dev/urandom /dev/world
%> dd if=/dev/world of=/dev/brain
pgp00000.pgp
Description: signature
