public abstract class ODataJPADefaultProcessor extends ODataJPAProcessor
jpaProcessor, oDataJPAContext, responseBuilder
Constructor and Description |
---|
ODataJPADefaultProcessor(ODataJPAContext oDataJPAContext) |
Modifier and Type | Method and Description |
---|---|
ODataResponse |
countEntitySet(GetEntitySetCountUriInfo uriParserResultView,
String contentType)
Counts the number of requested entities.
|
ODataResponse |
createEntity(PostUriInfo uriParserResultView,
InputStream content,
String requestContentType,
String contentType)
Creates an entity.
|
ODataResponse |
createEntityLink(PostUriInfo uriParserResultView,
InputStream content,
String requestContentType,
String contentType)
Creates a new link to a target entity of a navigation property.
|
ODataResponse |
deleteEntity(DeleteUriInfo uriParserResultView,
String contentType)
Deletes an entity.
|
ODataResponse |
deleteEntityLink(DeleteUriInfo uriParserResultView,
String contentType)
Deletes the link to the target entity of a navigation property.
|
ODataResponse |
executeBatch(BatchHandler handler,
String contentType,
InputStream content)
Executes a OData batch request and provide Batch Response as
ODataResponse |
BatchResponsePart |
executeChangeSet(BatchHandler handler,
List<ODataRequest> requests)
Executes a Change Set and provide BatchResponsePart as
BatchResponsePart that contains the responses to
change requests. |
ODataResponse |
executeFunctionImport(GetFunctionImportUriInfo uriParserResultView,
String contentType)
Executes a function import and returns the result.
|
ODataResponse |
executeFunctionImportValue(GetFunctionImportUriInfo uriParserResultView,
String contentType)
Returns the unformatted value of a function import.
|
ODataResponse |
existsEntity(GetEntityCountUriInfo uriInfo,
String contentType)
Checks whether an entity exists.
|
ODataResponse |
readEntity(GetEntityUriInfo uriParserResultView,
String contentType)
Reads an entity.
|
ODataResponse |
readEntityLink(GetEntityLinkUriInfo uriParserResultView,
String contentType)
Reads the URI of the target entity of a navigation property.
|
ODataResponse |
readEntityLinks(GetEntitySetLinksUriInfo uriParserResultView,
String contentType)
Reads the URIs of the target entities of a navigation property.
|
ODataResponse |
readEntitySet(GetEntitySetUriInfo uriParserResultView,
String contentType)
Reads entities.
|
ODataResponse |
updateEntity(PutMergePatchUriInfo uriParserResultView,
InputStream content,
String requestContentType,
boolean merge,
String contentType)
Updates an entity.
|
ODataResponse |
updateEntityLink(PutMergePatchUriInfo uriParserResultView,
InputStream content,
String requestContentType,
String contentType)
Updates the link to the target entity of a navigation property.
|
close, close, getOdataJPAContext, setOdataJPAContext
countEntityLinks, deleteEntityMedia, deleteEntitySimplePropertyValue, existsEntityLink, getContext, getCustomContentTypes, readEntityComplexProperty, readEntityMedia, readEntitySimpleProperty, readEntitySimplePropertyValue, readMetadata, readServiceDocument, setContext, updateEntityComplexProperty, updateEntityMedia, updateEntitySimpleProperty, updateEntitySimplePropertyValue
public ODataJPADefaultProcessor(ODataJPAContext oDataJPAContext)
public ODataResponse readEntitySet(GetEntitySetUriInfo uriParserResultView, String contentType) throws ODataException
EntitySetProcessor
readEntitySet
in interface EntitySetProcessor
readEntitySet
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntitySetProcessor
public ODataResponse readEntity(GetEntityUriInfo uriParserResultView, String contentType) throws ODataException
EntityProcessor
readEntity
in interface EntityProcessor
readEntity
in class ODataSingleProcessor
contentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse countEntitySet(GetEntitySetCountUriInfo uriParserResultView, String contentType) throws ODataException
EntitySetProcessor
countEntitySet
in interface EntitySetProcessor
countEntitySet
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntitySetProcessor
public ODataResponse existsEntity(GetEntityCountUriInfo uriInfo, String contentType) throws ODataException
EntityProcessor
existsEntity
in interface EntityProcessor
existsEntity
in class ODataSingleProcessor
contentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse createEntity(PostUriInfo uriParserResultView, InputStream content, String requestContentType, String contentType) throws ODataException
EntitySetProcessor
createEntity
in interface EntitySetProcessor
createEntity
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontent
- the content of the request, containing the data of the new entityrequestContentType
- the content type of the request bodycontentType
- the content type of the responseODataResponse
objectODataException
EntitySetProcessor
public ODataResponse updateEntity(PutMergePatchUriInfo uriParserResultView, InputStream content, String requestContentType, boolean merge, String contentType) throws ODataException
EntityProcessor
updateEntity
in interface EntityProcessor
updateEntity
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontent
- the content of the request, containing the updated entity datarequestContentType
- the content type of the request bodymerge
- if true
, properties not present in the data are left unchanged;
if false
, they are resetcontentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse deleteEntity(DeleteUriInfo uriParserResultView, String contentType) throws ODataException
EntityProcessor
deleteEntity
in interface EntityProcessor
deleteEntity
in class ODataSingleProcessor
uriParserResultView
- a DeleteUriInfo
object with information from the URI parsercontentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse executeFunctionImport(GetFunctionImportUriInfo uriParserResultView, String contentType) throws ODataException
FunctionImportProcessor
executeFunctionImport
in interface FunctionImportProcessor
executeFunctionImport
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
FunctionImportProcessor
public ODataResponse executeFunctionImportValue(GetFunctionImportUriInfo uriParserResultView, String contentType) throws ODataException
FunctionImportValueProcessor
executeFunctionImportValue
in interface FunctionImportValueProcessor
executeFunctionImportValue
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
FunctionImportValueProcessor
public ODataResponse readEntityLink(GetEntityLinkUriInfo uriParserResultView, String contentType) throws ODataException
EntityLinkProcessor
readEntityLink
in interface EntityLinkProcessor
readEntityLink
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse readEntityLinks(GetEntitySetLinksUriInfo uriParserResultView, String contentType) throws ODataException
EntityLinksProcessor
readEntityLinks
in interface EntityLinksProcessor
readEntityLinks
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataException
EntityLinksProcessor
public ODataResponse createEntityLink(PostUriInfo uriParserResultView, InputStream content, String requestContentType, String contentType) throws ODataException
EntityLinksProcessor
createEntityLink
in interface EntityLinksProcessor
createEntityLink
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontent
- the content of the request, containing the link datarequestContentType
- the content type of the request bodycontentType
- the content type of the responseODataException
EntityLinkProcessor
public ODataResponse updateEntityLink(PutMergePatchUriInfo uriParserResultView, InputStream content, String requestContentType, String contentType) throws ODataException
EntityLinkProcessor
updateEntityLink
in interface EntityLinkProcessor
updateEntityLink
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontent
- the content of the request, containing the new URIrequestContentType
- the content type of the request bodycontentType
- the content type of the responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse deleteEntityLink(DeleteUriInfo uriParserResultView, String contentType) throws ODataException
EntityLinkProcessor
deleteEntityLink
in interface EntityLinkProcessor
deleteEntityLink
in class ODataSingleProcessor
uriParserResultView
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse executeBatch(BatchHandler handler, String contentType, InputStream content) throws ODataException
BatchProcessor
ODataResponse
executeBatch
in interface BatchProcessor
executeBatch
in class ODataSingleProcessor
handler
- batch handlercontentType
- the content type of the requestcontent
- Batch Request bodyODataResponse
objectODataException
BatchProcessor
public BatchResponsePart executeChangeSet(BatchHandler handler, List<ODataRequest> requests) throws ODataException
BatchProcessor
BatchResponsePart
that contains the responses to
change requests.
The method has to define a rollback semantic that may be applied when a request within a Change Set fails
(all-or-nothing requirement).
If a request within a Change Set fails, instead of Change Set Response should be returned the error responseexecuteChangeSet
in interface BatchProcessor
executeChangeSet
in class ODataSingleProcessor
handler
- batch handlerrequests
- list of single change requestsBatchResponsePart
objectODataException
BatchProcessor
Copyright © 2013-2017 The Apache Software Foundation. All Rights Reserved.