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 java.lang.Object implements FeatureResponseBuilder
Response builder used in JPARS 1.0 and earlier versions.- Author:
- gonural
-
-
Constructor Summary
Constructors Constructor Description FeatureResponseBuilderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
buildAttributeResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.lang.String attribute, java.lang.Object result, javax.ws.rs.core.UriInfo uriInfo)
Builds the attribute response.java.lang.Object
buildReadAllQueryResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.util.List<java.lang.Object> items, javax.ws.rs.core.UriInfo uriInfo)
Builds the read all query response.java.lang.Object
buildReportQueryResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.util.List<java.lang.Object[]> results, java.util.List<org.eclipse.persistence.internal.queries.ReportItem> items, javax.ws.rs.core.UriInfo uriInfo)
Builds the report query response.java.lang.Object
buildSingleEntityResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.lang.Object result, javax.ws.rs.core.UriInfo uriInfo)
Builds the single entity response.java.lang.Object
buildSingleResultQueryResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.lang.Object result, java.util.List<org.eclipse.persistence.internal.queries.ReportItem> items, javax.ws.rs.core.UriInfo uriInfo)
Builds the single result query response.java.util.List<JAXBElement>
createShellJAXBElementList(java.util.List<org.eclipse.persistence.internal.queries.ReportItem> reportItems, java.lang.Object record)
Creates the shell jaxb element list.
-
-
-
Method Detail
-
buildReadAllQueryResponse
public java.lang.Object buildReadAllQueryResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.util.List<java.lang.Object> items, javax.ws.rs.core.UriInfo uriInfo)
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 java.lang.Object buildReportQueryResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.util.List<java.lang.Object[]> results, java.util.List<org.eclipse.persistence.internal.queries.ReportItem> items, javax.ws.rs.core.UriInfo uriInfo)
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 java.lang.Object buildAttributeResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.lang.String attribute, java.lang.Object result, javax.ws.rs.core.UriInfo uriInfo)
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 java.lang.Object buildSingleResultQueryResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.lang.Object result, java.util.List<org.eclipse.persistence.internal.queries.ReportItem> items, javax.ws.rs.core.UriInfo uriInfo)
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 java.lang.Object buildSingleEntityResponse(PersistenceContext context, java.util.Map<java.lang.String,java.lang.Object> queryParams, java.lang.Object result, javax.ws.rs.core.UriInfo uriInfo)
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 java.util.List<JAXBElement> createShellJAXBElementList(java.util.List<org.eclipse.persistence.internal.queries.ReportItem> reportItems, java.lang.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.
-
-