Class QueryExtensionEntityListener


  • public class QueryExtensionEntityListener
    extends org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean authorizeProperty​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, org.apache.olingo.odata2.api.edm.EdmProperty property)  
      boolean authorizeProperty​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, org.apache.olingo.odata2.api.edm.EdmProperty property, String method)  
      boolean canOverrideDelete​(org.apache.olingo.odata2.api.uri.UriInfo infoView)  
      boolean canOverridePost​(org.apache.olingo.odata2.api.uri.UriInfo infoView)  
      boolean canOverridePut​(org.apache.olingo.odata2.api.uri.UriInfo infoView)  
      boolean canRefreshEntity​(org.apache.olingo.odata2.api.uri.UriInfo infoView)  
      void checkAuthorization​(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo deleteView)  
      void checkAuthorization​(org.apache.olingo.odata2.api.uri.info.PostUriInfo postView)  
      void checkAuthorization​(org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo putView)  
      void checkEntityGetAuthorization​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType)  
      void checkFilter​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, org.apache.olingo.odata2.api.uri.expression.FilterExpression filter)  
      void checkOprAuthorization​(org.apache.olingo.odata2.api.uri.UriInfo uriView)  
      Object convert​(Object obj, Class clazz)  
      Object execEvent​(org.apache.olingo.odata2.api.uri.UriInfo infoView, org.apache.olingo.odata2.api.edm.EdmEntityType entityType, String type, Object data, Map<String,​Object> customValues)  
      javax.persistence.Query getBaseQuery​(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, javax.persistence.EntityManager em)  
      Map<String,​Object> getCalcFieldValues​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, Object data)  
      List<org.apache.olingo.odata2.api.ClientCallback> getClientCallbacks()  
      Map<String,​Object> getDefaultFieldValues​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, Object data)  
      javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, javax.persistence.EntityManager em)  
      javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntityCountUriInfo uriInfo, javax.persistence.EntityManager em)  
      javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo uriInfo, javax.persistence.EntityManager em)  
      javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo uriInfo, javax.persistence.EntityManager em)  
      javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo uriInfo, javax.persistence.EntityManager em)  
      javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo uriInfo, javax.persistence.EntityManager em)  
      boolean overrideDelete​(org.apache.olingo.odata2.api.uri.UriInfo infoView, Object entity, javax.persistence.EntityManager em)  
      Object overridePost​(org.apache.olingo.odata2.api.uri.UriInfo infoView, Object entity, javax.persistence.EntityManager em)  
      Object overridePut​(org.apache.olingo.odata2.api.uri.UriInfo infoView, Object entity, javax.persistence.EntityManager em)  
      void prepareQuery​(javax.persistence.Query query)  
      Object processNew​(org.apache.olingo.odata2.api.uri.UriInfo infoView)  
      • Methods inherited from class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener

        createApplicationError, generateDeltaToken, isTombstoneSupported
      • Methods inherited from class org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener

        addToDelta
    • Constructor Detail

      • QueryExtensionEntityListener

        public QueryExtensionEntityListener()
    • Method Detail

      • getBaseQuery

        public javax.persistence.Query getBaseQuery​(org.apache.olingo.odata2.api.uri.UriInfo uriInfo,
                                                    javax.persistence.EntityManager em)
                                             throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getQuery

        public javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo uriInfo,
                                                javax.persistence.EntityManager em)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getQuery

        public javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntityCountUriInfo uriInfo,
                                                javax.persistence.EntityManager em)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getQuery

        public javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntitySetCountUriInfo uriInfo,
                                                javax.persistence.EntityManager em)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getQuery

        public javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.GetEntityUriInfo uriInfo,
                                                javax.persistence.EntityManager em)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getQuery

        public javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo uriInfo,
                                                javax.persistence.EntityManager em)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getQuery

        public javax.persistence.Query getQuery​(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo,
                                                javax.persistence.EntityManager em)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • authorizeProperty

        public boolean authorizeProperty​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                         org.apache.olingo.odata2.api.edm.EdmProperty property)
        Overrides:
        authorizeProperty in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • authorizeProperty

        public boolean authorizeProperty​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                         org.apache.olingo.odata2.api.edm.EdmProperty property,
                                         String method)
        Overrides:
        authorizeProperty in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • checkOprAuthorization

        public void checkOprAuthorization​(org.apache.olingo.odata2.api.uri.UriInfo uriView)
                                   throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • checkAuthorization

        public void checkAuthorization​(org.apache.olingo.odata2.api.uri.info.PostUriInfo postView)
                                throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        checkAuthorization in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • checkAuthorization

        public void checkAuthorization​(org.apache.olingo.odata2.api.uri.info.PutMergePatchUriInfo putView)
                                throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        checkAuthorization in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • checkAuthorization

        public void checkAuthorization​(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo deleteView)
                                throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        checkAuthorization in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • checkEntityGetAuthorization

        public void checkEntityGetAuthorization​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType)
                                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        checkEntityGetAuthorization in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getDefaultFieldValues

        public Map<String,​Object> getDefaultFieldValues​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                                              Object data)
                                                       throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getDefaultFieldValues in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getCalcFieldValues

        public Map<String,​Object> getCalcFieldValues​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                                           Object data)
                                                    throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        getCalcFieldValues in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • checkFilter

        public void checkFilter​(org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                org.apache.olingo.odata2.api.uri.expression.FilterExpression filter)
                         throws org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
        Overrides:
        checkFilter in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
        Throws:
        org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException
      • getClientCallbacks

        public List<org.apache.olingo.odata2.api.ClientCallback> getClientCallbacks()
        Overrides:
        getClientCallbacks in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • execEvent

        public Object execEvent​(org.apache.olingo.odata2.api.uri.UriInfo infoView,
                                org.apache.olingo.odata2.api.edm.EdmEntityType entityType,
                                String type,
                                Object data,
                                Map<String,​Object> customValues)
        Overrides:
        execEvent in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • processNew

        public Object processNew​(org.apache.olingo.odata2.api.uri.UriInfo infoView)
        Overrides:
        processNew in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • canRefreshEntity

        public boolean canRefreshEntity​(org.apache.olingo.odata2.api.uri.UriInfo infoView)
        Overrides:
        canRefreshEntity in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • overridePost

        public Object overridePost​(org.apache.olingo.odata2.api.uri.UriInfo infoView,
                                   Object entity,
                                   javax.persistence.EntityManager em)
        Overrides:
        overridePost in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • canOverridePut

        public boolean canOverridePut​(org.apache.olingo.odata2.api.uri.UriInfo infoView)
        Overrides:
        canOverridePut in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • canOverrideDelete

        public boolean canOverrideDelete​(org.apache.olingo.odata2.api.uri.UriInfo infoView)
        Overrides:
        canOverrideDelete in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • canOverridePost

        public boolean canOverridePost​(org.apache.olingo.odata2.api.uri.UriInfo infoView)
        Overrides:
        canOverridePost in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • overridePut

        public Object overridePut​(org.apache.olingo.odata2.api.uri.UriInfo infoView,
                                  Object entity,
                                  javax.persistence.EntityManager em)
        Overrides:
        overridePut in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • overrideDelete

        public boolean overrideDelete​(org.apache.olingo.odata2.api.uri.UriInfo infoView,
                                      Object entity,
                                      javax.persistence.EntityManager em)
        Overrides:
        overrideDelete in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • convert

        public Object convert​(Object obj,
                              Class clazz)
        Overrides:
        convert in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
      • prepareQuery

        public void prepareQuery​(javax.persistence.Query query)
        Overrides:
        prepareQuery in class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener