All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
Modifier and Type |
Method and Description |
protected static List<AggregationOperation> |
asAggregationList(AggregationOperation... aggregationOperations) |
static Fields |
bind(String name,
String target)
Creates a new Fields instance from the given field name and target reference.
|
static BucketOperation |
bucket(AggregationExpression groupByExpression)
|
static BucketOperation |
bucket(String groupByField)
|
static BucketAutoOperation |
bucketAuto(AggregationExpression groupByExpression,
int buckets)
|
static BucketAutoOperation |
bucketAuto(String groupByField,
int buckets)
|
static CountOperation.CountOperationBuilder |
count()
|
static FacetOperation |
facet()
|
static FacetOperation.FacetOperationBuilder |
facet(AggregationOperation... aggregationOperations)
|
static Fields |
fields(String... fields)
Creates a new Fields instance for the given field names.
|
static GeoNearOperation |
geoNear(NearQuery query,
String distanceField)
|
AggregationOptions |
getOptions()
|
static GraphLookupOperation.StartWithBuilder |
graphLookup(String fromCollection)
Creates a new GraphLookupOperation.GraphLookupOperationFromBuilder to construct a
GraphLookupOperation given fromCollection.
|
static GroupOperation |
group(Fields fields)
|
static GroupOperation |
group(String... fields)
|
static LimitOperation |
limit(long maxElements)
Creates a new LimitOperation limiting the result to the given number of elements.
|
static LookupOperation |
lookup(Field from,
Field localField,
Field foreignField,
Field as)
|
static LookupOperation |
lookup(String from,
String localField,
String foreignField,
String as)
|
static MatchOperation |
match(Criteria criteria)
|
static MatchOperation |
match(CriteriaDefinition criteria)
|
static Aggregation |
newAggregation(AggregationOperation... operations)
|
static <T> TypedAggregation<T> |
newAggregation(Class<T> type,
AggregationOperation... operations)
|
static <T> TypedAggregation<T> |
newAggregation(Class<T> type,
List<? extends AggregationOperation> operations)
|
static Aggregation |
newAggregation(List<? extends AggregationOperation> operations)
|
static AggregationOptions.Builder |
newAggregationOptions()
|
static OutOperation |
out(String outCollectionName)
|
static String |
previousOperation()
|
static ProjectionOperation |
project(Fields fields)
|
static ProjectionOperation |
project(String... fields)
|
static ReplaceRootOperation.ReplaceRootOperationBuilder |
replaceRoot()
|
static ReplaceRootOperation |
replaceRoot(AggregationExpression aggregationExpression)
|
static ReplaceRootOperation |
replaceRoot(String fieldName)
|
static SampleOperation |
sample(long sampleSize)
Creates a new SampleOperation to select the specified number of documents from its input randomly.
|
static SkipOperation |
skip(int elementsToSkip)
|
static SkipOperation |
skip(long elementsToSkip)
Creates a new SkipOperation skipping the given number of elements.
|
static SortOperation |
sort(Sort.Direction direction,
String... fields)
|
static SortOperation |
sort(Sort sort)
|
static SortByCountOperation |
sortByCount(AggregationExpression groupAndSortExpression)
|
static SortByCountOperation |
sortByCount(String field)
|
org.bson.Document |
toDocument(String inputCollectionName,
AggregationOperationContext rootContext)
|
List<org.bson.Document> |
toPipeline(AggregationOperationContext rootContext)
Renders this Aggregation specification to an aggregation pipeline returning a List of
Document .
|
String |
toString() |
static UnwindOperation |
unwind(String field)
Factory method to create a new UnwindOperation for the field with the given name.
|
static UnwindOperation |
unwind(String field,
boolean preserveNullAndEmptyArrays)
Factory method to create a new UnwindOperation for the field with the given name and
preserveNullAndEmptyArrays .
|
static UnwindOperation |
unwind(String field,
String arrayIndex)
Factory method to create a new UnwindOperation for the field with the given name including the name of a
new field to hold the array index of the element as arrayIndex .
|
static UnwindOperation |
unwind(String field,
String arrayIndex,
boolean preserveNullAndEmptyArrays)
Factory method to create a new UnwindOperation for the field with the given nameincluding the name of a new
field to hold the array index of the element as arrayIndex using preserveNullAndEmptyArrays .
|
Aggregation |
withOptions(AggregationOptions options)
|