Class JPAFunctionRequestProcessor
java.lang.Object
com.sap.olingo.jpa.processor.core.processor.JPAFunctionRequestProcessor
- All Implemented Interfaces:
JPARequestProcessor
Functions as User Defined Functions, Native Query, as Criteria Builder does not provide the option to used UDFs in
the From clause.
- Author:
- Oliver Grande
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javax.persistence.criteria.CriteriaBuilderprotected JPAServiceDebuggerprotected javax.persistence.EntityManagerprotected org.apache.olingo.server.api.ODataprotected JPAODataRequestContextAccessprotected com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocumentprotected JPASerializerprotected JPAODataCRUDContextAccessprotected intprotected org.apache.olingo.server.api.uri.UriInfoResource -
Constructor Summary
ConstructorsConstructorDescriptionJPAFunctionRequestProcessor(org.apache.olingo.server.api.OData odata, JPAODataCRUDContextAccess context, JPAODataRequestContextAccess requestContext) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.olingo.commons.api.data.AnnotatableconvertResult(Object result, org.apache.olingo.commons.api.edm.EdmType returnType, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAOperation jpaOperation)protected voidcreateSuccessResponce(org.apache.olingo.server.api.ODataResponse response, org.apache.olingo.commons.api.format.ContentType responseFormat, org.apache.olingo.server.api.serializer.SerializerResult serializerResult)voidretrieveData(org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.server.api.ODataResponse response, org.apache.olingo.commons.api.format.ContentType responseFormat)protected voidserializeResult(org.apache.olingo.commons.api.edm.EdmType returnType, org.apache.olingo.server.api.ODataResponse response, org.apache.olingo.commons.api.format.ContentType responseFormat, org.apache.olingo.commons.api.data.Annotatable result, org.apache.olingo.server.api.ODataRequest request)
-
Field Details
-
em
protected final javax.persistence.EntityManager em -
sd
protected final com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAServiceDocument sd -
sessionContext
-
cb
protected final javax.persistence.criteria.CriteriaBuilder cb -
uriInfo
protected final org.apache.olingo.server.api.uri.UriInfoResource uriInfo -
serializer
-
odata
protected final org.apache.olingo.server.api.OData odata -
debugger
-
successStatusCode
protected int successStatusCode -
requestContext
-
-
Constructor Details
-
JPAFunctionRequestProcessor
public JPAFunctionRequestProcessor(org.apache.olingo.server.api.OData odata, JPAODataCRUDContextAccess context, JPAODataRequestContextAccess requestContext) throws org.apache.olingo.commons.api.ex.ODataException- Throws:
org.apache.olingo.commons.api.ex.ODataException
-
-
Method Details
-
retrieveData
public void retrieveData(org.apache.olingo.server.api.ODataRequest request, org.apache.olingo.server.api.ODataResponse response, org.apache.olingo.commons.api.format.ContentType responseFormat) throws org.apache.olingo.server.api.ODataApplicationException, org.apache.olingo.server.api.ODataLibraryException- Specified by:
retrieveDatain interfaceJPARequestProcessor- Throws:
org.apache.olingo.server.api.ODataApplicationExceptionorg.apache.olingo.server.api.ODataLibraryException
-
convertResult
protected org.apache.olingo.commons.api.data.Annotatable convertResult(Object result, org.apache.olingo.commons.api.edm.EdmType returnType, com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAOperation jpaOperation) throws org.apache.olingo.server.api.ODataApplicationException- Throws:
org.apache.olingo.server.api.ODataApplicationException
-
serializeResult
protected void serializeResult(org.apache.olingo.commons.api.edm.EdmType returnType, org.apache.olingo.server.api.ODataResponse response, org.apache.olingo.commons.api.format.ContentType responseFormat, org.apache.olingo.commons.api.data.Annotatable result, org.apache.olingo.server.api.ODataRequest request) throws ODataJPASerializerException, org.apache.olingo.server.api.serializer.SerializerException- Throws:
ODataJPASerializerExceptionorg.apache.olingo.server.api.serializer.SerializerException
-
createSuccessResponce
protected final void createSuccessResponce(org.apache.olingo.server.api.ODataResponse response, org.apache.olingo.commons.api.format.ContentType responseFormat, org.apache.olingo.server.api.serializer.SerializerResult serializerResult)
-