Package com.valqueries.automapper
Interface ValqueriesGroupQuery<T>
- All Known Implementing Classes:
BaseValqueriesQuery
,TestDoubleQuery
,ValqueriesQueryImpl
public interface ValqueriesGroupQuery<T>
-
Method Summary
Modifier and TypeMethodDescriptionconcat
(BiConsumer<T, ?> field, String separator) Add an aggregation that concatenates the values of a field as a string.Add an aggregation that concatenates the values of a field as a string.count
(BiConsumer<T, ?> field) Add an aggregation that counts non-NULL values of a field.Add an aggregation that counts non-NULL values of a field.Execute the query.<X extends Comparable<? super X>>
ValqueriesGroupQuery<T>max
(BiConsumer<T, X> field) Add an aggregation that calculates the maximum value of a field.<X extends Comparable<? super X>>
ValqueriesGroupQuery<T>Add an aggregation that calculates the maximum value of a field.<X extends Comparable<? super X>>
ValqueriesGroupQuery<T>min
(BiConsumer<T, X> field) Add an aggregation that calculates the minimum value of a field.<X extends Comparable<? super X>>
ValqueriesGroupQuery<T>Add an aggregation that calculates the minimum value of a field.sum
(BiConsumer<T, ? extends Number> field) Add an aggregation that sums the values of a field.Add an aggregation that sums the values of a field.
-
Method Details
-
count
Add an aggregation that counts non-NULL values of a field. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Getter of the field to count- Returns:
- this query, for chaining
-
count
Add an aggregation that counts non-NULL values of a field.- Parameters:
field
- Setter of the field to count- Returns:
- this query, for chaining
-
sum
Add an aggregation that sums the values of a field. ForFloat
andDouble
fields the result will beDouble
, forBigInteger
andBigDecimal
the result will be the same, for all other fields the result will beLong
. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Getter of the field to sum- Returns:
- this query, for chaining
-
sum
Add an aggregation that sums the values of a field. ForFloat
andDouble
fields the result will beDouble
, forBigInteger
andBigDecimal
the result will be the same, for all other fields the result will beLong
. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Setter of the field to sum- Returns:
- this query, for chaining
-
max
Add an aggregation that calculates the maximum value of a field. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Getter of the field to calculate the maximum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)- Returns:
- this query, for chaining
-
max
Add an aggregation that calculates the maximum value of a field. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Setter of the field to calculate the maximum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)- Returns:
- this query, for chaining
-
min
Add an aggregation that calculates the minimum value of a field. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Getter of the field to calculate the minimum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)- Returns:
- this query, for chaining
-
min
Add an aggregation that calculates the minimum value of a field. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Setter of the field to calculate the minimum of. (If the type is not comparable in Java, but it is comparable in the database, cast the argument to a raw type)- Returns:
- this query, for chaining
-
concat
Add an aggregation that concatenates the values of a field as a string. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Getter of the field to concatenateseparator
- The separator to use between values- Returns:
- this query, for chaining
-
concat
Add an aggregation that concatenates the values of a field as a string. The values inValqueriesGroupResultRow.aggregationValues()
will be in the order aggregations were added to the query.- Parameters:
field
- Setter of the field to concatenateseparator
- The separator to use between values- Returns:
- this query, for chaining
-
groupByExecute
Stream<ValqueriesGroupResultRow> groupByExecute()Execute the query.- Returns:
- A stream of rows, each containing the values of the fields that were grouped by and the values of the aggregations, both in the same order they were queried.
-