javax.xml.bind.annotation
Annotation Type XmlIDREF

To preserve referential integrity of an object graph across XML
serialization followed by a XML deserialization, requires an object
reference to be marshalled by reference or containment
appropriately. Annotations @XmlID and @XmlIDREF
together allow a customized mapping of a JavaBean property's
type by containment or reference.

Usage

The @XmlIDREF annotation can be used with the following
program elements:

a JavaBean property

non static, non transient field

See "Package Specification" in javax.xml.bind.package javadoc for
additional common information.

The usage is subject to the following constraints:

If the type of the field or property is a collection type,
then the collection item type must contain a property or
field annotated with @XmlID.

If the field or property is single valued, then the type of
the property or field must contain a property or field
annotated with @XmlID.

Note: If the collection item type or the type of the
property (for non collection type) is java.lang.Object, then
the instance must contain a property/field annotated with
@XmlID attribute.