Class BucketOptions


  • public class BucketOptions
    extends java.lang.Object
    The options for a bucket stage of aggregation pipeline.
    Author:
    Roman Lapin
    • Constructor Detail

      • BucketOptions

        public BucketOptions()
    • Method Detail

      • toDBObject

        @Deprecated
        public com.mongodb.DBObject toDBObject()
        Deprecated.
        this is an internal method and is removed in 2.0
        Converts 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