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

## Class JPAMethodContext

- java.lang.Object
- - org.apache.olingo.odata2.jpa.processor.api.access.JPAMethodContext

- All Implemented Interfaces:
    JPAMethodContextView

      public abstract class JPAMethodContext
      extends Object
      implements JPAMethodContextView

  The abstract class is a compilation of objects required for building specific instances of JPA Method Context. Extend this class to implement specific implementations of JPQL context types (Create,Update,Function). A JPA method Context is constructed from an OData request. Depending on OData CUD/FunctionImport operation performed on an Entity, a corresponding JPA method context object is built. The object thus built can be used for executing operations on JPA Entity/Custom processor objects.
  A default implementation is provided by the library.
  See Also:
    `JPAMethodContextView`, `JPQLContextType`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JPAMethodContext.JPAMethodContextBuilder` The abstract class is extended by specific JPA Method Context Builder to build JPA Method Context types.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Object` | `enclosingObject`
    `protected ArrayList<JPAFunction>` | `jpaFunction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JPAMethodContext()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JPAMethodContext.JPAMethodContextBuilder` | `createBuilder(JPQLContextType contextType, Object resultsView)` the method instantiates an instance of type JPAMethodContextBuilder.
    `Object` | `getEnclosingObject()` The method returns an instance of Object on which the methods/custom operations can be executed.
    `List<JPAFunction>` | `getJPAFunctionList()` The method returns list of JPA functions that can be executed on the enclosing object.
    `protected void` | `setEnclosingObject(Object enclosingObject)`
    `protected void` | `setJpaFunction(List<JPAFunction> jpaFunctionList)`

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

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

- - ### Field Detail

    - #### enclosingObject

          protected Object enclosingObject

    - #### jpaFunction

          protected ArrayList<JPAFunction> jpaFunction

  - ### Constructor Detail

    - #### JPAMethodContext

          public JPAMethodContext()

  - ### Method Detail

    - #### getEnclosingObject

          public Object getEnclosingObject()

      Description copied from interface: `JPAMethodContextView`
      The method returns an instance of Object on which the methods/custom operations can be executed.
      Specified by:
        `getEnclosingObject` in interface `JPAMethodContextView`
      Returns:
        instance of enclosing object for the method

    - #### getJPAFunctionList

          public List<JPAFunction> getJPAFunctionList()

      Description copied from interface: `JPAMethodContextView`
      The method returns list of JPA functions that can be executed on the enclosing object.
      Specified by:
        `getJPAFunctionList` in interface `JPAMethodContextView`
      Returns:
        an instance of list of JPA Function

    - #### setEnclosingObject

          protected void setEnclosingObject(Object enclosingObject)

    - #### setJpaFunction

          protected void setJpaFunction(List<JPAFunction> jpaFunctionList)

    - #### createBuilder

          public static final JPAMethodContext.JPAMethodContextBuilder createBuilder(JPQLContextType contextType,
                                                                                     Object resultsView)
                                                                              throws ODataJPARuntimeException

      the method instantiates an instance of type JPAMethodContextBuilder.
      Parameters:
        `contextType` - indicates the type of JPQLContextBuilder to instantiate.
        `resultsView` - is the OData request view
      Returns:
        `JPAMethodContext.JPAMethodContextBuilder`
      Throws:
        `ODataJPARuntimeException`

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