< prev index next >
src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlID.java
Print this page
*** 36,51 ****
*
* <p>
* 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 <tt>@XmlID</tt> and <tt>@XmlIDREF</tt>
* together allow a customized mapping of a JavaBean property's
* type by containment or reference.
*
* <p><b>Usage</b> </p>
! * The <tt>@XmlID</tt> annotation can be used with the following
* program elements:
* <ul>
* <li> a JavaBean property </li>
* <li> non static, non transient field </li>
* </ul>
--- 36,51 ----
*
* <p>
* 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 {@code @XmlID} and {@code @XmlIDREF}
* together allow a customized mapping of a JavaBean property's
* type by containment or reference.
*
* <p><b>Usage</b> </p>
! * The {@code @XmlID} annotation can be used with the following
* program elements:
* <ul>
* <li> a JavaBean property </li>
* <li> non static, non transient field </li>
* </ul>
*** 54,71 ****
* additional common information.</p>
*
* The usage is subject to the following constraints:
* <ul>
* <li> At most one field or property in a class can be annotated
! * with <tt>@XmlID</tt>. </li>
! * <li> The JavaBean property's type must be <tt>java.lang.String</tt>.</li>
* <li> The only other mapping annotations that can be used
! * with <tt>@XmlID</tt>
! * are:<tt>@XmlElement</tt> and <tt>@XmlAttribute</tt>.</li>
* </ul>
*
! * <p><b>Example</b>: Map a JavaBean property's type to <tt>xs:ID</tt></p>
* <pre>
* // Example: code fragment
* public class Customer {
* @XmlAttribute
* @XmlID
--- 54,71 ----
* additional common information.</p>
*
* The usage is subject to the following constraints:
* <ul>
* <li> At most one field or property in a class can be annotated
! * with {@code @XmlID}. </li>
! * <li> The JavaBean property's type must be {@code java.lang.String}.</li>
* <li> The only other mapping annotations that can be used
! * with {@code @XmlID}
! * are: {@code @XmlElement} and {@code @XmlAttribute}.</li>
* </ul>
*
! * <p><b>Example</b>: Map a JavaBean property's type to {@code xs:ID}</p>
* <pre>
* // Example: code fragment
* public class Customer {
* @XmlAttribute
* @XmlID
< prev index next >