org.apache.olingo.odata2.jpa.processor.api.jpql

## Class JPQLContext.JPQLContextBuilder

- java.lang.Object
- - org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLContext.JPQLContextBuilder

- Enclosing class:
    JPQLContext

      public abstract static class JPQLContext.JPQLContextBuilder
      extends Object

  The abstract class is extended by specific JPQLContext builder for building JPQLContexts.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `aliasCounter` alias counter is an integer counter that is incremented by "1" for every new alias name generation.
    `protected boolean` | `withPaging`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JPQLContextBuilder()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract JPQLContext` | `build()` The abstract method is implemented by specific JPQL context builders to build JPQL Contexts.
    `protected String` | `generateJPAEntityAlias()` The method returns a system generated alias name starting with prefix "E" and ending with suffix "aliasCounter".
    `protected void` | `resetAliasCounter()` The method resets the alias counter value to "0".
    `protected abstract void` | `setResultsView(Object resultsView)` The abstract method is implemented by specific JPQL context builder.

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

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

- - ### Field Detail

    - #### aliasCounter

          protected int aliasCounter

      alias counter is an integer counter that is incremented by "1" for every new alias name generation. The value of counter is used in the generation of JPA entity alias names.

    - #### withPaging

          protected boolean withPaging

  - ### Constructor Detail

    - #### JPQLContextBuilder

          protected JPQLContextBuilder()

  - ### Method Detail

    - #### build

          public abstract JPQLContext build()
                                     throws ODataJPAModelException,
                                            ODataJPARuntimeException

      The abstract method is implemented by specific JPQL context builders to build JPQL Contexts. The build method makes use of information set into the context to built JPQL Context Types.
      Returns:
        an instance of `JPQLContext`
      Throws:
        `ODataJPAModelException`
        `ODataJPARuntimeException`

    - #### setResultsView

          protected abstract void setResultsView(Object resultsView)

      The abstract method is implemented by specific JPQL context builder. The method sets the OData request view into the JPQL context.
      Parameters:
        `resultsView` - is an instance representing OData request.

    - #### resetAliasCounter

          protected void resetAliasCounter()

      The method resets the alias counter value to "0".

    - #### generateJPAEntityAlias

          protected String generateJPAEntityAlias()

      The method returns a system generated alias name starting with prefix "E" and ending with suffix "aliasCounter".
      Returns:
        a String representing JPA entity alias name

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