Class RestCollectionAdapter<T extends org.eclipse.persistence.internal.jpa.rs.weaving.PersistenceWeavedRest>

  • 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
    • 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 class jakarta.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 class jakarta.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