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
-
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:FeatureResponseBuilder
Builds the read all query response.- Specified by:
buildReadAllQueryResponse
in 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:FeatureResponseBuilder
Builds the report query response.- Specified by:
buildReportQueryResponse
in 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:FeatureResponseBuilder
Builds the attribute response.- Specified by:
buildAttributeResponse
in 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:FeatureResponseBuilder
Builds the single result query response.- Specified by:
buildSingleResultQueryResponse
in 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:FeatureResponseBuilder
Builds the single entity response.- Specified by:
buildSingleEntityResponse
in 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.
-