Class BlazeJPAQueryFactory

java.lang.Object
com.blazebit.persistence.querydsl.BlazeJPAQueryFactory
All Implemented Interfaces:
JPQLNextQueryFactory, com.querydsl.core.QueryFactory<com.querydsl.jpa.JPQLQuery<?>>, com.querydsl.jpa.JPQLQueryFactory

public class BlazeJPAQueryFactory extends Object implements JPQLNextQueryFactory
Query factory to simplify BlazeJPAQuery instantiation.
Since:
1.6.7
Author:
Jan-Willem Gmelig Meyling
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlazeJPAQueryFactory(JPQLNextTemplates templates, javax.persistence.EntityManager entityManager, CriteriaBuilderFactory criteriaBuilderFactory)
     
    BlazeJPAQueryFactory(javax.persistence.EntityManager entityManager, CriteriaBuilderFactory criteriaBuilderFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.querydsl.core.dml.DeleteClause<?>
    delete(com.querydsl.core.types.EntityPath<?> path)
     
    final <RT> SetExpression<RT>
    except(com.querydsl.core.types.SubQueryExpression<RT>... sq)
    Creates an except expression for the given subqueries.
    <RT> SetExpression<RT>
    except(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
    Creates an except expression for the given subqueries
    final <RT> SetExpression<RT>
    exceptAll(com.querydsl.core.types.SubQueryExpression<RT>... sq)
    Creates an except expression for the given subqueries.
    <RT> SetExpression<RT>
    exceptAll(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
    Creates an except expression for the given subqueries
    from(com.querydsl.core.types.EntityPath<?> from)
     
    from(com.querydsl.core.types.EntityPath<?>... from)
     
    from(com.querydsl.core.types.SubQueryExpression<X> subQueryExpression, com.querydsl.core.types.Path<X> alias)
    Create a new Query with the given source
    fromIdentifiableValues(com.querydsl.core.types.EntityPath<X> path, Collection<X> elements)
    Select from a set of values using the VALUES clause.
    fromIdentifiableValues(com.querydsl.core.types.Path<X> path, com.querydsl.core.types.Path<X> alias, Collection<X> elements)
    Select from a set of values using the VALUES clause.
    fromValues(com.querydsl.core.types.EntityPath<X> path, Collection<X> elements)
    Select from a set of values using the VALUES clause.
    fromValues(com.querydsl.core.types.Path<X> path, com.querydsl.core.types.Path<X> alias, Collection<X> elements)
    Select from a set of values using the VALUES clause.
    com.querydsl.core.dml.InsertClause<?>
    insert(com.querydsl.core.types.EntityPath<?> path)
     
    final <RT> SetExpression<RT>
    intersect(com.querydsl.core.types.SubQueryExpression<RT>... sq)
    Creates an intersect expression for the given subqueries.
    <RT> SetExpression<RT>
    intersect(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
    Creates an intersect expression for the given subqueries.
    final <RT> SetExpression<RT>
    intersectAll(com.querydsl.core.types.SubQueryExpression<RT>... sq)
    Creates an intersect expression for the given subqueries.
    <RT> SetExpression<RT>
    intersectAll(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
    Creates an intersect expression for the given subqueries
     
    BlazeJPAQuery<com.querydsl.core.Tuple>
    select(com.querydsl.core.types.Expression<?>... exprs)
     
    select(com.querydsl.core.types.Expression<T> expr)
     
    BlazeJPAQuery<com.querydsl.core.Tuple>
    selectDistinct(com.querydsl.core.types.Expression<?>... exprs)
     
    selectDistinct(com.querydsl.core.types.Expression<T> expr)
     
    selectFrom(com.querydsl.core.types.EntityPath<T> from)
     
    selectFrom(com.querydsl.core.types.SubQueryExpression<X> subQueryExpression, com.querydsl.core.types.Path<X> alias)
    Create a new Query with the given source
     
     
    final <RT> SetExpression<RT>
    union(com.querydsl.core.types.SubQueryExpression<RT>... sq)
    Creates an union expression for the given subqueries.
    <RT> SetExpression<RT>
    union(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
    Creates an union expression for the given subqueries.
    final <RT> SetExpression<RT>
    unionAll(com.querydsl.core.types.SubQueryExpression<RT>... sq)
    Creates an union expression for the given subqueries.
    <RT> SetExpression<RT>
    unionAll(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
    Creates an union expression for the given subqueries.
    com.querydsl.core.dml.UpdateClause<?>
    update(com.querydsl.core.types.EntityPath<?> path)
     
    with(com.querydsl.core.types.EntityPath<?> alias, com.querydsl.core.types.Path<?>... columns)
    Register a common table expression (CTE).
    with(com.querydsl.core.types.Path<X> alias, com.querydsl.core.types.SubQueryExpression<?> o)
    Register a common table expression (CTE).
    withRecursive(com.querydsl.core.types.EntityPath<?> alias, com.querydsl.core.types.Path<?>... columns)
    Register a recursive common table expression (CTE).
    withRecursive(com.querydsl.core.types.Path<X> alias, com.querydsl.core.types.SubQueryExpression<?> o)
    Register a recursive common table expression (CTE).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlazeJPAQueryFactory

      public BlazeJPAQueryFactory(javax.persistence.EntityManager entityManager, CriteriaBuilderFactory criteriaBuilderFactory)
    • BlazeJPAQueryFactory

      public BlazeJPAQueryFactory(JPQLNextTemplates templates, javax.persistence.EntityManager entityManager, CriteriaBuilderFactory criteriaBuilderFactory)
  • Method Details

    • delete

      public com.querydsl.core.dml.DeleteClause<?> delete(com.querydsl.core.types.EntityPath<?> path)
      Specified by:
      delete in interface com.querydsl.jpa.JPQLQueryFactory
    • select

      public <T> BlazeJPAQuery<T> select(com.querydsl.core.types.Expression<T> expr)
      Specified by:
      select in interface JPQLNextQueryFactory
      Specified by:
      select in interface com.querydsl.jpa.JPQLQueryFactory
    • select

      public BlazeJPAQuery<com.querydsl.core.Tuple> select(com.querydsl.core.types.Expression<?>... exprs)
      Specified by:
      select in interface JPQLNextQueryFactory
      Specified by:
      select in interface com.querydsl.jpa.JPQLQueryFactory
    • selectDistinct

      public <T> BlazeJPAQuery<T> selectDistinct(com.querydsl.core.types.Expression<T> expr)
      Specified by:
      selectDistinct in interface JPQLNextQueryFactory
      Specified by:
      selectDistinct in interface com.querydsl.jpa.JPQLQueryFactory
    • selectDistinct

      public BlazeJPAQuery<com.querydsl.core.Tuple> selectDistinct(com.querydsl.core.types.Expression<?>... exprs)
      Specified by:
      selectDistinct in interface JPQLNextQueryFactory
      Specified by:
      selectDistinct in interface com.querydsl.jpa.JPQLQueryFactory
    • selectOne

      public BlazeJPAQuery<Integer> selectOne()
      Specified by:
      selectOne in interface JPQLNextQueryFactory
      Specified by:
      selectOne in interface com.querydsl.jpa.JPQLQueryFactory
    • selectZero

      public BlazeJPAQuery<Integer> selectZero()
      Specified by:
      selectZero in interface JPQLNextQueryFactory
      Specified by:
      selectZero in interface com.querydsl.jpa.JPQLQueryFactory
    • selectFrom

      public <T> BlazeJPAQuery<T> selectFrom(com.querydsl.core.types.EntityPath<T> from)
      Specified by:
      selectFrom in interface JPQLNextQueryFactory
      Specified by:
      selectFrom in interface com.querydsl.jpa.JPQLQueryFactory
    • from

      public BlazeJPAQuery<?> from(com.querydsl.core.types.EntityPath<?> from)
      Specified by:
      from in interface JPQLNextQueryFactory
      Specified by:
      from in interface com.querydsl.jpa.JPQLQueryFactory
    • from

      public BlazeJPAQuery<?> from(com.querydsl.core.types.EntityPath<?>... from)
      Specified by:
      from in interface JPQLNextQueryFactory
      Specified by:
      from in interface com.querydsl.jpa.JPQLQueryFactory
    • from

      public <X> BlazeJPAQuery<?> from(com.querydsl.core.types.SubQueryExpression<X> subQueryExpression, com.querydsl.core.types.Path<X> alias)
      Description copied from interface: JPQLNextQueryFactory
      Create a new Query with the given source
      Specified by:
      from in interface JPQLNextQueryFactory
      Parameters:
      subQueryExpression - The subquery expression
      alias - Alias for the subquery in the outer query
      Returns:
      from(from)
    • selectFrom

      public <X> BlazeJPAQuery<X> selectFrom(com.querydsl.core.types.SubQueryExpression<X> subQueryExpression, com.querydsl.core.types.Path<X> alias)
      Description copied from interface: JPQLNextQueryFactory
      Create a new Query with the given source
      Specified by:
      selectFrom in interface JPQLNextQueryFactory
      Parameters:
      subQueryExpression - The subquery expression
      alias - Alias for the subquery in the outer query
      Returns:
      from(from)
    • fromValues

      public <X> BlazeJPAQuery<?> fromValues(com.querydsl.core.types.EntityPath<X> path, Collection<X> elements)
      Description copied from interface: JPQLNextQueryFactory
      Select from a set of values using the VALUES clause.
      Specified by:
      fromValues in interface JPQLNextQueryFactory
      Type Parameters:
      X - The element type
      Parameters:
      path - Type of values
      elements - The elements
      Returns:
      this query
    • fromIdentifiableValues

      public <X> BlazeJPAQuery<?> fromIdentifiableValues(com.querydsl.core.types.EntityPath<X> path, Collection<X> elements)
      Description copied from interface: JPQLNextQueryFactory
      Select from a set of values using the VALUES clause.
      Specified by:
      fromIdentifiableValues in interface JPQLNextQueryFactory
      Type Parameters:
      X - The element type
      Parameters:
      path - Type of values
      elements - The elements
      Returns:
      this query
    • fromValues

      public <X> BlazeJPAQuery<?> fromValues(com.querydsl.core.types.Path<X> path, com.querydsl.core.types.Path<X> alias, Collection<X> elements)
      Description copied from interface: JPQLNextQueryFactory
      Select from a set of values using the VALUES clause.
      Specified by:
      fromValues in interface JPQLNextQueryFactory
      Type Parameters:
      X - The element type
      Parameters:
      path - Type of values
      alias - The alias from which the values can be referenced
      elements - The elements
      Returns:
      this query
    • fromIdentifiableValues

      public <X> BlazeJPAQuery<?> fromIdentifiableValues(com.querydsl.core.types.Path<X> path, com.querydsl.core.types.Path<X> alias, Collection<X> elements)
      Description copied from interface: JPQLNextQueryFactory
      Select from a set of values using the VALUES clause.
      Specified by:
      fromIdentifiableValues in interface JPQLNextQueryFactory
      Type Parameters:
      X - The element type
      Parameters:
      path - Type of values
      alias - The alias from which the values can be referenced
      elements - The elements
      Returns:
      this query
    • with

      public <X> BlazeJPAQuery<?> with(com.querydsl.core.types.Path<X> alias, com.querydsl.core.types.SubQueryExpression<?> o)
      Description copied from interface: JPQLNextQueryFactory
      Register a common table expression (CTE).
      Specified by:
      with in interface JPQLNextQueryFactory
      Type Parameters:
      X - CTE type
      Parameters:
      alias - The alias for the CTE
      o - The subquery expression
      Returns:
      this query
    • withRecursive

      public <X> BlazeJPAQuery<?> withRecursive(com.querydsl.core.types.Path<X> alias, com.querydsl.core.types.SubQueryExpression<?> o)
      Description copied from interface: JPQLNextQueryFactory
      Register a recursive common table expression (CTE).
      Specified by:
      withRecursive in interface JPQLNextQueryFactory
      Type Parameters:
      X - CTE type
      Parameters:
      alias - The alias for the CTE
      o - The subquery expression
      Returns:
      this query
    • with

      public WithBuilder<? extends BlazeJPAQuery<?>> with(com.querydsl.core.types.EntityPath<?> alias, com.querydsl.core.types.Path<?>... columns)
      Description copied from interface: JPQLNextQueryFactory
      Register a common table expression (CTE). Returns a builder through which the CTE can be provided as SubQueryExpression.
      Specified by:
      with in interface JPQLNextQueryFactory
      Parameters:
      alias - The alias for the CTE
      columns - The columns for the CTE
      Returns:
      this query
    • withRecursive

      public WithBuilder<? extends BlazeJPAQuery<?>> withRecursive(com.querydsl.core.types.EntityPath<?> alias, com.querydsl.core.types.Path<?>... columns)
      Description copied from interface: JPQLNextQueryFactory
      Register a recursive common table expression (CTE). Returns a builder through which the CTE can be provided as SubQueryExpression.
      Specified by:
      withRecursive in interface JPQLNextQueryFactory
      Parameters:
      alias - The alias for the CTE
      columns - The columns for the CTE
      Returns:
      this query
    • update

      public com.querydsl.core.dml.UpdateClause<?> update(com.querydsl.core.types.EntityPath<?> path)
      Specified by:
      update in interface com.querydsl.jpa.JPQLQueryFactory
    • insert

      public com.querydsl.core.dml.InsertClause<?> insert(com.querydsl.core.types.EntityPath<?> path)
      Specified by:
      insert in interface com.querydsl.jpa.JPQLQueryFactory
    • query

      public BlazeJPAQuery<?> query()
      Specified by:
      query in interface JPQLNextQueryFactory
      Specified by:
      query in interface com.querydsl.core.QueryFactory<com.querydsl.jpa.JPQLQuery<?>>
    • union

      public <RT> SetExpression<RT> union(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an union expression for the given subqueries.
      Specified by:
      union in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • unionAll

      public <RT> SetExpression<RT> unionAll(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an union expression for the given subqueries.
      Specified by:
      unionAll in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • intersect

      public <RT> SetExpression<RT> intersect(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an intersect expression for the given subqueries.
      Specified by:
      intersect in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
      See Also:
    • intersectAll

      public <RT> SetExpression<RT> intersectAll(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an intersect expression for the given subqueries
      Specified by:
      intersectAll in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
      See Also:
    • except

      public <RT> SetExpression<RT> except(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an except expression for the given subqueries
      Specified by:
      except in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
      See Also:
    • exceptAll

      public <RT> SetExpression<RT> exceptAll(List<com.querydsl.core.types.SubQueryExpression<RT>> sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an except expression for the given subqueries
      Specified by:
      exceptAll in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
      See Also:
    • union

      @SafeVarargs public final <RT> SetExpression<RT> union(com.querydsl.core.types.SubQueryExpression<RT>... sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an union expression for the given subqueries.
      Specified by:
      union in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • unionAll

      @SafeVarargs public final <RT> SetExpression<RT> unionAll(com.querydsl.core.types.SubQueryExpression<RT>... sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an union expression for the given subqueries.
      Specified by:
      unionAll in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • intersect

      @SafeVarargs public final <RT> SetExpression<RT> intersect(com.querydsl.core.types.SubQueryExpression<RT>... sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an intersect expression for the given subqueries.
      Specified by:
      intersect in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • intersectAll

      @SafeVarargs public final <RT> SetExpression<RT> intersectAll(com.querydsl.core.types.SubQueryExpression<RT>... sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an intersect expression for the given subqueries.
      Specified by:
      intersectAll in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • except

      @SafeVarargs public final <RT> SetExpression<RT> except(com.querydsl.core.types.SubQueryExpression<RT>... sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an except expression for the given subqueries.
      Specified by:
      except in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result
    • exceptAll

      @SafeVarargs public final <RT> SetExpression<RT> exceptAll(com.querydsl.core.types.SubQueryExpression<RT>... sq)
      Description copied from interface: JPQLNextQueryFactory
      Creates an except expression for the given subqueries.
      Specified by:
      exceptAll in interface JPQLNextQueryFactory
      Type Parameters:
      RT - set operation type
      Parameters:
      sq - subqueries
      Returns:
      the set operation result