Package dev.morphia.aggregation.stages
Class SetWindowFields
- java.lang.Object
-
- dev.morphia.aggregation.stages.Stage
-
- dev.morphia.aggregation.stages.SetWindowFields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SetWindowFields.Output
static class
SetWindowFields.Window
-
Constructor Summary
Constructors Modifier Constructor Description protected
SetWindowFields()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SetWindowFields
output(SetWindowFields.Output... outputs)
Specifies the field(s) to append to the documents in the output returned by the $setWindowFields stage.SetWindowFields.Output[]
outputs()
dev.morphia.aggregation.expressions.impls.Expression
partition()
SetWindowFields
partitionBy(dev.morphia.aggregation.expressions.impls.Expression partition)
Defines the expression to use to partition the data.static SetWindowFields
setWindowFields()
Performs operations on a specified span of documents in a collection, known as a window, and returns the results based on the chosen window operator.SetWindowFields
sortBy(Sort... sorts)
Specifies the field(s) to sort the documents by in the partition.Sort[]
sorts()
-
Methods inherited from class dev.morphia.aggregation.stages.Stage
aggregation, stageName
-
-
-
-
Method Detail
-
setWindowFields
public static SetWindowFields setWindowFields()
Performs operations on a specified span of documents in a collection, known as a window, and returns the results based on the chosen window operator.- Returns:
- the new stage
- Since:
- 2.3
- Since server release
- 5.0
- MongoDB documentation
- Aggregration Expression: $setWindowFields
-
output
public SetWindowFields output(SetWindowFields.Output... outputs)
Specifies the field(s) to append to the documents in the output returned by the $setWindowFields stage.- Parameters:
outputs
- the output fields- Returns:
- this
-
outputs
@MorphiaInternal public SetWindowFields.Output[] outputs()
- Returns:
- the outputs
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
partition
@Nullable @MorphiaInternal public dev.morphia.aggregation.expressions.impls.Expression partition()
- Returns:
- the partition
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
partitionBy
public SetWindowFields partitionBy(dev.morphia.aggregation.expressions.impls.Expression partition)
Defines the expression to use to partition the data.- Parameters:
partition
- the expression- Returns:
- this
-
sortBy
public SetWindowFields sortBy(Sort... sorts)
Specifies the field(s) to sort the documents by in the partition.- Parameters:
sorts
- the sort criteria- Returns:
- this
-
-