Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String marshal​(java.lang.Object v)  
      java.lang.Object unmarshal​(java.lang.String v)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • 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