Re: Interfaces and xdoclet
| Newsgroups | gmane.comp.jakarta.ojb.user |
|---|---|
| Message-ID | <21596625.1183013621647.JavaMail.root@ps22> |
Hi Tom, thank you very much, now it works! Best regards, Marco Hi Marco, On 6/20/07, [email protected] <[email protected]> wrote: > I am developing a project using OJB with the xdoclet module as > persistance layer. > In my project I need to use interfaces, but I have a problem in the > xdoclet annotation of the interfaces. > For example, if I write: > > /** > * Interface describing a resource > * > * @ojb.class > * > * > * @ojb.field name="description" > * jdbc-type="VARCHAR" > * length="300" > * > */ > > public interface Resource...... > > > The field "description" is marked as anonymous and inherited as > anonymous by all subclasses. > Reading the OJB guide (section "Using interfaces with OJB") the > interface fields are not anonymous. > Where am I wrong? If you put the ojb.field tag into the interface Javadoc, then they'll be anonymous. If you want non-anonymous ones, then you need to create declarations for the getters/setters for these fields in the interface and tag them with ojb.field accordingly, if you want OJB to be able to use them via the interface. Tom _______________________________________________________ Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali Adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/