Package dev.morphia.query
Class BucketOptions
- java.lang.Object
-
- dev.morphia.query.BucketOptions
-
public class BucketOptions extends java.lang.Object
The options for a bucket stage of aggregation pipeline.- Author:
- Roman Lapin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
BucketOptions.OutputOperation
Defines an output for bucketauto stage, that consists of the fieldname and the accumulator
-
Constructor Summary
Constructors Constructor Description BucketOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BucketOptions
defaultField(java.lang.Object defaultField)
Define default field for the bucket stagejava.util.Map<java.lang.String,Accumulator>
getAccumulators()
java.lang.Object
getDefaultField()
BucketOptions.OutputOperation
output(java.lang.String fieldName)
Define output field for the bucket stagecom.mongodb.DBObject
toDBObject()
Deprecated.this is an internal method and is removed in 2.0
-
-
-
Method Detail
-
toDBObject
@Deprecated public com.mongodb.DBObject toDBObject()
Deprecated.this is an internal method and is removed in 2.0Converts a BucketOptions to a DBObject for use by the Java driver.- Returns:
- the DBObject
-
defaultField
public BucketOptions defaultField(java.lang.Object defaultField)
Define default field for the bucket stage- Parameters:
defaultField
- name of the field- Returns:
- this
-
output
public BucketOptions.OutputOperation output(java.lang.String fieldName)
Define output field for the bucket stage- Parameters:
fieldName
- name of the output field- Returns:
- this
-
getDefaultField
public java.lang.Object getDefaultField()
- Returns:
- default bucket name
-
getAccumulators
public java.util.Map<java.lang.String,Accumulator> getAccumulators()
- Returns:
- output accumulators per output field
-
-