Uses of Class
org.springframework.data.mongodb.core.aggregation.ProjectionOperation.ProjectionOperationBuilder
Package
Description
Support for the MongoDB aggregation framework.
-
Uses of ProjectionOperation.ProjectionOperationBuilder in org.springframework.data.mongodb.core.aggregation
Modifier and TypeClassDescriptionstatic class
AnProjectionOperation.ProjectionOperationBuilder
that is used for SpEL expression based projections.Modifier and TypeMethodDescriptionProjectionOperation.ProjectionOperationBuilder.absoluteValue()
Generates a$abs
expression that takes the number of the previously mentioned field and returns the absolute value of it.ProjectionOperation.ProjectionOperationBuilder.allElementsInArrayTrue()
Generates an$allElementsTrue
expression that takes array of the previously mentioned field and returns true if no elements is false.Creates a newProjectionOperation.ProjectionOperationBuilder
to define a projection for the field with the given name.ProjectionOperation.and
(AggregationExpression expression) ProjectionOperation.ProjectionOperationBuilder.anyElementInArrayTrue()
Generates an$anyElementTrue
expression that Takes array of the previously mentioned field and returns true if any of the elements are true and false otherwise.ProjectionOperation.ProjectionOperationBuilder.arrayElementAt
(int position) Generates a$arrayElemAt
expression that takes the string representation of the previously mentioned field and returns the element at the specified array position.ProjectionOperation.ProjectionOperationBuilder.asLiteral()
Generates a$literal
expression that Takes the value previously and uses it as literal.ProjectionOperation.ProjectionOperationBuilder.ceil()
Generates a$ceil
expression that takes the number of the previously mentioned field and returns the smallest integer greater than or equal to the specified number.Generates a$cmp
expression (compare to) that compares the value of the field to a given value or field.Generates a$concat
expression that takes the string representation of the previously mentioned field and concats given values to it.ProjectionOperation.ProjectionOperationBuilder.concatArrays
(String... fields) Generates a$concatArrays
expression that takes the string representation of the previously mentioned field and concats it with the arrays from the referenced fields.ProjectionOperation.ProjectionOperationBuilder.dateAsFormattedString()
Generates a$dateToString
expression that takes the date representation of the previously mentioned field using the server default format.ProjectionOperation.ProjectionOperationBuilder.dateAsFormattedString
(String format) Generates a$dateToString
expression that takes the date representation of the previously mentioned field and applies given format to it.ProjectionOperation.ProjectionOperationBuilder.differenceToArray
(String array) Generates a$setDifference
expression that takes array of the previously mentioned field and returns an array containing the elements that do not exist in the given array.Generates an$divide
expression that divides the previously mentioned field by the given number.Generates an$divide
expression that divides the value of the given field by the previously mentioned field.ProjectionOperation.ProjectionOperationBuilder.divide
(AggregationExpression expression) Generates an$divide
expression that divides the value of the previously mentioned by the result of theAggregationExpression
.Generates a$eq
expression (equal) that compares the value of the field to a given value or field.ProjectionOperation.ProjectionOperationBuilder.equalsArrays
(String... arrays) Generates a$setEquals
expression that compares the previously mentioned field to one or more arrays and returns true if they have the same distinct elements and false otherwise.ProjectionOperation.ProjectionOperationBuilder.exp()
Generates a$exp
expression that takes the number of the previously mentioned field and raises Euler’s number (i.e. e ) on it.ProjectionOperation.ProjectionOperationBuilder.extractDayOfMonth()
Extracts the dayOfMonth from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractDayOfWeek()
Extracts the dayOfWeek from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractDayOfYear()
Extracts the dayOfYear from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractHour()
Extracts the hour from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractMillisecond()
Extracts the millisecond from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractMinute()
Extracts the minute from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractMonth()
Extracts the month from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractSecond()
Extracts the second from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractWeek()
Extracts the week from a date expression.ProjectionOperation.ProjectionOperationBuilder.extractYear()
Extracts the year from a date expression.ProjectionOperation.ProjectionOperationBuilder.filter
(String as, AggregationExpression condition) Generates a$filter
expression that returns a subset of the array held by the given field.ProjectionOperation.ProjectionOperationBuilder.floor()
Generates a$floor
expression that takes the number of the previously mentioned field and returns the largest integer less than or equal to it.Generates a$gt
expression (greater than) that compares the value of the field to a given value or field.Generates a$gte
expression (greater than equal) that compares the value of the field to a given value or field.ProjectionOperation.ProjectionOperationBuilder.intersectsArrays
(String... arrays) Generates a$setIntersection
expression that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in every of those.ProjectionOperation.ProjectionOperationBuilder.isArray()
Generates a$isArray
expression that takes the string representation of the previously mentioned field and checks if its an array.ProjectionOperation.ProjectionOperationBuilder.let
(Collection<VariableOperators.Let.ExpressionVariable> variables, AggregationExpression in) Generates a$let
expression that binds variables for use in the specified expression, and returns the result of the expression.ProjectionOperation.ProjectionOperationBuilder.let
(AggregationExpression valueExpression, String variableName, AggregationExpression in) Generates a$let
expression that binds variables for use in the specified expression, and returns the result of the expression.ProjectionOperation.ProjectionOperationBuilder.ln()
Generates a$ln
expression that takes the number of the previously mentioned field and calculates the natural logarithm ln (i.e loge) of it.Generates a$log
expression that takes the number of the previously mentioned field and calculates the log of the associated number in the specified base.Generates a$log
expression that takes the number of the previously mentioned field and calculates the log of the associated number in the specified base.ProjectionOperation.ProjectionOperationBuilder.log
(AggregationExpression base) Generates a$log
expression that takes the number of the previously mentioned field and calculates the log of the associated number in the specified base.ProjectionOperation.ProjectionOperationBuilder.log10()
Generates a$log10
expression that takes the number of the previously mentioned field and calculates the log base 10.Generates a$lt
expression (less than) that compares the value of the field to a given value or field.Generates a$lte
expression (less than equal) that compares the value of the field to a given value or field.Generates an$subtract
expression that subtracts the given number to the previously mentioned field.Generates an$subtract
expression that subtracts the value of the given field to the previously mentioned field.ProjectionOperation.ProjectionOperationBuilder.minus
(AggregationExpression expression) Generates an$subtract
expression that subtracts the result of the givenAggregationExpression
from the previously mentioned field.Generates an$mod
expression that divides the previously mentioned field by the given number and returns the remainder.Generates an$mod
expression that divides the value of the given field by the previously mentioned field and returns the remainder.ProjectionOperation.ProjectionOperationBuilder.mod
(AggregationExpression expression) Generates an$mod
expression that divides the value of the previously mentioned field by the result of theAggregationExpression
.Generates an$multiply
expression that multiplies the given number with the previously mentioned field.Generates an$multiply
expression that multiplies the value of the given field with the previously mentioned field.ProjectionOperation.ProjectionOperationBuilder.multiply
(AggregationExpression expression) Generates an$multiply
expression that multiplies the previously with the result of theAggregationExpression
. mentioned field.Generates a$ne
expression (not equal) that compares the value of the field to a given value or field.Generates an$add
expression that adds the given number to the previously mentioned field.Generates an$add
expression that adds the value of the given field to the previously mentioned field.Generates a$pow
expression that takes the number of the previously mentioned field and raises it by the specified exponent.Generates a$pow
expression that takes the number of the previously mentioned field and raises it by the specified exponent.ProjectionOperation.ProjectionOperationBuilder.pow
(AggregationExpression exponentExpression) Generates a$pow
expression that Takes the number of the previously mentioned field and raises it by the specified exponent.ProjectionOperation.ExpressionProjectionOperationBuilder.project
(String operation, Object... values) Adds a generic projection for the current field.ProjectionOperation.ProjectionOperationBuilder.size()
Generates a$size
expression that returns the size of the array held by the given field.ProjectionOperation.ProjectionOperationBuilder.slice
(int count) Generates a$slice
expression that returns a subset of the array held by the given field.ProjectionOperation.ProjectionOperationBuilder.slice
(int count, int offset) Generates a$slice
expression that returns a subset of the array held by the given field.ProjectionOperation.ProjectionOperationBuilder.sqrt()
Generates a$sqrt
expression that takes the number of the previously mentioned field and calculates the square root.ProjectionOperation.ProjectionOperationBuilder.strCaseCmp
(String value) Generates a$strcasecmp
expression that takes the string representation of the previously mentioned field and performs case-insensitive comparison to the given value.ProjectionOperation.ProjectionOperationBuilder.strCaseCmp
(AggregationExpression expression) Generates a$strcasecmp
expression that takes the string representation of the previously mentioned field and performs case-insensitive comparison to the result of the givenAggregationExpression
.ProjectionOperation.ProjectionOperationBuilder.strCaseCmpValueOf
(String fieldRef) Generates a$strcasecmp
expression that takes the string representation of the previously mentioned field and performs case-insensitive comparison to the referenced fieldRef.ProjectionOperation.ProjectionOperationBuilder.subsetOfArray
(String array) Generates a$setIsSubset
expression that takes array of the previously mentioned field and returns true if it is a subset of the given array.ProjectionOperation.ProjectionOperationBuilder.substring
(int start) Generates a$substr
expression that Takes the string representation of the previously mentioned field and returns a substring starting at a specified index position.ProjectionOperation.ProjectionOperationBuilder.substring
(int start, int nrOfChars) Generates a$substr
expression that takes the string representation of the previously mentioned field and returns a substring starting at a specified index position including the specified number of characters.ProjectionOperation.ProjectionOperationBuilder.toLower()
Generates a$toLower
expression that takes the string representation of the previously mentioned field and lowers it.ProjectionOperation.ProjectionOperationBuilder.toUpper()
Generates a$toUpper
expression that takes the string representation of the previously mentioned field and uppers it.ProjectionOperation.ProjectionOperationBuilder.trunc()
Takes the number of the previously mentioned field and truncates it to its integer value.ProjectionOperation.ProjectionOperationBuilder.unionArrays
(String... arrays) Generates a$setUnion
expression that takes array of the previously mentioned field and one or more arrays and returns an array that contains the elements that appear in any of those.