Class Q

java.lang.Object
cz.encircled.joiner.query.Q

public class Q extends Object
This class contains helper methods for joiner query building
  • Constructor Summary

    Constructors
    Constructor
    Description
    Q()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> JoinerQuery<T,Long>
    count(com.querydsl.core.types.EntityPath<T> from)
    Build count query
    static <T> JoinerQuery<T,T>
    from(com.querydsl.core.types.EntityPath<T> from)
    Build "from" clause of query
    static FromBuilder<com.querydsl.core.Tuple>
    select(com.querydsl.core.types.Expression<?>... returnProjections)
    Build a tuple query projections (i.e.
    static <R> FromBuilder<R>
    select(com.querydsl.core.types.Expression<R> returnProjection)
    Build a query projection (i.e.
    static <R> FromBuilder<R>
    select(Class<R> mapTo, com.querydsl.core.types.Expression<?>... returnProjections)
    Build a query projection (i.e.

    Methods inherited from class java.lang.Object

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

    • Q

      public Q()
  • Method Details

    • select

      public static FromBuilder<com.querydsl.core.Tuple> select(com.querydsl.core.types.Expression<?>... returnProjections)
      Build a tuple query projections (i.e. select clause)
      Parameters:
      returnProjections - path to query projection
      Returns:
      joiner query with custom tuple query projection
    • select

      public static <R> FromBuilder<R> select(com.querydsl.core.types.Expression<R> returnProjection)
      Build a query projection (i.e. select clause)
      Type Parameters:
      R - type of source entity
      Parameters:
      returnProjection - path to be selected
      Returns:
      joiner query with custom query projection
    • select

      public static <R> FromBuilder<R> select(Class<R> mapTo, com.querydsl.core.types.Expression<?>... returnProjections)
      Build a query projection (i.e. select clause) with result mapping to another object
      Parameters:
      mapTo - class for result to be mapped to. Must contain a constructor matching given 'returnProjections'
      returnProjections - paths to be selected
      Returns:
      joiner query with custom query projection
    • from

      public static <T> JoinerQuery<T,T> from(com.querydsl.core.types.EntityPath<T> from)
      Build "from" clause of query
      Type Parameters:
      T - type of source entity
      Parameters:
      from - alias of source entity
      Returns:
      joiner query
    • count

      public static <T> JoinerQuery<T,Long> count(com.querydsl.core.types.EntityPath<T> from)
      Build count query
      Type Parameters:
      T - type of source entity
      Parameters:
      from - alias of source entity
      Returns:
      count joiner query