org.springframework.data.mongodb.core.aggregation
Class SortOperation
java.lang.Object
org.springframework.data.mongodb.core.aggregation.SortOperation
- All Implemented Interfaces:
- AggregationOperation
public class SortOperation
- extends Object
- implements AggregationOperation
Encapsulates the aggregation framework $sort-operation.
- Since:
- 1.3
- Author:
- Thomas Darimont, Oliver Gierke
- See Also:
http://docs.mongodb.org/manual/reference/aggregation/sort/#pipe._S_sort
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortOperation
public SortOperation(Sort sort)
- Creates a new
SortOperation for the given Sort instance.
- Parameters:
sort - must not be null.
and
public SortOperation and(Sort.Direction direction,
String... fields)
and
public SortOperation and(Sort sort)
toDBObject
public com.mongodb.DBObject toDBObject(AggregationOperationContext context)
- Description copied from interface:
AggregationOperation
- Turns the
AggregationOperation into a DBObject by using the given
AggregationOperationContext.
- Specified by:
toDBObject in interface AggregationOperation
- Returns:
- the DBObject
Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.