public class ReplaceRootOperation extends Object implements FieldsExposingAggregationOperation
$replaceRoot-operation. Aggregation.replaceRoot(String) instead of creating instances
of this class directly.| Modifier and Type | Class and Description |
|---|---|
static interface |
ReplaceRootOperation.Replacement
Replacement object that results in a replacement document or an expression that results in a document.
|
static class |
ReplaceRootOperation.ReplaceRootDocumentOperationBuilder
Builder for
ReplaceRootDocumentOperation to populate ReplacementDocument |
static class |
ReplaceRootOperation.ReplaceRootOperationBuilder
Builder for
ReplaceRootOperation. |
FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation| Constructor and Description |
|---|
ReplaceRootOperation(AggregationExpression aggregationExpression)
Creates a new
ReplaceRootOperation given the AggregationExpression pointing to a document. |
ReplaceRootOperation(Field field)
Creates a new
ReplaceRootOperation given the Field field name. |
ReplaceRootOperation(ReplaceRootOperation.Replacement replacement)
Creates a new
ReplaceRootOperation given the ReplaceRootOperation.Replacement. |
| Modifier and Type | Method and Description |
|---|---|
static ReplaceRootOperation.ReplaceRootOperationBuilder |
builder()
Creates a new
ReplaceRootOperation.ReplaceRootDocumentOperationBuilder. |
ExposedFields |
getFields()
Returns the fields exposed by the
AggregationOperation. |
org.bson.Document |
toDocument(AggregationOperationContext context)
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinheritsFieldspublic ReplaceRootOperation(Field field)
ReplaceRootOperation given the Field field name.field - must not be null or empty.public ReplaceRootOperation(AggregationExpression aggregationExpression)
ReplaceRootOperation given the AggregationExpression pointing to a document.aggregationExpression - must not be null.public ReplaceRootOperation(ReplaceRootOperation.Replacement replacement)
ReplaceRootOperation given the ReplaceRootOperation.Replacement.replacement - must not be null.public static ReplaceRootOperation.ReplaceRootOperationBuilder builder()
ReplaceRootOperation.ReplaceRootDocumentOperationBuilder.ReplaceRootOperation.ReplaceRootDocumentOperationBuilder.public org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationpublic ExposedFields getFields()
FieldsExposingAggregationOperationAggregationOperation.getFields in interface FieldsExposingAggregationOperationCopyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.