public class CountOperation extends Object implements FieldsExposingAggregationOperation
$count-operation. Aggregation.count() instead of creating instances of this class
directly.| Modifier and Type | Class and Description |
|---|---|
static class |
CountOperation.CountOperationBuilder
Builder for
CountOperation. |
FieldsExposingAggregationOperation.InheritsFieldsAggregationOperation| Constructor and Description |
|---|
CountOperation(String fieldName)
Creates a new
CountOperation given the fieldName field name. |
| Modifier and Type | Method and Description |
|---|---|
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, waitinheritsFieldstoPipelineStagespublic CountOperation(String fieldName)
CountOperation given the fieldName field name.asFieldName - must not be null or empty.public org.bson.Document toDocument(AggregationOperationContext context)
AggregationOperationtoDocument in interface AggregationOperationcontext - the AggregationOperationContext to operate within. Must not be null.public ExposedFields getFields()
FieldsExposingAggregationOperationAggregationOperation.getFields in interface FieldsExposingAggregationOperationCopyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.