Top Description Methods
org.eclipse.persistence.oxm.annotations

public @Interface XmlElementsJoinNodes

extends Annotation
Annotations
@Target:METHOD, FIELD
@Retention:RUNTIME
Static Imports
java.lang.annotation.ElementType.FIELD, .ElementType.METHOD, .RetentionPolicy.RUNTIME

XmlElementsJoinNodes is used in conjunction with XmlElements in order to specify the key references for the targets of the XmlElements annotation. There must be one XmlJoinNodes for each XmlElement This is similar to using XmlIDREF with XmlElements but allows customisation of the xpath for the source keys and allows for composite key relationships.

Example:

@XmlRootElement
public class Client {

  ...

  @XmlElements({
      @XmlElement(name="mail", type=Address.class),
      @XmlElement(name="phone", type=PhoneNumber.class)
  })
  @XmlElementsJoinNodes({
      @XmlJoinNodes({
          @XmlJoinNode(xmlPath="mail/@id", referencedXmlPath="@aid"),
          @XmlJoinNode(xmlPath="mail/type/text()", referencedXmlPath="@type")
      }),
      @XmlJoinNodes({
          @XmlJoinNode(xmlPath="phone/@id", referencedXmlPath="@pid"),
          @XmlJoinNode(xmlPath="phone/type/text()", referencedXmlPath="@type")
      })
  })
  public Object preferredContactMethod;
See Also
XmlJoinNodes, XmlJoinNode, XmlElements, XmlKey

Method Summary

Modifier and TypeMethod and Description
public XmlJoinNodes[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public XmlJoinNodes[] value()