public class GroupBy<K,V> extends java.lang.Object implements ResultTransformer<java.util.Map<K,V>>
Modifier and Type | Field and Description |
---|---|
protected Expression<?>[] |
expressions |
protected java.util.List<GroupExpression<?,?>> |
groupExpressions |
protected java.util.List<QPair<?,?>> |
maps |
Modifier and Type | Method and Description |
---|---|
static <E extends java.lang.Number & java.lang.Comparable<E>> |
avg(Expression<E> expression)
Create a new aggregating avg expression
|
static <K> GroupByBuilder<K> |
groupBy(Expression<K> key)
Create a new GroupByBuilder for the given key expression
|
static <E> AbstractGroupExpression<?,java.util.List<E>> |
list(Expression<E> expression)
Create a new aggregating list expression
|
static <K,V> Expression<java.util.Map<K,V>> |
map(Expression<K> key,
Expression<V> value)
Create a new aggregating map expression
|
static <E extends java.lang.Comparable<E>> |
max(Expression<E> expression)
Create a new aggregating max expression
|
static <E extends java.lang.Comparable<E>> |
min(Expression<E> expression)
Create a new aggregating min expression
|
static <E> AbstractGroupExpression<?,java.util.Set<E>> |
set(Expression<E> expression)
Create a new aggregating set expression
|
static <E extends java.lang.Number & java.lang.Comparable<E>> |
sum(Expression<E> expression)
Create a new aggregating sum expression
|
protected java.util.Map<K,V> |
transform(java.util.Map<K,Group> groups) |
java.util.Map<K,V> |
transform(Projectable projectable) |
protected final java.util.List<GroupExpression<?,?>> groupExpressions
protected final java.util.List<QPair<?,?>> maps
protected final Expression<?>[] expressions
public static <K> GroupByBuilder<K> groupBy(Expression<K> key)
key
- public static <E extends java.lang.Comparable<E>> AbstractGroupExpression<?,E> min(Expression<E> expression)
expression
- public static <E extends java.lang.Number & java.lang.Comparable<E>> AbstractGroupExpression<?,E> sum(Expression<E> expression)
expression
- public static <E extends java.lang.Number & java.lang.Comparable<E>> AbstractGroupExpression<?,E> avg(Expression<E> expression)
expression
- public static <E extends java.lang.Comparable<E>> AbstractGroupExpression<?,E> max(Expression<E> expression)
expression
- public static <E> AbstractGroupExpression<?,java.util.List<E>> list(Expression<E> expression)
expression
- public static <E> AbstractGroupExpression<?,java.util.Set<E>> set(Expression<E> expression)
expression
- public static <K,V> Expression<java.util.Map<K,V>> map(Expression<K> key, Expression<V> value)
key
- value
- public java.util.Map<K,V> transform(Projectable projectable)
transform
in interface ResultTransformer<java.util.Map<K,V>>
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.