Package org.mongojack

Class Aggregation<T>

  • Type Parameters:
    T - The type of results to be produced by the aggregation results.

    @Deprecated
    public class Aggregation<T>
    extends Object
    Deprecated.
    Use com.mongodb.client.model.Aggregates
    A Generic Aggregation object that allows the aggregation operations, and the return type of the AggregationResult to be specified.

    The Pipeline is a List<Stage>, and Stage is a Bson which makes it compatible with the methods in the JacksonMongoCollection that accept Bson-list aggregate pipeline objects, and makes those methods interoperable with Mongo's internal Aggregates class. But be warned that Pipeline.initialize has to be called before Stage.toBsonDocument, or exceptions will result; similarly the list operations shouldn't be called before initialize is called. JacksonMongoCollection takes care of calling initialize for you.

    Since:
    2.1.0
    Author:
    Christopher Exell