Package com.querydsl.core.group
Interface Group
- All Known Implementing Classes:
GroupImpl
public interface Group
A group of rows. Group is build according to GroupDefinitions.
- Author:
- sasa
-
Method Summary
Modifier and TypeMethodDescription<T,R> R getGroup(GroupExpression<T, R> coldef) Returns the value of the given group.<T> List<T>getList(Expression<T> expr) Returns a List of values in this group.<K,V> Map<K, V> getMap(Expression<K> key, Expression<V> value) Returns a Map of values in this group<T> TgetOne(Expression<T> expr) Returns the value of the given single valued expression.<T> Set<T>getSet(Expression<T> expr) Returns a Set of values in this group.<K,V> SortedMap<K, V> getSortedMap(Expression<K> key, Expression<V> value) Returns a SortedMap of values in this group<T> SortedSet<T>getSortedSet(Expression<T> expr) Returns a SortedSet of values in this group.Object[]toArray()Groups elements as an array
-
Method Details
-
toArray
Object[] toArray()Groups elements as an array- Returns:
- elements as an array
-
getGroup
Returns the value of the given group.- Type Parameters:
T- Type of element in a single ResultSet row, i.e. type ofExpression<T>R- Target type of this group, e.g.List<T>- Parameters:
coldef-- Returns:
- Value of given group definition in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type
-
getOne
Returns the value of the given single valued expression. This is the first value of given column within this group of the ResultSet.- Type Parameters:
T- Value type- Parameters:
expr- Grouped expression- Returns:
- Value of given expression in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type (e.g. Set)
-
getSet
Returns a Set of values in this group.- Type Parameters:
T- Value type of Set- Parameters:
expr- Grouped expression- Returns:
- Set of values in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type (e.g. List)
-
getSortedSet
Returns a SortedSet of values in this group.- Type Parameters:
T- Value type of Set- Parameters:
expr- Grouped expression- Returns:
- Set of values in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type (e.g. List)
-
getList
Returns a List of values in this group.- Type Parameters:
T- Value type of List- Parameters:
expr- Grouped expression- Returns:
- List of values in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type (e.g. Set)
-
getMap
Returns a Map of values in this group- Type Parameters:
K- Key type of result MapV- Value type of result Map- Parameters:
key- Key expressionvalue- Value expression- Returns:
- Map of values in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type (e.g. List)
-
getSortedMap
Returns a SortedMap of values in this group- Type Parameters:
K- Key type of result MapV- Value type of result Map- Parameters:
key- Key expressionvalue- Value expression- Returns:
- Map of values in this group
- Throws:
NoSuchElementException- if group is undefined.ClassCastException- if group is of different type (e.g. List)
-