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
Modifier and TypeMethodDescriptionbuild(long jpaEntityCount) The method builds an OData response from a count representing total number of JPA Entitiesbuild(DeleteUriInfo deleteUriInfo, Object deletedObject) The method builds an OData response for an OData Delete Request from a deleted JPA Entitybuild(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.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.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.build(GetEntityUriInfo readUriInfo, Object jpaEntity, String contentType) The method builds an OData response for an OData Read Request from a read JPA Entitybuild(GetFunctionImportUriInfo functionImportUriInfo, Object result) The method builds an OData response for an OData function Import Request from a registered processor method's return parameter.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.The return parameter is a collection of objects.build(PostUriInfo postUriInfo, Object createdObject, String contentType) The method builds an OData response for an OData Create Request from a created JPA entity.build(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 Details
-
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- Caso ocorra exceção
-
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:
ODataJPARuntimeException- Caso ocorra exceçãoODataNotFoundException- Caso ocorra exceção
-
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:
ODataJPARuntimeException- Caso ocorra exceçãoODataNotFoundException- Caso ocorra exceção
-
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 EntitycontentType- Tipo- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeException- Caso ocorra exceçãoODataNotFoundException- Caso ocorra exceção
-
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:
ODataJPARuntimeException- Caso ocorra exceçãoODataNotFoundException- Caso ocorra exceção
-
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- Caso ocorra exceção
-
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 URIresultList- is a method's return parameter is a collection of objects.contentType- Tipo- Returns:
- an instance of type
ODataResponse - Throws:
ODataJPARuntimeException- Caso ocorra exceçãoODataNotFoundException- Caso ocorra exceção
-
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:
ODataNotFoundException- Caso ocorra exceçãoODataJPARuntimeException- Caso ocorra exceção
-
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- Caso ocorra exceção
-
build
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- Caso ocorra exceção
-