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

public @Interface XmlJoinNode

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

XmlJoinNode is used in conjunction with XmlKey to specify a reference mapping. This is similar to XmlID and XmlIDREF but allows for keys that are of types other than ID. When used with XmlJoinNodes can be used to allow composite keys. The referencedXmlPath must match the xpath of a field on the target class that has been annotated with either XmlID or XmlKey.

Example:

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class Employee {

    @XmlKey
    public String id;

    public String department;

      @XmlJoinNode(xmlPath="manager/id/text()", referencedXmlPath="id/text()")
    public Employee manager;
}
See Also
XmlKey, XmlJoinNodes

Method Summary

Modifier and TypeMethod and Description
public String
public String
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

referencedXmlPathback to summary
public String referencedXmlPath()
xmlPathback to summary
public String xmlPath()