Class LinkAdapter
-
public class LinkAdapter extends jakarta.xml.bind.annotation.adapters.XmlAdapter<String,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
Fields Modifier and Type Field Description protected PersistenceContext
context
-
Constructor Summary
Constructors Constructor Description LinkAdapter()
LinkAdapter(String baseURI, PersistenceContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
constructObjectForId(String entityType, Object id)
String
marshal(Object v)
Object
unmarshal(String v)
-
-
-
Field Detail
-
context
protected PersistenceContext context
-
-
Constructor Detail
-
LinkAdapter
public LinkAdapter()
-
LinkAdapter
public LinkAdapter(String baseURI, PersistenceContext context)
-
-