Package cz.encircled.joiner.query
Class Q
java.lang.Object
cz.encircled.joiner.query.Q
This class contains helper methods for joiner query building
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> JoinerQuery<T, Long> count(com.querydsl.core.types.EntityPath<T> from) Build count querystatic <T> JoinerQuery<T, T> from(com.querydsl.core.types.EntityPath<T> from) Build "from" clause of querystatic 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> Build a query projection (i.e.
-
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
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
Build "from" clause of query- Type Parameters:
T- type of source entity- Parameters:
from- alias of source entity- Returns:
- joiner query
-
count
Build count query- Type Parameters:
T- type of source entity- Parameters:
from- alias of source entity- Returns:
- count joiner query
-