You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "drsla@tiscali.it" <dr...@tiscali.it> on 2007/06/20 11:56:28 UTC

Interfaces and xdoclet

Hi list,
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?
Thank you in advance for your attention and best regards,
Marco




_________________________________________________________
Naviga e telefona senza limiti con Tiscali     
Scopri le promozioni Tiscali Adsl: navighi e telefoni senza canone Telecom

http://abbonati.tiscali.it/adsl/


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Interfaces and xdoclet

Posted by Thomas Dudziak <to...@gmail.com>.
Hi Marco,

On 6/20/07, drsla@tiscali.it <dr...@tiscali.it> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org