public class SetWindowFieldsOperation extends Object implements AggregationOperation, FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
setWindowFields
-operation.FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation
Modifier | Constructor and Description |
---|---|
protected |
SetWindowFieldsOperation(Object partitionBy,
AggregationOperation sortBy,
SetWindowFieldsOperation.WindowOutput output)
Create a new
SetWindowFieldsOperation with given args. |
Modifier and Type | Method and Description |
---|---|
static SetWindowFieldsOperation.SetWindowFieldsOperationBuilder |
builder()
Obtain a
builder to create a SetWindowFieldsOperation . |
ExposedFields |
getFields()
Returns the fields exposed by the
AggregationOperation . |
String |
getOperator()
Return the MongoDB operator that is used for this
AggregationOperation . |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
inheritsFields
toPipelineStages
protected SetWindowFieldsOperation(@Nullable Object partitionBy, @Nullable AggregationOperation sortBy, SetWindowFieldsOperation.WindowOutput output)
SetWindowFieldsOperation
with given args.partitionBy
- The field or AggregationExpression
to group by.sortBy
- the operation
to sort the documents by in the partition.output
- the SetWindowFieldsOperation.WindowOutput
containing the fields to add and the rules to calculate their respective
values.public static SetWindowFieldsOperation.SetWindowFieldsOperationBuilder builder()
builder
to create a SetWindowFieldsOperation
.SetWindowFieldsOperation.SetWindowFieldsOperationBuilder
.public ExposedFields getFields()
FieldsExposingAggregationOperation
AggregationOperation
.getFields
in interface FieldsExposingAggregationOperation
public org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperation
toDocument
in interface AggregationOperation
context
- the AggregationOperationContext
to operate within. Must not be null.public String getOperator()
AggregationOperation
AggregationOperation
. Aggregation operations should
implement this method to avoid document rendering.getOperator
in interface AggregationOperation
AggregationOperation
.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.