Package dev.morphia.query
Class BucketAutoOptions
- java.lang.Object
-
- dev.morphia.query.BucketAutoOptions
-
public class BucketAutoOptions extends java.lang.ObjectThe options for a bucket auto stage of aggregation pipeline.- Author:
- Roman Lapin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBucketAutoOptions.GranularityA 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.classBucketAutoOptions.OutputOperationDefines 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.GranularitygetGranurality()BucketAutoOptionsgranularity(BucketAutoOptions.Granularity granularity)Define granularity field for the bucketauto stageBucketAutoOptions.OutputOperationoutput(java.lang.String fieldName)Define output field for the bucketauto stagecom.mongodb.DBObjecttoDBObject()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
-
-