Class FeatureResponseBuilderImpl

java.lang.Object
org.eclipse.persistence.jpa.rs.features.FeatureResponseBuilderImpl
All Implemented Interfaces:
FeatureResponseBuilder
Direct Known Subclasses:
PagingResponseBuilder, SelfLinksResponseBuilder

public class FeatureResponseBuilderImpl extends Object implements FeatureResponseBuilder
Response builder used in JPARS 1.0 and earlier versions.
Author:
gonural
  • Constructor Details

    • FeatureResponseBuilderImpl

      public FeatureResponseBuilderImpl()
  • Method Details

    • buildReadAllQueryResponse

      public Object buildReadAllQueryResponse(PersistenceContext context, Map<String,Object> queryParams, List<Object> items, jakarta.ws.rs.core.UriInfo uriInfo)
      Description copied from interface: FeatureResponseBuilder
      Builds the read all query response.
      Specified by:
      buildReadAllQueryResponse in interface FeatureResponseBuilder
      Parameters:
      context - the context
      queryParams - the query params
      items - the items
      uriInfo - the uri info
      Returns:
      the object
    • buildReportQueryResponse

      public Object buildReportQueryResponse(PersistenceContext context, Map<String,Object> queryParams, List<Object[]> results, List<org.eclipse.persistence.internal.queries.ReportItem> items, jakarta.ws.rs.core.UriInfo uriInfo)
      Description copied from interface: FeatureResponseBuilder
      Builds the report query response.
      Specified by:
      buildReportQueryResponse in interface FeatureResponseBuilder
      Parameters:
      context - the context
      queryParams - the query params
      results - the results
      items - the items
      uriInfo - the uri info
      Returns:
      the object
    • buildAttributeResponse

      public Object buildAttributeResponse(PersistenceContext context, Map<String,Object> queryParams, String attribute, Object result, jakarta.ws.rs.core.UriInfo uriInfo)
      Description copied from interface: FeatureResponseBuilder
      Builds the attribute response.
      Specified by:
      buildAttributeResponse in interface FeatureResponseBuilder
      Parameters:
      context - the context
      queryParams - the query params
      attribute - the attribute
      result - the results
      uriInfo - the uri info
      Returns:
      the object
    • buildSingleResultQueryResponse

      public Object buildSingleResultQueryResponse(PersistenceContext context, Map<String,Object> queryParams, Object result, List<org.eclipse.persistence.internal.queries.ReportItem> items, jakarta.ws.rs.core.UriInfo uriInfo)
      Description copied from interface: FeatureResponseBuilder
      Builds the single result query response.
      Specified by:
      buildSingleResultQueryResponse in interface FeatureResponseBuilder
      Parameters:
      context - the context
      queryParams - the query params
      result - the result
      items - the report items (result of ReportQuery)
      uriInfo - the uri info
      Returns:
      the response
    • buildSingleEntityResponse

      public Object buildSingleEntityResponse(PersistenceContext context, Map<String,Object> queryParams, Object result, jakarta.ws.rs.core.UriInfo uriInfo)
      Description copied from interface: FeatureResponseBuilder
      Builds the single entity response.
      Specified by:
      buildSingleEntityResponse in interface FeatureResponseBuilder
      Parameters:
      context - the context
      queryParams - the query params
      result - the result
      uriInfo - the uri info
      Returns:
      the object
    • createShellJAXBElementList

      public List<jakarta.xml.bind.JAXBElement<?>> createShellJAXBElementList(List<org.eclipse.persistence.internal.queries.ReportItem> reportItems, Object record)
      Creates the shell jaxb element list.
      Parameters:
      reportItems - the report items
      record - the record
      Returns:
      the list. Returns an empty list if reportItems is null or empty.