org.apache.olingo.odata2.jpa.processor.api
Interface ODataJPAResponseBuilder


public interface ODataJPAResponseBuilder

The interface provides methods for building an OData response from a JPA Entity. Implement this interface for building an OData response from a JPA Entity.


Method Summary
 ODataResponse build(DeleteUriInfo deleteUriInfo, Object deletedObject)
          The method builds an OData response for an OData Delete Request from a deleted JPA Entity
 ODataResponse build(GetEntityLinkUriInfo readLinkUriInfo, Object jpaEntity, String contentType)
          The method builds an OData response for an OData Read Link Request from a read JPA Entity and its related JPA Entities.
 ODataResponse build(GetEntitySetLinksUriInfo queryLinkUriInfo, List<Object> jpaEntity, String contentType)
          The method builds an OData response for an OData Query Link Request from a queried JPA Entity and its related JPA Entities.
 ODataResponse build(GetEntitySetUriInfo queryUriInfo, List<Object> jpaEntities, String contentType)
          The method builds an OData response for an OData Query Request from a queried list of JPA Entities.
 ODataResponse build(GetEntityUriInfo readUriInfo, Object jpaEntity, String contentType)
          The method builds an OData response for an OData Read Request from a read JPA Entity
 ODataResponse build(GetFunctionImportUriInfo functionImportUriInfo, List<Object> resultList, String contentType)
          The method builds an OData response for an OData function Import Request from a registered processor method's return parameter.
 ODataResponse build(GetFunctionImportUriInfo functionImportUriInfo, Object result)
          The method builds an OData response for an OData function Import Request from a registered processor method's return parameter.
 ODataResponse build(long jpaEntityCount)
          The method builds an OData response from a count representing total number of JPA Entities
 ODataResponse build(PostUriInfo postUriInfo, Object createdObject, String contentType)
          The method builds an OData response for an OData Create Request from a created JPA entity.
 ODataResponse build(PutMergePatchUriInfo putUriInfo, Object updatedObject)
          The method builds an OData response for an OData Update Request from an updated JPA Entity
 

Method Detail

build

ODataResponse build(GetEntitySetUriInfo queryUriInfo,
                    List<Object> jpaEntities,
                    String contentType)
                    throws ODataJPARuntimeException
The method builds an OData response for an OData Query Request from a queried list of JPA Entities.

Parameters:
queryUriInfo - is an information about the request URI
jpaEntities - is an empty or non empty list of queried instances of JPA Entities
contentType - of the response
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException

build

ODataResponse build(GetEntityUriInfo readUriInfo,
                    Object jpaEntity,
                    String contentType)
                    throws ODataJPARuntimeException,
                           ODataNotFoundException
The method builds an OData response for an OData Read Request from a read JPA Entity

Parameters:
readUriInfo - is an information about the request URI
jpaEntity - is a null or non null instances of read JPA Entity
contentType - of the response
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException
ODataNotFoundException

build

ODataResponse build(PostUriInfo postUriInfo,
                    Object createdObject,
                    String contentType)
                    throws ODataJPARuntimeException,
                           ODataNotFoundException
The method builds an OData response for an OData Create Request from a created JPA entity.

Parameters:
postUriInfo - is an information about the request URI
createdObject - is a null or non null instances of JPA Entity
contentType - of the response
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException
ODataNotFoundException

build

ODataResponse build(PutMergePatchUriInfo putUriInfo,
                    Object updatedObject)
                    throws ODataJPARuntimeException,
                           ODataNotFoundException
The method builds an OData response for an OData Update Request from an updated JPA Entity

Parameters:
putUriInfo - is an information about the request URI
updatedObject - is an updated instance of JPA Entity
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException
ODataNotFoundException

build

ODataResponse build(DeleteUriInfo deleteUriInfo,
                    Object deletedObject)
                    throws ODataJPARuntimeException,
                           ODataNotFoundException
The method builds an OData response for an OData Delete Request from a deleted JPA Entity

Parameters:
deleteUriInfo - is an information about the request URI
deletedObject - is an null or non null instance of deleted JPA Entity. Null implies Entity not found.
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException
ODataNotFoundException

build

ODataResponse build(GetFunctionImportUriInfo functionImportUriInfo,
                    Object result)
                    throws ODataJPARuntimeException
The method builds an OData response for an OData function Import Request from a registered processor method's return parameter.

Parameters:
functionImportUriInfo - is an information about the request URI
result - is a method's return parameter
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException

build

ODataResponse build(GetFunctionImportUriInfo functionImportUriInfo,
                    List<Object> resultList,
                    String contentType)
                    throws ODataJPARuntimeException,
                           ODataNotFoundException
The method builds an OData response for an OData function Import Request from a registered processor method's return parameter. The return parameter is a collection of objects.

Parameters:
functionImportUriInfo - is an information about the request URI
result - is a method's return parameter is a collection of objects.
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException
ODataNotFoundException

build

ODataResponse build(GetEntityLinkUriInfo readLinkUriInfo,
                    Object jpaEntity,
                    String contentType)
                    throws ODataNotFoundException,
                           ODataJPARuntimeException
The method builds an OData response for an OData Read Link Request from a read JPA Entity and its related JPA Entities.

Parameters:
readLinkUriInfo - is an information about the request URI
jpaEntity - is a null or non null read JPA Entity and its related JPA Entities.
contentType - of the response
Returns:
an instance of type ODataResponse
Throws:
ODataNotFoundException
ODataJPARuntimeException

build

ODataResponse build(GetEntitySetLinksUriInfo queryLinkUriInfo,
                    List<Object> jpaEntity,
                    String contentType)
                    throws ODataJPARuntimeException
The method builds an OData response for an OData Query Link Request from a queried JPA Entity and its related JPA Entities.

Parameters:
queryLinkUriInfo - is an information about the request URI
jpaEntity - is an empty or non empty list of queried JPA Entities
contentType - of the response
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException

build

ODataResponse build(long jpaEntityCount)
                    throws ODataJPARuntimeException
The method builds an OData response from a count representing total number of JPA Entities

Parameters:
jpaEntityCount - is the count value
Returns:
an instance of type ODataResponse
Throws:
ODataJPARuntimeException


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.