Module eclipselink

Class AbstractResource

    • Constructor Detail

      • AbstractResource

        protected AbstractResource()
        Default constructor.
    • Method Detail

      • setPersistenceFactory

        public void setPersistenceFactory​(PersistenceContextFactory factory)
        Sets the persistence factory.
        Parameters:
        factory - the new persistence factory
      • getPersistenceFactory

        public PersistenceContextFactory getPersistenceFactory()
        Gets the persistence factory.
        Returns:
        the persistence factory
      • buildPersistenceContextFactory

        protected PersistenceContextFactory buildPersistenceContextFactory​(ClassLoader loader)
        Builds the persistence context factory.
        Parameters:
        loader - the loader
        Returns:
        the persistence context factory
      • getMatrixParameters

        protected static Map<String,​String> getMatrixParameters​(jakarta.ws.rs.core.UriInfo info,
                                                                      String segment)
        Get a map of the matrix parameters associated with the URI path segment of the current request In JPA-RS, things that user sets (such as parameters of named queries, etc.) are treated as matrix parameters List of valid matrix parameters for JPA-RS is defined in MatrixParameters
        Parameters:
        info - the info
        segment - the segment
        Returns:
        the matrix parameters
        See Also:
        MatrixParameters
      • getQueryParameters

        public static Map<String,​Object> getQueryParameters​(jakarta.ws.rs.core.UriInfo info)
        Get the URI query parameters of the current request In JPA-RS, predefined attributes (such as eclipselink query hints) are treated as query parameters List of valid query parameters for JPA-RS is defined in QueryParameters
        Parameters:
        info - the info
        Returns:
        the query parameters
        See Also:
        QueryParameters
      • isValidVersion

        protected static boolean isValidVersion​(String version)
        Checks if is valid version.
        Parameters:
        version - the version
        Returns:
        true, if is valid version
      • getPersistenceContext

        protected PersistenceContext getPersistenceContext​(String persistenceUnit,
                                                           String entityType,
                                                           URI baseURI,
                                                           String version,
                                                           Map<String,​Object> initializationProperties)
        Gets the persistence context.
        Parameters:
        persistenceUnit - the persistence unit
        baseURI - the base uri
        version - the version
        initializationProperties - the initialization properties
        Returns:
        the persistence context
      • getRelationshipPartner

        protected String getRelationshipPartner​(Map<String,​String> matrixParams,
                                                Map<String,​Object> queryParams)
        Gets the relationship partner.
        Parameters:
        matrixParams - the matrix params
        queryParams - the query params
        Returns:
        the relationship partner
      • marshallMetadata

        protected String marshallMetadata​(Object metadata,
                                          String mediaType)
                                   throws jakarta.xml.bind.JAXBException
        Marshall metadata.
        Parameters:
        metadata - the metadata
        mediaType - the media type
        Returns:
        the string
        Throws:
        jakarta.xml.bind.JAXBException - the jAXB exception
      • setRequestUniqueId

        protected void setRequestUniqueId()