Package dev.morphia.query
Class BucketAutoOptions
- java.lang.Object
-
- dev.morphia.query.BucketAutoOptions
-
public class BucketAutoOptions extends java.lang.Object
The options for a bucket auto stage of aggregation pipeline.- Author:
- Roman Lapin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BucketAutoOptions.Granularity
A value that specifies the preferred number series to use to ensure that the calculated boundary edges end on preferred round numbers or their powers of 10.class
BucketAutoOptions.OutputOperation
Defines an output for bucketauto stage, that consists of the fieldname and the accumulator
-
Constructor Summary
Constructors Constructor Description BucketAutoOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,Accumulator>
getAccumulators()
BucketAutoOptions.Granularity
getGranurality()
BucketAutoOptions
granularity(BucketAutoOptions.Granularity granularity)
Define granularity field for the bucketauto stageBucketAutoOptions.OutputOperation
output(java.lang.String fieldName)
Define output field for the bucketauto stagecom.mongodb.DBObject
toDBObject()
Converts a BucketAutoOptions to a DBObject for use by the Java driver.
-
-
-
Method Detail
-
toDBObject
public com.mongodb.DBObject toDBObject()
Converts a BucketAutoOptions to a DBObject for use by the Java driver.- Returns:
- the DBObject
-
granularity
public BucketAutoOptions granularity(BucketAutoOptions.Granularity granularity)
Define granularity field for the bucketauto stage- Parameters:
granularity
- granularityBucketAutoOptions.Granularity
- Returns:
- this
-
output
public BucketAutoOptions.OutputOperation output(java.lang.String fieldName)
Define output field for the bucketauto stage- Parameters:
fieldName
- name of the output field- Returns:
- this
-
getGranurality
public BucketAutoOptions.Granularity getGranurality()
- Returns:
- granurality for the current bucketauto stage
-
getAccumulators
public java.util.Map<java.lang.String,Accumulator> getAccumulators()
- Returns:
- output accumulators per output field
-
-