Interface ODataJPAResponseBuilder
-
public interface ODataJPAResponseBuilderThe 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ODataResponsebuild(long jpaEntityCount)The method builds an OData response from a count representing total number of JPA EntitiesODataResponsebuild(DeleteUriInfo deleteUriInfo, Object deletedObject)The method builds an OData response for an OData Delete Request from a deleted JPA EntityODataResponsebuild(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.ODataResponsebuild(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.ODataResponsebuild(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.ODataResponsebuild(GetEntityUriInfo readUriInfo, Object jpaEntity, String contentType)The method builds an OData response for an OData Read Request from a read JPA EntityODataResponsebuild(GetFunctionImportUriInfo functionImportUriInfo, Object result)The method builds an OData response for an OData function Import Request from a registered processor method's return parameter.ODataResponsebuild(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.ODataResponsebuild(PostUriInfo postUriInfo, Object createdObject, String contentType)The method builds an OData response for an OData Create Request from a created JPA entity.ODataResponsebuild(PutMergePatchUriInfo putUriInfo, Object updatedObject, String contentType)The method builds an OData response for an OData Update Request from an updated JPA EntityvoidsetCount(long count)
-
-
-
Method Detail
-
setCount
void setCount(long count)
-
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 URIjpaEntities- is an empty or non empty list of queried instances of JPA EntitiescontentType- 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 URIjpaEntity- is a null or non null instances of read JPA EntitycontentType- of the response- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeExceptionODataNotFoundException
-
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 URIcreatedObject- is a null or non null instances of JPA EntitycontentType- of the response- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeExceptionODataNotFoundException
-
build
ODataResponse build(PutMergePatchUriInfo putUriInfo, Object updatedObject, String contentType) 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 URIupdatedObject- is an updated instance of JPA Entity- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeExceptionODataNotFoundException
-
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 URIdeletedObject- is an null or non null instance of deleted JPA Entity. Null implies Entity not found.- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeExceptionODataNotFoundException
-
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 URIresult- 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 URIresult- is a method's return parameter is a collection of objects.- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeExceptionODataNotFoundException
-
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 URIjpaEntity- 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:
ODataNotFoundExceptionODataJPARuntimeException
-
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 URIjpaEntity- is an empty or non empty list of queried JPA EntitiescontentType- 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
-
-