users@jaxb.java.net

Re: mapping using annotations without compiling a schema

From: Dmitri Colebatch <colebatchd_at_gmail.com>
Date: Tue, 21 Jun 2005 13:11:54 +1000

Hi Sekhar,

Thanks for the clarification, if I could state my understanding of
what you're saying:

On 6/21/05, Sekhar Vajjhala <Sekhar.Vajjhala_at_sun.com> wrote:

> There are other alternatives to using @XmlTransient - even with Early Draft
> 2 version.
>
> a. set the default to @XmlAccessorType(AccessType.PROPERTY)
> move the annotation to the getter/setter from the field to the
> property.

And the default behaviour is that all properties (getFoo/setFoo) will
be serialized unless I mark (one of?) them @XmlTransient.

> b. set the default to @XmlAccessorType(AccessType.FIELD)
> the property is not serialized by default.

The same as for property, but any field declaration will be serialized
unless I mark the field @XmlTransient.

> d. This one will be available in the post Early Draft 2 version.
> set default serialization to @XmlAccessorType(AccessType.NONE) which
> means
> neither fields nor properties are serialized by default; the
> field/property has to be
> explicitly annotated for it be serialized.

Yep, that sounds exactly like what I want. I'll just have to wait (o:

thanks,
dim