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 . |
boolean |
inheritsFields() |
com.mongodb.DBObject |
toDBObject(AggregationOperationContext context)
|
public CountOperation(String fieldName)
CountOperation
given the fieldName
field name.asFieldName
- must not be null or empty.public com.mongodb.DBObject toDBObject(AggregationOperationContext context)
AggregationOperation
toDBObject
in interface AggregationOperation
public ExposedFields getFields()
FieldsExposingAggregationOperation
AggregationOperation
.getFields
in interface FieldsExposingAggregationOperation
public boolean inheritsFields()
inheritsFields
in interface FieldsExposingAggregationOperation
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.