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

## Class ODataJPAProcessor

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

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

      public abstract class ODataJPAProcessor
      extends ODataSingleProcessor

  Extend this class and implement an OData JPA processor if the default behavior of OData JPA Processor library has to be overwritten. The class encapsulates a default processor for handling OData requests and a default builder to build an OData response.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JPAProcessor` | `jpaProcessor` An instance of `JPAProcessor`.
    `protected ODataJPAContext` | `oDataJPAContext` An instance of `ODataJPAContext` object
    `protected ODataJPAResponseBuilder` | `responseBuilder` An instance of `ODataJPAResponseBuilder`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ODataJPAProcessor(ODataJPAContext oDataJPAContext)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `close(boolean forceClose)` The method closes ThreadContext.
    `ODataJPAContext` | `getOdataJPAContext()`
    `void` | `setOdataJPAContext(ODataJPAContext odataJPAContext)`

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

      `countEntityLinks, countEntitySet, createEntity, createEntityLink, deleteEntity, deleteEntityLink, deleteEntityMedia, deleteEntitySimplePropertyValue, executeBatch, executeChangeSet, executeFunctionImport, executeFunctionImportValue, existsEntity, existsEntityLink, getContext, getCustomContentTypes, readEntity, readEntityComplexProperty, readEntityLink, readEntityLinks, readEntityMedia, readEntitySet, readEntitySimpleProperty, readEntitySimplePropertyValue, readMetadata, readServiceDocument, setContext, updateEntity, updateEntityComplexProperty, updateEntityLink, updateEntityMedia, updateEntitySimpleProperty, updateEntitySimplePropertyValue`

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

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

- - ### Field Detail

    - #### oDataJPAContext

          protected ODataJPAContext oDataJPAContext

      An instance of `ODataJPAContext` object

    - #### jpaProcessor

          protected JPAProcessor jpaProcessor

      An instance of `JPAProcessor`. The instance is created using `JPAAccessFactory`.

    - #### responseBuilder

          protected ODataJPAResponseBuilder responseBuilder

      An instance of `ODataJPAResponseBuilder`. The instance is created using `ODataJPAAccessFactory`.

  - ### Constructor Detail

    - #### ODataJPAProcessor

          public ODataJPAProcessor(ODataJPAContext oDataJPAContext)

      Constructor
      Parameters:
        `oDataJPAContext` - non null OData JPA Context object

  - ### Method Detail

    - #### getOdataJPAContext

          public ODataJPAContext getOdataJPAContext()

    - #### setOdataJPAContext

          public void setOdataJPAContext(ODataJPAContext odataJPAContext)

    - #### close

          public void close(boolean forceClose)

      The method closes ThreadContext. It is mandatory to call this method to avoid memory leaks.

      ATTENTION: If `isContainerManaged` is set to `true` at the ODataJPAContext only the cleanup is run but the EntityManager is not closed.

    - #### close

          public void close()

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