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, waitinheritsFieldstoPipelineStagesprotected 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()
FieldsExposingAggregationOperationAggregationOperation.getFields in interface FieldsExposingAggregationOperationpublic org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationcontext - the AggregationOperationContext to operate within. Must not be null.public String getOperator()
AggregationOperationAggregationOperation. Aggregation operations should
implement this method to avoid document rendering.getOperator in interface AggregationOperationAggregationOperation.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.