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

## Interface JPAProcessor

-     public interface JPAProcessor

  The interface provides methods for processing OData Requests for Create, Read, Update, Delete operations. Pass the OData request or parsed OData request (Map of properties) as request. A JPA entity is returned as a response.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `process(DeleteUriInfo deleteuriInfo, String contentType)` Processes OData request for deleting Entity.
    `long` | `process(GetEntityCountUriInfo resultsView)` Processes OData request for fetching Entity count.
    `Object` | `process(GetEntityLinkUriInfo uriParserResultView)` Processes OData request for executing $links OData command for N:1 relation.
    `long` | `process(GetEntitySetCountUriInfo requestView)` Processes OData request for fetching Entity count.
    `<T> List<T>` | `process(GetEntitySetLinksUriInfo uriParserResultView)` Processes OData request for executing $links OData command for N:1 relation.
    `<T> List<T>` | `process(GetEntitySetUriInfo requestView)` Processes OData request for querying an Entity Set.
    `<T> Object` | `process(GetEntityUriInfo requestView)` Processes OData request for reading an Entity.
    `List<Object>` | `process(GetFunctionImportUriInfo requestView)` Processes OData request for executing custom operations.
    `Object` | `process(PostUriInfo createView, InputStream content, String requestContentType)` Processes OData request for creating Entity.
    `void` | `process(PostUriInfo uriParserResultView, InputStream content, String requestContentType, String contentType)` Process OData request for creating Links.
    `Object` | `process(PostUriInfo createView, Map<String,Object> content)` Processes OData request for creating Entity.
    `Object` | `process(PutMergePatchUriInfo updateView, InputStream content, String requestContentType)` Processes OData request for updating Entity.
    `void` | `process(PutMergePatchUriInfo uriParserResultView, InputStream content, String requestContentType, String contentType)` Process OData request for updating Links.
    `Object` | `process(PutMergePatchUriInfo updateView, Map<String,Object> content)` Processes OData request for updating Entity.

- - ### Method Detail

    - #### process

          <T> List<T> process(GetEntitySetUriInfo requestView)
                       throws ODataJPAModelException,
                              ODataJPARuntimeException

      Processes OData request for querying an Entity Set. The method returns list of Objects of type representing JPA Entity Types.
      Type Parameters:
        `T` - Template parameter representing Java Persistence Entity Type.

        Note:- Default parameter is Object.

      Parameters:
        `requestView` - is an OData request for querying an entity set

      Returns:
        list of objects representing JPA entity types
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          <T> Object process(GetEntityUriInfo requestView)
                      throws ODataJPAModelException,
                             ODataJPARuntimeException

      Processes OData request for reading an Entity. The method returns an Object of type representing JPA Entity Type.
      Type Parameters:
        `T` - Template parameter representing Java Persistence Entity Type.

        Note:- Default parameter is Object.

      Parameters:
        `requestView` - OData request for reading an entity

      Returns:
        object representing JPA entity type
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          long process(GetEntitySetCountUriInfo requestView)
                throws ODataJPAModelException,
                       ODataJPARuntimeException

      Processes OData request for fetching Entity count. The method returns JPA Entity count
      Parameters:
        `requestView` - OData request for counting an entity set
      Returns:
        long value representing count of JPA entity set
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          long process(GetEntityCountUriInfo resultsView)
                throws ODataJPAModelException,
                       ODataJPARuntimeException

      Processes OData request for fetching Entity count. The method returns count of target entity. This is specific to situation where cardinality is 1:1
      Parameters:
        `resultsView` - OData request for counting target entity.
      Returns:
        long value representing count of JPA entity
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          List<Object> process(GetFunctionImportUriInfo requestView)
                        throws ODataJPAModelException,
                               ODataJPARuntimeException

      Processes OData request for executing custom operations. The method returns a List of Object. The list contains one entry if the the custom operations return type has multiplicity of ONE.
      Parameters:
        `requestView` - OData request for executing function import
      Returns:
        result of executing function import
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          Object process(GetEntityLinkUriInfo uriParserResultView)
                  throws ODataJPAModelException,
                         ODataJPARuntimeException

      Processes OData request for executing $links OData command for N:1 relation. The method returns an Object of type representing OData entity.
      Parameters:
        `uriParserResultView` - OData request for Entity Link URI
      Returns:
        an object representing JPA entity
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          <T> List<T> process(GetEntitySetLinksUriInfo uriParserResultView)
                       throws ODataJPAModelException,
                              ODataJPARuntimeException

      Processes OData request for executing $links OData command for N:1 relation. The method returns an Object of type representing OData entity.
      Parameters:
        `uriParserResultView` - OData request for Entity Set Link URI
      Returns:
        a list of object representing JPA entities
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          Object process(PostUriInfo createView,
                         InputStream content,
                         String requestContentType)
                  throws ODataJPAModelException,
                         ODataJPARuntimeException

      Processes OData request for creating Entity. The method returns an Object which is created. A Null reference implies object was not created.
      Parameters:
        `createView` -
        `content` -
        `requestContentType` -
      Returns:
        Created Object
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          Object process(PostUriInfo createView,
                         Map<String,Object> content)
                  throws ODataJPAModelException,
                         ODataJPARuntimeException

      Processes OData request for creating Entity. The method expects a parsed OData request which is a Map of properties. The method returns an Object that is created. A Null reference implies object was not created.
      Parameters:
        `createView` -
        `content` -
      Returns:
        Created Object
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          Object process(PutMergePatchUriInfo updateView,
                         InputStream content,
                         String requestContentType)
                  throws ODataJPAModelException,
                         ODataJPARuntimeException

      Processes OData request for updating Entity. The method returns an Object which is updated. A Null reference implies object was not created.
      Parameters:
        `updateView` -
        `content` -
        `requestContentType` -
      Returns:
        Deleted Object
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          Object process(PutMergePatchUriInfo updateView,
                         Map<String,Object> content)
                  throws ODataJPAModelException,
                         ODataJPARuntimeException

      Processes OData request for updating Entity. The method returns an Object which is updated. A Null reference implies object was not created.
      Parameters:
        `updateView` -
        `content` -
      Returns:
        Deleted Object
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          Object process(DeleteUriInfo deleteuriInfo,
                         String contentType)
                  throws ODataJPAModelException,
                         ODataJPARuntimeException

      Processes OData request for deleting Entity. The method returns an Object which is deleted. A Null reference implies object was not created.
      Parameters:
        `deleteuriInfo` -
        `contentType` -
      Returns:
        Deleted Object
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### process

          void process(PostUriInfo uriParserResultView,
                       InputStream content,
                       String requestContentType,
                       String contentType)
                throws ODataJPARuntimeException,
                       ODataJPAModelException

      Process OData request for creating Links. The OData request should contain $links OData command.
      Parameters:
        `uriParserResultView` - OData request for creating Links
        `content` -
        `requestContentType` -
        `contentType` -
      Throws:
        `ODataJPARuntimeException`
        `ODataJPAModelException`

    - #### process

          void process(PutMergePatchUriInfo uriParserResultView,
                       InputStream content,
                       String requestContentType,
                       String contentType)
                throws ODataJPARuntimeException,
                       ODataJPAModelException

      Process OData request for updating Links. The OData request should contain $links OData command.
      Parameters:
        `uriParserResultView` - OData request for updating Links
        `content` -
        `requestContentType` -
        `contentType` -
      Throws:
        `ODataJPARuntimeException`
        `ODataJPAModelException`

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