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
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
FieldsModifier and TypeFieldDescriptionprotected JPAProcessorAn instance ofJPAProcessor.protected ODataJPAContextAn instance ofODataJPAContextobjectprotected ODataJPAResponseBuilderAn instance ofODataJPAResponseBuilder. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(boolean forceClose) The method closes ThreadContext.voidsetOdataJPAContext(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
-
Field Details
-
oDataJPAContext
An instance ofODataJPAContextobject -
jpaProcessor
An instance ofJPAProcessor. The instance is created usingJPAAccessFactory. -
responseBuilder
An instance ofODataJPAResponseBuilder. The instance is created usingODataJPAAccessFactory.
-
-
Constructor Details
-
ODataJPAProcessor
Constructor- Parameters:
oDataJPAContext- non null OData JPA Context object
-
-
Method Details
-
getOdataJPAContext
-
setOdataJPAContext
-
close
public void close(boolean forceClose) The method closes ThreadContext. It is mandatory to call this method to avoid memory leaks. ATTENTION: IfisContainerManagedis set totrueat the ODataJPAContext only the cleanup is run but the EntityManager is not closed.- Parameters:
forceClose- Se forçar fechar
-
close
public void close()
-