|
|
|
@ -21,6 +21,8 @@ import org.springframework.data.mongodb.core.aggregation.BucketAutoOperation.Buc |
|
|
|
import org.springframework.data.mongodb.core.aggregation.BucketOperationSupport.OutputBuilder; |
|
|
|
import org.springframework.data.mongodb.core.aggregation.BucketOperationSupport.OutputBuilder; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.Assert; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Encapsulates the aggregation framework {@code $bucketAuto}-operation. <br /> |
|
|
|
* Encapsulates the aggregation framework {@code $bucketAuto}-operation. <br /> |
|
|
|
* Bucket stage is typically used with {@link Aggregation} and {@code $facet}. Categorizes incoming documents into a |
|
|
|
* Bucket stage is typically used with {@link Aggregation} and {@code $facet}. Categorizes incoming documents into a |
|
|
|
@ -158,6 +160,21 @@ public class BucketAutoOperation extends BucketOperationSupport<BucketAutoOperat |
|
|
|
return new BucketAutoOperationOutputBuilder(Fields.field(fieldName), this); |
|
|
|
return new BucketAutoOperationOutputBuilder(Fields.field(fieldName), this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean equals(Object o) { |
|
|
|
|
|
|
|
if (this == o) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!(o instanceof BucketAutoOperation)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!super.equals(o)) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
BucketAutoOperation that = (BucketAutoOperation) o; |
|
|
|
|
|
|
|
return buckets == that.buckets && Objects.equals(granularity, that.granularity); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* {@link OutputBuilder} implementation for {@link BucketAutoOperation}. |
|
|
|
* {@link OutputBuilder} implementation for {@link BucketAutoOperation}. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|