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 Details

  • Constructor Details

    • RestCollectionAdapter

      public RestCollectionAdapter()
    • RestCollectionAdapter

      public RestCollectionAdapter(PersistenceContext context)
      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 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