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>,​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
    • Constructor Detail

      • RestCollectionAdapter

        public RestCollectionAdapter()
      • RestCollectionAdapter

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

      • marshal

        public org.eclipse.persistence.internal.jpa.rs.metadata.model.CollectionWrapper<T> marshal​(Collection<T> v)
                                                                                            throws 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>,​Collection<T extends org.eclipse.persistence.internal.weaving.PersistenceWeavedRest>>
        Throws:
        Exception