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

  • Type Parameters:
    T - list generac type

    public class RestCollectionAdapter<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest>
    extends javax.xml.bind.annotation.adapters.XmlAdapter<org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T>,​java.util.Collection<T>>
    Collections adapter used in JPARS V2. Collections are wrapped into CollectionWrapper which has 'links'.
    Since:
    EclipseLink 2.6.0
    Author:
    Dmitry Kornilov
    See Also:
    CollectionWrapper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> marshal​(java.util.Collection<T> v)  
      java.util.Collection<T> unmarshal​(org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> v)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RestCollectionAdapter

        public RestCollectionAdapter()
      • RestCollectionAdapter

        public RestCollectionAdapter​(PersistenceContext context)
        Instantiates a new RestCollectionAdapter.
        Parameters:
        context - persistent context
    • Method Detail

      • unmarshal

        public java.util.Collection<T> unmarshal​(org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> v)
                                          throws java.lang.Exception
        Specified by:
        unmarshal in class javax.xml.bind.annotation.adapters.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>>
        Throws:
        java.lang.Exception
      • marshal

        public org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> marshal​(java.util.Collection<T> v)
                                                                                            throws java.lang.Exception
        Specified by:
        marshal in class javax.xml.bind.annotation.adapters.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>>
        Throws:
        java.lang.Exception