Class RestCollectionAdapter<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest>
- java.lang.Object
-
- jakarta.xml.bind.annotation.adapters.XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T>,Collection<T>>
-
- org.eclipse.persistence.jpa.rs.util.xmladapters.RestCollectionAdapter<T>
-
- Type Parameters:
T
- list generac type
public class RestCollectionAdapter<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest> extends jakarta.xml.bind.annotation.adapters.XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T>,Collection<T>>
Collections adapter used in JPARS V2. Collections are wrapped into CollectionWrapper which has 'links'.- See Also:
CollectionWrapper
- Author:
- Dmitry Kornilov
- Since:
- EclipseLink 2.6.0
-
-
Field Summary
Fields Modifier and Type Field Description protected PersistenceContext
context
-
Constructor Summary
Constructors Constructor Description RestCollectionAdapter()
RestCollectionAdapter(PersistenceContext context)
Instantiates a new RestCollectionAdapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T>
marshal(Collection<T> v)
Collection<T>
unmarshal(org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> v)
-
-
-
Field Detail
-
context
protected PersistenceContext context
-
-
Constructor Detail
-
RestCollectionAdapter
public RestCollectionAdapter()
-
RestCollectionAdapter
public RestCollectionAdapter(PersistenceContext context)
Instantiates a new RestCollectionAdapter.- Parameters:
context
- persistent context
-
-
Method Detail
-
unmarshal
public Collection<T> unmarshal(org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> v) throws Exception
- Specified by:
unmarshal
in classjakarta.xml.bind.annotation.adapters.XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest>,Collection<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest>>
- Throws:
Exception
-
marshal
public org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> marshal(Collection<T> v) throws Exception
- Specified by:
marshal
in classjakarta.xml.bind.annotation.adapters.XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest>,Collection<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest>>
- Throws:
Exception
-
-