From: <Mic...@ub...> - 2003-04-30 09:23:02
|
Why is it not ProductLocal then? -----Original Message----- From: Schildmann,Ingo [mailto:ing...@ba...] Sent: Wednesday, April 30, 2003 10:51 AM To: 'xdo...@li...' Subject: RE: [Xdoclet-user] valueobjects and 1-to-1 aggregation Thanks, but I'm already using Locals. If I understood the example correctly, example.interfaces.Product is a local interface. Is the solution maybe not to integrate the aggregation into the = valuobject? Ingo > -----Original Message----- > From: Mic...@ub... [mailto:Mic...@ub...] > Sent: Wednesday, April 30, 2003 9:23 AM > To: xdo...@li... > Subject: RE: [Xdoclet-user] valueobjects and 1-to-1 aggregation >=20 >=20 > I used the xPetShop example and it seemed to use Local's: >=20 >=20 > /** > * Get the User for this Contact > * > * @ejb:interface-method > * > * @ejb.relation > * name=3D"User-Contact" > * role-name=3D"contact-belongs_to-user" > * target-ejb=3D"com.baselogic.yoursos.contact.Contact" > * cascade-delete=3D"yes" > * > * @jboss.relation > * fk-column=3D"user_id_fk" > * related-pk-field=3D"userId" > **/ > public abstract UserLocal getUser(); > public abstract void setUser( UserLocal pUser ); >=20 > Maybe you can try that? >=20 > -----Original Message----- > From: Schildmann,Ingo [mailto:ing...@ba...] > Sent: Tuesday, April 29, 2003 5:30 PM > To: 'xdo...@li...' > Subject: [Xdoclet-user] valueobjects and 1-to-1 aggregation >=20 >=20 > Hi, >=20 > On the 'Using Value Objects' page is an example for 1-to-n aggregation > but not for 1-to-1 aggregation. >=20 > Based on the 1-to-n example > =20 > /** > * @ejb.value-object > * aggregate=3D"example.vo.ProductValue" > * aggregate-name=3D"PreferredProducts" > * members=3D"example.interfaces.Product" > * members-name=3D"PreferredProduct" > * relation=3D"external" > * type=3D"Collection" > * @ejb.relation > * name=3D"Customer-Product" > * role-name=3D"customer-prefers-products" > */ > public abstract Collection getPreferredProducts(); > public abstract void setPreferredProducrs(Collection products); >=20 > I created an 1-to-1 aggregation like this: > (@ejb.interface-method is also set, of course, but here obmitted like > in the example) >=20 > /** > * @ejb.value-object > * aggregate=3D"example.vo.ProductValue" > * aggregate-name=3D"PreferredProduct" > * relation=3D"external" > * type=3D"example.interfaces.Product" > * @ejb.relation > * name=3D"Customer-Product" > * role-name=3D"customer-prefers-product" > */ > public abstract Product getPreferredProduct(); > public abstract void setPreferredProduct(Product product); >=20 > I get the error message <<Invalid return type=20 > (example.interface.Product on > aggregate or composition.>> =20 >=20 > What is wrong with the way I do the 1-to-1 aggregation? >=20 > Ingo >=20 >=20 > -- > Ingo Schildmann > Berater > BANCOTEC > Ein Unternehmen der Cellent AG >=20 > Calwer Strasse 33, 70173 Stuttgart > Tel. ++49 711 222 992 - 900 > Fax ++49 711 222 992 - 999 > Ingo.Schildmann@Bancotec.de > http://www.Bancotec.de > http://www.cellent.de >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > xdoclet-user mailing list > xdo...@li... > https://lists.sourceforge.net/lists/listinfo/xdoclet-user >=20 > Visit our website at http://www.ubswarburg.com >=20 > This message contains confidential information and is intended only=20 > for the individual named. If you are not the named addressee you=20 > should not disseminate, distribute or copy this e-mail. Please=20 > notify the sender immediately by e-mail if you have received this=20 > e-mail by mistake and delete this e-mail from your system. >=20 > E-mail transmission cannot be guaranteed to be secure or error-free=20 > as information could be intercepted, corrupted, lost, destroyed,=20 > arrive late or incomplete, or contain viruses. The sender therefore=20 > does not accept liability for any errors or omissions in the contents=20 > of this message which arise as a result of e-mail transmission. If=20 > verification is required please request a hard-copy version. This=20 > message is provided for informational purposes and should not be=20 > construed as a solicitation or offer to buy or sell any securities or=20 > related financial instruments. >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > xdoclet-user mailing list > xdo...@li... > https://lists.sourceforge.net/lists/listinfo/xdoclet-user >=20 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ xdoclet-user mailing list xdo...@li... https://lists.sourceforge.net/lists/listinfo/xdoclet-user Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |