Module spring.data.mongodb
Class DocumentOperators
java.lang.Object
org.springframework.data.mongodb.core.aggregation.DocumentOperators
Gateway to document expressions such as $rank, $documentNumber, etc.
- Since:
- 3.3
- Author:
- Christoph Strobl
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDocumentOperators.DenseRankresolves the current document position (the rank) relative to other documents.static classDocumentOperators.DocumentNumberresolves the current document position.static classstatic classDocumentOperators.Rankresolves the current document position (the rank) relative to other documents.static classShift applies an expression to a document in a specified position relative to the current document. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentOperators.DenseRankObtain the document position (without gaps) relative to others (rank).Obtain the current document position.static DocumentOperators.Rankrank()Obtain the document position (including gaps) relative to others (rank).Take the field referenced by given fieldReference.valueOf(AggregationExpression expression) Take the value resulting from the givenAggregationExpression.
-
Constructor Details
-
DocumentOperators
public DocumentOperators()
-
-
Method Details
-
rank
Obtain the document position (including gaps) relative to others (rank).- Returns:
- new instance of
DocumentOperators.Rank. - Since:
- 3.3
-
denseRank
Obtain the document position (without gaps) relative to others (rank).- Returns:
- new instance of
DocumentOperators.DenseRank. - Since:
- 3.3
-
valueOf
Take the field referenced by given fieldReference.- Parameters:
fieldReference- must not be null.- Returns:
- new instance of
DocumentOperators.DocumentOperatorsFactory.
-
valueOf
Take the value resulting from the givenAggregationExpression.- Parameters:
expression- must not be null.- Returns:
- new instance of
DocumentOperators.DocumentOperatorsFactory.
-
documentNumber
Obtain the current document position.- Returns:
- new instance of
DocumentOperators.DocumentNumber. - Since:
- 3.3
-