org.apache.olingo.odata2.jpa.processor.ref.listeners

## Class CustomerQueryExtension

- java.lang.Object
- - org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener
  - - org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener
    - - org.apache.olingo.odata2.jpa.processor.ref.listeners.CustomerQueryExtension

-     public class CustomerQueryExtension
      extends ODataJPAQueryExtensionEntityListener

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomerQueryExtension()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.persistence.Query` | `getQuery(GetEntitySetCountUriInfo uriInfo, javax.persistence.EntityManager em)` Override this method to build JPA Query for OData request - GetEntitySet Count; SELECT COUNT(*)
    `javax.persistence.Query` | `getQuery(GetEntitySetUriInfo uriInfo, javax.persistence.EntityManager em)` Override this method to build JPA Query for OData request - GetEntitySet; SELECT *
    `javax.persistence.Query` | `getQuery(GetEntityUriInfo uriInfo, javax.persistence.EntityManager em)` Override this method to build JPA Query for OData request - GetEntity; SELECT SINGLE with key in WHERE clause
    `boolean` | `isTombstoneSupported()` Implement this method to indicate whether the extended class can handle OData Tombstone feature as well

    - ### Methods inherited from class org.apache.olingo.odata2.jpa.processor.api.ODataJPAQueryExtensionEntityListener

      `createApplicationError, generateDeltaToken, getQuery, getQuery, getQuery`

    - ### Methods inherited from class org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener

      `addToDelta`

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

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

- - ### Constructor Detail

    - #### CustomerQueryExtension

          public CustomerQueryExtension()

  - ### Method Detail

    - #### getQuery

          public javax.persistence.Query getQuery(GetEntitySetUriInfo uriInfo,
                                                  javax.persistence.EntityManager em)
                                           throws ODataJPARuntimeException

      Description copied from class: `ODataJPAQueryExtensionEntityListener`
      Override this method to build JPA Query for OData request - GetEntitySet; SELECT *
      Overrides:
        `getQuery` in class `ODataJPAQueryExtensionEntityListener`
      Parameters:
        `uriInfo` - is a reference to OData request
        `em` - is a reference to `EntityManager`
      Returns:
        an instance of type `Query`
      Throws:
        `ODataJPARuntimeException`

    - #### getQuery

          public javax.persistence.Query getQuery(GetEntitySetCountUriInfo uriInfo,
                                                  javax.persistence.EntityManager em)
                                           throws ODataJPARuntimeException

      Description copied from class: `ODataJPAQueryExtensionEntityListener`
      Override this method to build JPA Query for OData request - GetEntitySet Count; SELECT COUNT(*)
      Overrides:
        `getQuery` in class `ODataJPAQueryExtensionEntityListener`
      Parameters:
        `uriInfo` - is a reference to OData request
        `em` - is a reference to `EntityManager`
      Returns:
        an instance of type `Query`
      Throws:
        `ODataJPARuntimeException`

    - #### getQuery

          public javax.persistence.Query getQuery(GetEntityUriInfo uriInfo,
                                                  javax.persistence.EntityManager em)

      Description copied from class: `ODataJPAQueryExtensionEntityListener`
      Override this method to build JPA Query for OData request - GetEntity; SELECT SINGLE with key in WHERE clause
      Overrides:
        `getQuery` in class `ODataJPAQueryExtensionEntityListener`
      Parameters:
        `uriInfo` - is a reference to OData request
        `em` - is a reference to `EntityManager`
      Returns:
        an instance of type `Query`

    - #### isTombstoneSupported

          public boolean isTombstoneSupported()

      Description copied from class: `ODataJPAQueryExtensionEntityListener`
      Implement this method to indicate whether the extended class can handle OData Tombstone feature as well
      Overrides:
        `isTombstoneSupported` in class `ODataJPAQueryExtensionEntityListener`
      Returns:
        false by default

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