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

## Class ODataJPADefaultProcessor

- java.lang.Object
- - org.apache.olingo.odata2.api.processor.ODataSingleProcessor
  - - org.apache.olingo.odata2.jpa.processor.api.ODataJPAProcessor
    - - org.apache.olingo.odata2.jpa.processor.api.ODataJPADefaultProcessor

- All Implemented Interfaces:
    CustomContentType, ODataProcessorFeature, ODataProcessor, BatchProcessor, EntityComplexPropertyProcessor, EntityLinkProcessor, EntityLinksProcessor, EntityMediaProcessor, EntityProcessor, EntitySetProcessor, EntitySimplePropertyProcessor, EntitySimplePropertyValueProcessor, FunctionImportProcessor, FunctionImportValueProcessor, MetadataProcessor, ServiceDocumentProcessor
  Direct Known Subclasses:
    CustomODataJPAProcessor

      public abstract class ODataJPADefaultProcessor
      extends ODataJPAProcessor

- - ### Field Summary

    - ### Fields inherited from class org.apache.olingo.odata2.jpa.processor.api.ODataJPAProcessor

      `jpaProcessor, oDataJPAContext, responseBuilder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ODataJPADefaultProcessor(ODataJPAContext oDataJPAContext)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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.

    - ### Methods inherited from class org.apache.olingo.odata2.jpa.processor.api.ODataJPAProcessor

      `close, close, getOdataJPAContext, setOdataJPAContext`

    - ### Methods inherited from class org.apache.olingo.odata2.api.processor.ODataSingleProcessor

      `countEntityLinks, deleteEntityMedia, deleteEntitySimplePropertyValue, existsEntityLink, getContext, getCustomContentTypes, readEntityComplexProperty, readEntityMedia, readEntitySimpleProperty, readEntitySimplePropertyValue, readMetadata, readServiceDocument, setContext, updateEntityComplexProperty, updateEntityMedia, updateEntitySimpleProperty, updateEntitySimplePropertyValue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ODataJPADefaultProcessor

          public ODataJPADefaultProcessor(ODataJPAContext oDataJPAContext)

  - ### Method Detail

    - #### readEntitySet

          public ODataResponse readEntitySet(GetEntitySetUriInfo uriParserResultView,
                                             String contentType)
                                      throws ODataException

      Description copied from interface: `EntitySetProcessor`
      Reads entities.
      Specified by:
        `readEntitySet` in interface `EntitySetProcessor`
      Overrides:
        `readEntitySet` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntitySetProcessor`

    - #### readEntity

          public ODataResponse readEntity(GetEntityUriInfo uriParserResultView,
                                          String contentType)
                                   throws ODataException

      Description copied from interface: `EntityProcessor`
      Reads an entity.
      Specified by:
        `readEntity` in interface `EntityProcessor`
      Overrides:
        `readEntity` in class `ODataSingleProcessor`
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityProcessor`

    - #### countEntitySet

          public ODataResponse countEntitySet(GetEntitySetCountUriInfo uriParserResultView,
                                              String contentType)
                                       throws ODataException

      Description copied from interface: `EntitySetProcessor`
      Counts the number of requested entities.
      Specified by:
        `countEntitySet` in interface `EntitySetProcessor`
      Overrides:
        `countEntitySet` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntitySetProcessor`

    - #### existsEntity

          public ODataResponse existsEntity(GetEntityCountUriInfo uriInfo,
                                            String contentType)
                                     throws ODataException

      Description copied from interface: `EntityProcessor`
      Checks whether an entity exists.
      Specified by:
        `existsEntity` in interface `EntityProcessor`
      Overrides:
        `existsEntity` in class `ODataSingleProcessor`
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityProcessor`

    - #### createEntity

          public ODataResponse createEntity(PostUriInfo uriParserResultView,
                                            InputStream content,
                                            String requestContentType,
                                            String contentType)
                                     throws ODataException

      Description copied from interface: `EntitySetProcessor`
      Creates an entity.
      Specified by:
        `createEntity` in interface `EntitySetProcessor`
      Overrides:
        `createEntity` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `content` - the content of the request, containing the data of the new entity
        `requestContentType` - the content type of the request body
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntitySetProcessor`

    - #### updateEntity

          public ODataResponse updateEntity(PutMergePatchUriInfo uriParserResultView,
                                            InputStream content,
                                            String requestContentType,
                                            boolean merge,
                                            String contentType)
                                     throws ODataException

      Description copied from interface: `EntityProcessor`
      Updates an entity.
      Specified by:
        `updateEntity` in interface `EntityProcessor`
      Overrides:
        `updateEntity` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `content` - the content of the request, containing the updated entity data
        `requestContentType` - the content type of the request body
        `merge` - if `true`, properties not present in the data are left unchanged; if `false`, they are reset
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityProcessor`

    - #### deleteEntity

          public ODataResponse deleteEntity(DeleteUriInfo uriParserResultView,
                                            String contentType)
                                     throws ODataException

      Description copied from interface: `EntityProcessor`
      Deletes an entity.
      Specified by:
        `deleteEntity` in interface `EntityProcessor`
      Overrides:
        `deleteEntity` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - a `DeleteUriInfo` object with information from the URI parser
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityProcessor`

    - #### executeFunctionImport

          public ODataResponse executeFunctionImport(GetFunctionImportUriInfo uriParserResultView,
                                                     String contentType)
                                              throws ODataException

      Description copied from interface: `FunctionImportProcessor`
      Executes a function import and returns the result.
      Specified by:
        `executeFunctionImport` in interface `FunctionImportProcessor`
      Overrides:
        `executeFunctionImport` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `FunctionImportProcessor`

    - #### executeFunctionImportValue

          public ODataResponse executeFunctionImportValue(GetFunctionImportUriInfo uriParserResultView,
                                                          String contentType)
                                                   throws ODataException

      Description copied from interface: `FunctionImportValueProcessor`
      Returns the unformatted value of a function import.
      Specified by:
        `executeFunctionImportValue` in interface `FunctionImportValueProcessor`
      Overrides:
        `executeFunctionImportValue` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `FunctionImportValueProcessor`

    - #### readEntityLink

          public ODataResponse readEntityLink(GetEntityLinkUriInfo uriParserResultView,
                                              String contentType)
                                       throws ODataException

      Description copied from interface: `EntityLinkProcessor`
      Reads the URI of the target entity of a navigation property.
      Specified by:
        `readEntityLink` in interface `EntityLinkProcessor`
      Overrides:
        `readEntityLink` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityLinkProcessor`

    - #### readEntityLinks

          public ODataResponse readEntityLinks(GetEntitySetLinksUriInfo uriParserResultView,
                                               String contentType)
                                        throws ODataException

      Description copied from interface: `EntityLinksProcessor`
      Reads the URIs of the target entities of a navigation property.
      Specified by:
        `readEntityLinks` in interface `EntityLinksProcessor`
      Overrides:
        `readEntityLinks` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an OData response object
      Throws:
        `ODataException`
      See Also:
        `EntityLinksProcessor`

    - #### createEntityLink

          public ODataResponse createEntityLink(PostUriInfo uriParserResultView,
                                                InputStream content,
                                                String requestContentType,
                                                String contentType)
                                         throws ODataException

      Description copied from interface: `EntityLinksProcessor`
      Creates a new link to a target entity of a navigation property.
      Specified by:
        `createEntityLink` in interface `EntityLinksProcessor`
      Overrides:
        `createEntityLink` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `content` - the content of the request, containing the link data
        `requestContentType` - the content type of the request body
        `contentType` - the content type of the response
      Returns:
        an OData response object
      Throws:
        `ODataException`
      See Also:
        `EntityLinkProcessor`

    - #### updateEntityLink

          public ODataResponse updateEntityLink(PutMergePatchUriInfo uriParserResultView,
                                                InputStream content,
                                                String requestContentType,
                                                String contentType)
                                         throws ODataException

      Description copied from interface: `EntityLinkProcessor`
      Updates the link to the target entity of a navigation property.
      Specified by:
        `updateEntityLink` in interface `EntityLinkProcessor`
      Overrides:
        `updateEntityLink` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `content` - the content of the request, containing the new URI
        `requestContentType` - the content type of the request body
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityLinkProcessor`

    - #### deleteEntityLink

          public ODataResponse deleteEntityLink(DeleteUriInfo uriParserResultView,
                                                String contentType)
                                         throws ODataException

      Description copied from interface: `EntityLinkProcessor`
      Deletes the link to the target entity of a navigation property.
      Specified by:
        `deleteEntityLink` in interface `EntityLinkProcessor`
      Overrides:
        `deleteEntityLink` in class `ODataSingleProcessor`
      Parameters:
        `uriParserResultView` - information about the request URI
        `contentType` - the content type of the response
      Returns:
        an `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `EntityLinkProcessor`

    - #### executeBatch

          public ODataResponse executeBatch(BatchHandler handler,
                                            String contentType,
                                            InputStream content)
                                     throws ODataException

      Description copied from interface: `BatchProcessor`
      Executes a OData batch request and provide Batch Response as `ODataResponse`
      Specified by:
        `executeBatch` in interface `BatchProcessor`
      Overrides:
        `executeBatch` in class `ODataSingleProcessor`
      Parameters:
        `handler` - batch handler
        `contentType` - the content type of the request
        `content` - Batch Request body
      Returns:
        a `ODataResponse` object
      Throws:
        `ODataException`
      See Also:
        `BatchProcessor`

    - #### executeChangeSet

          public BatchResponsePart executeChangeSet(BatchHandler handler,
                                                    List<ODataRequest> requests)
                                             throws ODataException

      Description copied from interface: `BatchProcessor`
      Executes a Change Set and provide BatchResponsePart as `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 response
      Specified by:
        `executeChangeSet` in interface `BatchProcessor`
      Overrides:
        `executeChangeSet` in class `ODataSingleProcessor`
      Parameters:
        `handler` - batch handler
        `requests` - list of single change requests
      Returns:
        a `BatchResponsePart` object
      Throws:
        `ODataException`
      See Also:
        `BatchProcessor`

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