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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRestCollectionAdapter
(PersistenceContext context) Instantiates a new RestCollectionAdapter. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T>
marshal
(Collection<T> v)
-
Field Details
-
context
-
-
Constructor Details
-
RestCollectionAdapter
public RestCollectionAdapter() -
RestCollectionAdapter
Instantiates a new RestCollectionAdapter.- Parameters:
context
- persistent context
-
-
Method Details
-
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
-