Class FeatureResponseBuilderImpl
java.lang.Object
org.eclipse.persistence.jpa.rs.features.FeatureResponseBuilderImpl
- All Implemented Interfaces:
FeatureResponseBuilder
- Direct Known Subclasses:
PagingResponseBuilder,SelfLinksResponseBuilder
Response builder used in JPARS 1.0 and earlier versions.
- Author:
- gonural
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildAttributeResponse(PersistenceContext context, Map<String, Object> queryParams, String attribute, Object result, jakarta.ws.rs.core.UriInfo uriInfo) Builds the attribute response.buildReadAllQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object> items, jakarta.ws.rs.core.UriInfo uriInfo) Builds the read all query response.buildReportQueryResponse(PersistenceContext context, Map<String, Object> queryParams, List<Object[]> results, List<org.eclipse.persistence.internal.queries.ReportItem> items, jakarta.ws.rs.core.UriInfo uriInfo) Builds the report query response.buildSingleEntityResponse(PersistenceContext context, Map<String, Object> queryParams, Object result, jakarta.ws.rs.core.UriInfo uriInfo) Builds the single entity response.buildSingleResultQueryResponse(PersistenceContext context, Map<String, Object> queryParams, Object result, List<org.eclipse.persistence.internal.queries.ReportItem> items, jakarta.ws.rs.core.UriInfo uriInfo) Builds the single result query response.List<jakarta.xml.bind.JAXBElement<?>>createShellJAXBElementList(List<org.eclipse.persistence.internal.queries.ReportItem> reportItems, Object record) Creates the shell jaxb element list.
-
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:FeatureResponseBuilderBuilds the read all query response.- Specified by:
buildReadAllQueryResponsein interfaceFeatureResponseBuilder- Parameters:
context- the contextqueryParams- the query paramsitems- the itemsuriInfo- 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:FeatureResponseBuilderBuilds the report query response.- Specified by:
buildReportQueryResponsein interfaceFeatureResponseBuilder- Parameters:
context- the contextqueryParams- the query paramsresults- the resultsitems- the itemsuriInfo- 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:FeatureResponseBuilderBuilds the attribute response.- Specified by:
buildAttributeResponsein interfaceFeatureResponseBuilder- Parameters:
context- the contextqueryParams- the query paramsattribute- the attributeresult- the resultsuriInfo- 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:FeatureResponseBuilderBuilds the single result query response.- Specified by:
buildSingleResultQueryResponsein interfaceFeatureResponseBuilder- Parameters:
context- the contextqueryParams- the query paramsresult- the resultitems- 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:FeatureResponseBuilderBuilds the single entity response.- Specified by:
buildSingleEntityResponsein interfaceFeatureResponseBuilder- Parameters:
context- the contextqueryParams- the query paramsresult- the resulturiInfo- 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 itemsrecord- the record- Returns:
- the list. Returns an empty list if reportItems is null or empty.
-