Class JPAQueryBase<T,Q extends JPAQueryBase<T,Q>>

Type Parameters:
T - result type
Q - concrete subtype
All Implemented Interfaces:
Fetchable<T>, FetchableQuery<T,JPQLQuery<T>>, FilteredClause<JPQLQuery<T>>, Query<JPQLQuery<T>>, SimpleQuery<JPQLQuery<T>>, ExtendedSubQuery<T>, Expression<T>, SubQueryExpression<T>, JPQLQuery<T>, Serializable
Direct Known Subclasses:
AbstractHibernateQuery, AbstractJPAQuery

public abstract class JPAQueryBase<T,Q extends JPAQueryBase<T,Q>> extends FetchableSubQueryBase<T,Q> implements JPQLQuery<T>
JPAQueryBase is a base Query class for JPA queries
Author:
tiwe
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getTemplates

      protected JPQLTemplates getTemplates()
    • createSerializer

      protected abstract JPQLSerializer createSerializer()
    • serialize

      protected JPQLSerializer serialize(boolean forCountRow)
    • serialize

      protected JPQLSerializer serialize(boolean forCountRow, boolean validate)
    • reset

      protected abstract void reset()
    • fetchJoin

      public Q fetchJoin()
      Description copied from interface: JPQLQuery
      Add the "fetchJoin" flag to the last defined join Mind that collection joins might result in duplicate rows and that "inner join fetchJoin" will restrict your result set.
      Specified by:
      fetchJoin in interface JPQLQuery<T>
      Returns:
      the current object
    • fetchAll

      public Q fetchAll()
      Description copied from interface: JPQLQuery
      Add the "fetchJoin all properties" flag to the last defined join.
      Specified by:
      fetchAll in interface JPQLQuery<T>
      Returns:
      the current object
    • from

      public Q from(EntityPath<?> arg)
    • from

      public Q from(EntityPath<?>... args)
      Description copied from interface: JPQLQuery
      Add sources to this query
      Specified by:
      from in interface JPQLQuery<T>
      Parameters:
      args - sources
      Returns:
      the current object
    • from

      public <P> Q from(CollectionExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Add a query source
      Specified by:
      from in interface JPQLQuery<T>
      Parameters:
      target - collection
      alias - alias
      Returns:
      the current object
    • innerJoin

      public <P> Q innerJoin(CollectionExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a inner join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      innerJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • innerJoin

      public <P> Q innerJoin(CollectionExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a inner join with the given target and alias.
      Specified by:
      innerJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • innerJoin

      public <P> Q innerJoin(EntityPath<P> target)
      Description copied from interface: JPQLQuery
      Create a inner join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      innerJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • innerJoin

      public <P> Q innerJoin(EntityPath<P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a inner join with the given target and alias.
      Specified by:
      innerJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • innerJoin

      public <P> Q innerJoin(MapExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a inner join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      innerJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • innerJoin

      public <P> Q innerJoin(MapExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a inner join with the given target and alias.
      Specified by:
      innerJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • join

      public <P> Q join(CollectionExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      join in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • join

      public <P> Q join(CollectionExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a join with the given target Use fetchJoin() to add the fetchJoin parameter to this join
      Specified by:
      join in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • join

      public <P> Q join(EntityPath<P> target)
      Description copied from interface: JPQLQuery
      Create a join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      join in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • join

      public <P> Q join(EntityPath<P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a join with the given target and alias.
      Specified by:
      join in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • join

      public <P> Q join(MapExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      join in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • join

      public <P> Q join(MapExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a join with the given target and alias.
      Specified by:
      join in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • leftJoin

      public <P> Q leftJoin(CollectionExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a left join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      leftJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • leftJoin

      public <P> Q leftJoin(CollectionExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a left join with the given target and alias.
      Specified by:
      leftJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • leftJoin

      public <P> Q leftJoin(EntityPath<P> target)
      Description copied from interface: JPQLQuery
      Create a left join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      leftJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • leftJoin

      public <P> Q leftJoin(EntityPath<P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a left join with the given target and alias.
      Specified by:
      leftJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • leftJoin

      public <P> Q leftJoin(MapExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a left join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      leftJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • leftJoin

      public <P> Q leftJoin(MapExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a left join with the given target and alias.
      Specified by:
      leftJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • rightJoin

      public <P> Q rightJoin(CollectionExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a right join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      rightJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • rightJoin

      public <P> Q rightJoin(CollectionExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a right join with the given target and alias.
      Specified by:
      rightJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • rightJoin

      public <P> Q rightJoin(EntityPath<P> target)
      Description copied from interface: JPQLQuery
      Create a right join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      rightJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • rightJoin

      public <P> Q rightJoin(EntityPath<P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a right join with the given target and alias.
      Specified by:
      rightJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • rightJoin

      public <P> Q rightJoin(MapExpression<?,P> target)
      Description copied from interface: JPQLQuery
      Create a right join with the given target. Use fetchJoin() to add the fetchJoin parameter to this join.
      Specified by:
      rightJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      Returns:
      the current object
    • rightJoin

      public <P> Q rightJoin(MapExpression<?,P> target, Path<P> alias)
      Description copied from interface: JPQLQuery
      Create a right join with the given target and alias.
      Specified by:
      rightJoin in interface JPQLQuery<T>
      Parameters:
      target - target
      alias - alias
      Returns:
      the current object
    • on

      public Q on(Predicate condition)
    • on

      public Q on(Predicate... conditions)
      Description copied from interface: JPQLQuery
      Add join conditions to the last added join
      Specified by:
      on in interface JPQLQuery<T>
      Parameters:
      conditions - join conditions
      Returns:
      the current object
    • toString

      public String toString()
      Overrides:
      toString in class QueryBase<Q extends JPAQueryBase<T,Q>>
    • clone

      public abstract Q clone()
      Overrides:
      clone in class Object