Package org.springframework.data.mongodb.core.aggregation

Examples of org.springframework.data.mongodb.core.aggregation.AggregationOperationContext


  public <O> AggregationResults<O> aggregate(TypedAggregation<?> aggregation, String inputCollectionName,
      Class<O> outputType) {

    Assert.notNull(aggregation, "Aggregation pipeline must not be null!");

    AggregationOperationContext context = new TypeBasedAggregationOperationContext(aggregation.getInputType(),
        mappingContext, queryMapper);
    return aggregate(aggregation, inputCollectionName, outputType, context);
  }
View Full Code Here


    Assert.hasText(collectionName, "Collection name must not be null or empty!");
    Assert.notNull(aggregation, "Aggregation pipeline must not be null!");
    Assert.notNull(outputType, "Output type must not be null!");

    AggregationOperationContext rootContext = context == null ? Aggregation.DEFAULT_CONTEXT : context;
    DBObject command = aggregation.toDbObject(collectionName, rootContext);

    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Executing aggregation: {}", serializeToJsonSafely(command));
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.aggregation.AggregationOperationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.