T
- list generac typepublic class RestCollectionAdapter<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest> extends XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T>,java.util.Collection<T>>
CollectionWrapper
Modifier and Type | Field and Description |
---|---|
protected PersistenceContext |
context |
Constructor and Description |
---|
RestCollectionAdapter() |
RestCollectionAdapter(PersistenceContext context)
Instantiates a new RestCollectionAdapter.
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> |
marshal(java.util.Collection<T> v)
Convert a bound type to a value type.
|
java.util.Collection<T> |
unmarshal(org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> v)
Convert a value type to a bound type.
|
protected PersistenceContext context
public RestCollectionAdapter()
public RestCollectionAdapter(PersistenceContext context)
context
- persistent contextpublic java.util.Collection<T> unmarshal(org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> v) throws java.lang.Exception
XmlAdapter
unmarshal
in class XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest>,java.util.Collection<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest>>
v
- The value to be converted. Can be null.java.lang.Exception
- if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler
.public org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> marshal(java.util.Collection<T> v) throws java.lang.Exception
XmlAdapter
marshal
in class XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest>,java.util.Collection<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest>>
v
- The value to be convereted. Can be null.java.lang.Exception
- if there's an error during the conversion. The caller is responsible for
reporting the error to the user through ValidationEventHandler
.