Class BucketOptions


  • @Deprecated(since="2.0",
                forRemoval=true)
    public class BucketOptions
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    use Bucket instead
    The options for a bucket stage of aggregation pipeline.
    Author:
    Roman Lapin
    • Constructor Detail

      • BucketOptions

        public BucketOptions()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • toDocument

        public Document toDocument()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Converts a BucketOptions to a Document for use by the Java driver.
        Returns:
        the Document
      • defaultField

        public BucketOptions defaultField​(Object defaultField)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Define default field for the bucket stage
        Parameters:
        defaultField - name of the field
        Returns:
        this
      • output

        public BucketOptions.OutputOperation output​(String fieldName)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Define output field for the bucket stage
        Parameters:
        fieldName - name of the output field
        Returns:
        this
      • getDefaultField

        public Object getDefaultField()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns:
        default bucket name
      • getAccumulators

        public Map<String,​Accumulator> getAccumulators()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns:
        output accumulators per output field