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 Description static classJPAMethodContext.JPAMethodContextBuilderThe abstract class is extended by specific JPA Method Context Builder to build JPA Method Context types.
-
Field Summary
Fields Modifier and Type Field Description protected ObjectenclosingObjectprotected ArrayList<JPAFunction>jpaFunction
-
Constructor Summary
Constructors Constructor Description JPAMethodContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JPAMethodContext.JPAMethodContextBuildercreateBuilder(JPQLContextType contextType, Object resultsView)the method instantiates an instance of type JPAMethodContextBuilder.ObjectgetEnclosingObject()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 voidsetEnclosingObject(Object enclosingObject)protected voidsetJpaFunction(List<JPAFunction> jpaFunctionList)
-
-
-
Field Detail
-
enclosingObject
protected Object enclosingObject
-
jpaFunction
protected ArrayList<JPAFunction> jpaFunction
-
-
Method Detail
-
getEnclosingObject
public Object getEnclosingObject()
Description copied from interface:JPAMethodContextViewThe method returns an instance of Object on which the methods/custom operations can be executed.- Specified by:
getEnclosingObjectin interfaceJPAMethodContextView- Returns:
- instance of enclosing object for the method
-
getJPAFunctionList
public List<JPAFunction> getJPAFunctionList()
Description copied from interface:JPAMethodContextViewThe method returns list of JPA functions that can be executed on the enclosing object.- Specified by:
getJPAFunctionListin interfaceJPAMethodContextView- 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
-
-