com.mysema.query.group
Class GroupBy<S>
java.lang.Object
com.mysema.query.group.GroupBy<S>
- All Implemented Interfaces:
- ResultTransformer<Map<S,Group>>
public class GroupBy<S>
- extends Object
- implements ResultTransformer<Map<S,Group>>
Groups results by the first expression.
- Order of groups by position of the first row of a group
- Rows belonging to a group may appear in any order
- Group of null is handled correctly
- Author:
- sasa
Method Summary |
static
|
create(Expression<T> expr)
|
static
|
create(Expression<T> expr,
Expression<?> first,
Expression<?>... rest)
|
List<GroupColumnDefinition<?,?>> |
getColumnDefinitions()
|
|
process(Projectable projectable,
GroupProcessor<S,O> processor)
|
Map<S,Group> |
transform(Projectable projectable)
|
GroupBy<S> |
withGroup(GroupColumnDefinition<?,?> g)
|
|
withList(Expression<T> expr)
|
|
withMap(Expression<K> key,
Expression<V> value)
|
|
withOne(Expression<T> expr)
|
|
withProcessor(GroupProcessor<S,O> processor)
|
|
withProcessor(GroupProcessorFactory<S,O> processorFactory)
|
|
withSet(Expression<T> expr)
|
|
withTransformer(org.apache.commons.collections15.Transformer<Map<S,Group>,W> transformer)
|
|
withValueTransformer(org.apache.commons.collections15.Transformer<? super Group,? extends W> transformer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
columnDefinitions
protected final List<GroupColumnDefinition<?,?>> columnDefinitions
GroupBy
public GroupBy(Expression<S> groupBy)
GroupBy
public GroupBy(Expression<S> groupBy,
Expression<?> first,
Expression<?>... rest)
GroupBy
public GroupBy(Expression<S> groupBy,
GroupColumnDefinition<?,?> group,
GroupColumnDefinition<?,?>... groups)
GroupBy
protected GroupBy(List<GroupColumnDefinition<?,?>> columnDefinitions,
List<QPair<?,?>> maps)
create
public static <T> GroupBy<T> create(Expression<T> expr)
create
public static <T> GroupBy<T> create(Expression<T> expr,
Expression<?> first,
Expression<?>... rest)
getColumnDefinitions
public List<GroupColumnDefinition<?,?>> getColumnDefinitions()
process
public <O> O process(Projectable projectable,
GroupProcessor<S,O> processor)
transform
public Map<S,Group> transform(Projectable projectable)
- Specified by:
transform
in interface ResultTransformer<Map<S,Group>>
withGroup
public GroupBy<S> withGroup(GroupColumnDefinition<?,?> g)
withList
public <T> GroupBy<S> withList(Expression<T> expr)
withMap
public <K,V> GroupBy<S> withMap(Expression<K> key,
Expression<V> value)
withOne
public <T> GroupBy<S> withOne(Expression<T> expr)
withProcessor
public <O> ProcessorGroupBy<S,O> withProcessor(GroupProcessorFactory<S,O> processorFactory)
withProcessor
public <O> ProcessorGroupBy<S,O> withProcessor(GroupProcessor<S,O> processor)
withSet
public <T> GroupBy<S> withSet(Expression<T> expr)
withTransformer
public <W> ProcessorGroupBy<S,W> withTransformer(org.apache.commons.collections15.Transformer<Map<S,Group>,W> transformer)
withValueTransformer
public <W> ProcessorGroupBy<S,Map<S,W>> withValueTransformer(org.apache.commons.collections15.Transformer<? super Group,? extends W> transformer)
Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.