Interface CommonQueryBuilder<X extends CommonQueryBuilder<X>>

Type Parameters:
X - The concrete builder type
All Superinterfaces:
ConfigurationSource, ParameterHolder<X>, ServiceProvider
All Known Subinterfaces:
BaseCriteriaBuilder<T,​X>, BaseCTECriteriaBuilder<X>, BaseFromQueryBuilder<T,​X>, BaseQueryBuilder<T,​X>, BaseSubqueryBuilder<X>, CriteriaBuilder<T>, DeleteCriteriaBuilder<T>, FinalSetOperationCriteriaBuilder<T>, FullQueryBuilder<T,​X>, FullSelectCTECriteriaBuilder<X>, InsertCriteriaBuilder<T>, LeafOngoingSetOperationCriteriaBuilder<X>, LeafOngoingSetOperationCTECriteriaBuilder<X>, LeafOngoingSetOperationSubqueryBuilder<X>, ModificationCriteriaBuilder<X>, OngoingSetOperationCriteriaBuilder<T,​Y>, OngoingSetOperationCTECriteriaBuilder<T,​Y>, OngoingSetOperationSubqueryBuilder<T,​Y>, PaginatedCriteriaBuilder<T>, QueryBuilder<T,​X>, ReturningDeleteCriteriaBuilder<T,​X>, ReturningInsertCriteriaBuilder<T,​X>, ReturningModificationCriteriaBuilder<X,​Y>, ReturningUpdateCriteriaBuilder<T,​X>, SelectBaseCTECriteriaBuilder<X>, SelectCTECriteriaBuilder<X>, SelectRecursiveCTECriteriaBuilder<X>, StartOngoingSetOperationCriteriaBuilder<X,​Y>, StartOngoingSetOperationCTECriteriaBuilder<X,​Y>, StartOngoingSetOperationSubqueryBuilder<X,​Y>, SubqueryBuilder<T>, UpdateCriteriaBuilder<T>

public interface CommonQueryBuilder<X extends CommonQueryBuilder<X>>
extends ServiceProvider, ConfigurationSource, ParameterHolder<X>
A base interface for builders that support basic query functionality. This interface is shared between normal query builders and subquery builders.
Since:
1.0.0
Author:
Christian Beikov
  • Method Details

    • getMetamodel

      javax.persistence.metamodel.Metamodel getMetamodel()
      Returns the JPA Metamodel of the persistence unit which is used by this query builder.
      Returns:
      The JPA metamodel
    • getCriteriaBuilderFactory

      CriteriaBuilderFactory getCriteriaBuilderFactory()
      The criteria builder factory that created this or it's parent builder.
      Returns:
      The criteria builder factory
      Since:
      1.0.5
    • registerMacro

      X registerMacro​(String macroName, JpqlMacro jpqlMacro)
      Registers the given jpql macro for this query builder.
      Parameters:
      macroName - The name of the macro
      jpqlMacro - The jpql macro
      Returns:
      The query builder for chaining calls
      Since:
      1.2.0
    • setProperty

      X setProperty​(String propertyName, String propertyValue)
      Sets a configuration property with the given propertyName to the given propertyValue. If a property with this name does not exist, it is added.
      Parameters:
      propertyName - The name of the property
      propertyValue - The value of the property
      Returns:
      The query builder for chaining calls
      Since:
      1.1.0
    • setProperties

      X setProperties​(Map<String,​String> properties)
      Overwrites the properties with the given set of properties.
      Parameters:
      properties - The new properties
      Returns:
      The query builder for chaining calls
      Since:
      1.1.0
    • setCacheable

      X setCacheable​(boolean cacheable)
      Configures whether the query result should be cached.
      Parameters:
      cacheable - Whether the query result should be cached
      Returns:
      The query builder for chaining calls
      Since:
      1.2.0
    • isCacheable

      boolean isCacheable()
      Returns whether the query result should be cached.
      Returns:
      Whether the query result should be cached
      Since:
      1.2.0