Package dev.morphia.aggregation.stages
Class SortByCount
- java.lang.Object
-
- dev.morphia.aggregation.stages.Stage
-
- dev.morphia.aggregation.stages.SortByCount
-
public class SortByCount extends Stage
Groups incoming documents based on the value of a specified expression, then computes the count of documents in each distinct group.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SortByCount(dev.morphia.aggregation.expressions.impls.Expression expression)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description dev.morphia.aggregation.expressions.impls.Expression
getExpression()
static SortByCount
on(dev.morphia.aggregation.expressions.impls.Expression expression)
Deprecated, for removal: This API element is subject to removal in a future version.static SortByCount
sortByCount(dev.morphia.aggregation.expressions.impls.Expression expression)
Creates a new stage grouping by the given expression.-
Methods inherited from class dev.morphia.aggregation.stages.Stage
aggregation, stageName
-
-
-
-
Method Detail
-
on
@Deprecated(forRemoval=true) public static SortByCount on(dev.morphia.aggregation.expressions.impls.Expression expression)
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new stage grouping by the given expression.- Parameters:
expression
- the expression- Returns:
- this
-
sortByCount
public static SortByCount sortByCount(dev.morphia.aggregation.expressions.impls.Expression expression)
Creates a new stage grouping by the given expression.- Parameters:
expression
- the expression- Returns:
- this
- Since:
- 2.2
-
getExpression
@MorphiaInternal public dev.morphia.aggregation.expressions.impls.Expression getExpression()
- Returns:
- the expression
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-