EclipseLink JPA-RS 2.4.1, build 'v20121003-ad44345' API Reference

org.eclipse.persistence.jpa.rs.util
Class LinkAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.Object>
      extended by org.eclipse.persistence.jpa.rs.util.LinkAdapter

public class LinkAdapter
extends javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.Object>

Used with JAXB to convert from a URL representing an relationship to an object It provides functionality at marshall and unmarshall time At marshall time, the target of a relationship will be marshalled as a URL that could be used to find the object through a REST service At unmarsall time, the URL will be deconstructed and used to find the object in JPA.

Author:
tware

Field Summary
protected  PersistenceContext context
           
 
Constructor Summary
LinkAdapter()
           
LinkAdapter(java.lang.String baseURI, PersistenceContext context)
           
 
Method Summary
protected  java.lang.Object constructObjectForId(java.lang.String entityType, java.lang.Object id)
           
 java.lang.String marshal(java.lang.Object v)
           
 java.lang.Object unmarshal(java.lang.String v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected PersistenceContext context
Constructor Detail

LinkAdapter

public LinkAdapter()

LinkAdapter

public LinkAdapter(java.lang.String baseURI,
                   PersistenceContext context)
Method Detail

unmarshal

public java.lang.Object unmarshal(java.lang.String v)
                           throws java.lang.Exception
Specified by:
unmarshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.Object>
Throws:
java.lang.Exception

constructObjectForId

protected java.lang.Object constructObjectForId(java.lang.String entityType,
                                                java.lang.Object id)

marshal

public java.lang.String marshal(java.lang.Object v)
                         throws java.lang.Exception
Specified by:
marshal in class javax.xml.bind.annotation.adapters.XmlAdapter<java.lang.String,java.lang.Object>
Throws:
java.lang.Exception

EclipseLink JPA-RS 2.4.1, build 'v20121003-ad44345' API Reference