DATAMONGO-1564 - Polishing.

Fix JavaDoc references and minor a import formatting issue.

Original pull request: #429.
This commit is contained in:
Mark Paluch
2016-12-16 13:44:41 +01:00
parent 75139042e0
commit f026ab419d
14 changed files with 210 additions and 194 deletions

View File

@@ -21,9 +21,10 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import org.springframework.util.ObjectUtils;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import org.springframework.util.ObjectUtils;
/**
* @author Christoph Strobl
@@ -45,6 +46,7 @@ abstract class AbstractAggregationExpression implements AggregationExpression {
return toDbObject(this.value, context);
}
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
Object valueToUse;
@@ -80,6 +82,7 @@ abstract class AbstractAggregationExpression implements AggregationExpression {
return Fields.fields(fieldRefs).asList();
}
@SuppressWarnings("unchecked")
private Object unpack(Object value, AggregationOperationContext context) {
if (value instanceof AggregationExpression) {
@@ -123,13 +126,13 @@ abstract class AbstractAggregationExpression implements AggregationExpression {
return Arrays.asList(this.value, value);
}
@SuppressWarnings("unchecked")
protected java.util.Map<String, Object> append(String key, Object value) {
if (!(this.value instanceof java.util.Map)) {
throw new IllegalArgumentException("o_O");
}
java.util.Map<String, Object> clone = new LinkedHashMap<String, Object>(
(java.util.Map<String, Object>) this.value);
java.util.Map<String, Object> clone = new LinkedHashMap<String, Object>((java.util.Map<String, Object>) this.value);
clone.put(key, value);
return clone;
@@ -143,7 +146,7 @@ abstract class AbstractAggregationExpression implements AggregationExpression {
if (value instanceof java.util.Map) {
return new ArrayList<Object>(((java.util.Map) value).values());
}
return new ArrayList<Object>(Arrays.asList(value));
return new ArrayList<Object>(Collections.singletonList(value));
}
protected abstract String getMongoMethod();

View File

@@ -44,7 +44,7 @@ public class AccumulatorOperators {
/**
* Take the numeric value referenced resulting from given {@link AggregationExpression}.
*
* @param fieldReference must not be {@literal null}.
* @param expression must not be {@literal null}.
* @return
*/
public static AccumulatorOperatorFactory valueOf(AggregationExpression expression) {
@@ -72,7 +72,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link ArrayOperatorFactory} for given {@link AggregationExpression}.
* Creates new {@link AccumulatorOperatorFactory} for given {@link AggregationExpression}.
*
* @param expression must not be {@literal null}.
*/
@@ -84,7 +84,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated numeric value expression and calculates and
* Creates new {@link AggregationExpression} that takes the associated numeric value expression and calculates and
* returns the sum.
*
* @return
@@ -94,7 +94,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated numeric value expression and returns the
* Creates new {@link AggregationExpression} that takes the associated numeric value expression and returns the
* average value.
*
* @return
@@ -104,7 +104,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated numeric value expression and returns the
* Creates new {@link AggregationExpression} that takes the associated numeric value expression and returns the
* maximum value.
*
* @return
@@ -114,7 +114,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated numeric value expression and returns the
* Creates new {@link AggregationExpression} that takes the associated numeric value expression and returns the
* minimum value.
*
* @return
@@ -124,7 +124,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated numeric value expression and calculates the
* Creates new {@link AggregationExpression} that takes the associated numeric value expression and calculates the
* population standard deviation of the input values.
*
* @return
@@ -134,7 +134,7 @@ public class AccumulatorOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated numeric value expression and calculates the
* Creates new {@link AggregationExpression} that takes the associated numeric value expression and calculates the
* sample standard deviation of the input values.
*
* @return
@@ -215,9 +215,10 @@ public class AccumulatorOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
* @see org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
*/
@Override
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
if (value instanceof List) {
@@ -297,9 +298,10 @@ public class AccumulatorOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
* @see org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
*/
@Override
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
if (value instanceof List) {
@@ -379,9 +381,10 @@ public class AccumulatorOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
* @see org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
*/
@Override
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
if (value instanceof List) {
@@ -461,9 +464,10 @@ public class AccumulatorOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
* @see org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
*/
@Override
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
if (value instanceof List) {
@@ -543,9 +547,10 @@ public class AccumulatorOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
* @see org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
*/
@Override
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
if (value instanceof List) {
@@ -625,9 +630,10 @@ public class AccumulatorOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
* @see org.springframework.data.mongodb.core.aggregation.AccumulatorOperators.AbstractAggregationExpression#toDbObject(java.lang.Object, org.springframework.data.mongodb.core.aggregation.AggregationOperationContext)
*/
@Override
@SuppressWarnings("unchecked")
public DBObject toDbObject(Object value, AggregationOperationContext context) {
if (value instanceof List) {

View File

@@ -31,7 +31,7 @@ import com.mongodb.DBObject;
* @author Oliver Gierke
* @author Christoph Strobl
* @since 1.7
* @deprecated since 1.10. Please use {@link AggregationExpressions} instead.
* @deprecated since 1.10. Please use {@link ArithmeticOperators} and {@link ComparisonOperators} instead.
*/
@Deprecated
public enum AggregationFunctionExpressions {

View File

@@ -87,7 +87,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the absolute value of the associated number.
* Creates new {@link AggregationExpression} that returns the absolute value of the associated number.
*
* @return
*/
@@ -96,7 +96,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that adds the value of {@literal fieldReference} to the associated
* Creates new {@link AggregationExpression} that adds the value of {@literal fieldReference} to the associated
* number.
*
* @param fieldReference must not be {@literal null}.
@@ -109,7 +109,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that adds the resulting value of the given
* Creates new {@link AggregationExpression} that adds the resulting value of the given
* {@link AggregationExpression} to the associated number.
*
* @param expression must not be {@literal null}.
@@ -122,7 +122,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that adds the given {@literal value} to the associated number.
* Creates new {@link AggregationExpression} that adds the given {@literal value} to the associated number.
*
* @param value must not be {@literal null}.
* @return
@@ -138,7 +138,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the smallest integer greater than or equal to the
* Creates new {@link AggregationExpression} that returns the smallest integer greater than or equal to the
* assoicated number.
*
* @return
@@ -148,7 +148,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that ivides the associated number by number referenced via
* Creates new {@link AggregationExpression} that ivides the associated number by number referenced via
* {@literal fieldReference}.
*
* @param fieldReference must not be {@literal null}.
@@ -161,7 +161,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that divides the associated number by number extracted via
* Creates new {@link AggregationExpression} that divides the associated number by number extracted via
* {@literal expression}.
*
* @param expression must not be {@literal null}.
@@ -174,7 +174,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that divides the associated number by given {@literal value}.
* Creates new {@link AggregationExpression} that divides the associated number by given {@literal value}.
*
* @param value
* @return
@@ -190,7 +190,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that raises Eulers number (i.e. e ) on the associated number.
* Creates new {@link AggregationExpression} that raises Eulers number (i.e. e ) on the associated number.
*
* @return
*/
@@ -199,7 +199,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the largest integer less than or equal to the associated
* Creates new {@link AggregationExpression} that returns the largest integer less than or equal to the associated
* number.
*
* @return
@@ -209,7 +209,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the natural logarithm ln (i.e loge) of the assoicated
* Creates new {@link AggregationExpression} that calculates the natural logarithm ln (i.e loge) of the assoicated
* number.
*
* @return
@@ -219,7 +219,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the log of the associated number in the specified base
* Creates new {@link AggregationExpression} that calculates the log of the associated number in the specified base
* referenced via {@literal fieldReference}.
*
* @param fieldReference must not be {@literal null}.
@@ -232,7 +232,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the log of the associated number in the specified base
* Creates new {@link AggregationExpression} that calculates the log of the associated number in the specified base
* extracted by given {@link AggregationExpression}.
*
* @param expression must not be {@literal null}.
@@ -245,7 +245,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the log of a the associated number in the specified
* Creates new {@link AggregationExpression} that calculates the log of a the associated number in the specified
* {@literal base}.
*
* @param base must not be {@literal null}.
@@ -262,7 +262,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the log base 10 for the associated number.
* Creates new {@link AggregationExpression} that calculates the log base 10 for the associated number.
*
* @return
*/
@@ -271,7 +271,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that divides the associated number by another and returns the
* Creates new {@link AggregationExpression} that divides the associated number by another and returns the
* remainder.
*
* @param fieldReference must not be {@literal null}.
@@ -284,7 +284,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that divides the associated number by another and returns the
* Creates new {@link AggregationExpression} that divides the associated number by another and returns the
* remainder.
*
* @param expression must not be {@literal null}.
@@ -297,7 +297,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that divides the associated number by another and returns the
* Creates new {@link AggregationExpression} that divides the associated number by another and returns the
* remainder.
*
* @param value must not be {@literal null}.
@@ -314,7 +314,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that multiplies the associated number with another.
* Creates new {@link AggregationExpression} that multiplies the associated number with another.
*
* @param fieldReference must not be {@literal null}.
* @return
@@ -326,7 +326,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that multiplies the associated number with another.
* Creates new {@link AggregationExpression} that multiplies the associated number with another.
*
* @param expression must not be {@literal null}.
* @return
@@ -338,7 +338,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that multiplies the associated number with another.
* Creates new {@link AggregationExpression} that multiplies the associated number with another.
*
* @param value must not be {@literal null}.
* @return
@@ -354,7 +354,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that raises the associated number to the specified exponent.
* Creates new {@link AggregationExpression} that raises the associated number to the specified exponent.
*
* @param fieldReference must not be {@literal null}.
* @return
@@ -366,7 +366,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that raises the associated number to the specified exponent.
* Creates new {@link AggregationExpression} that raises the associated number to the specified exponent.
*
* @param expression must not be {@literal null}.
* @return
@@ -378,7 +378,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that raises the associated number to the specified exponent.
* Creates new {@link AggregationExpression} that raises the associated number to the specified exponent.
*
* @param value must not be {@literal null}.
* @return
@@ -394,7 +394,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the square root of the associated number.
* Creates new {@link AggregationExpression} that calculates the square root of the associated number.
*
* @return
*/
@@ -403,7 +403,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that subtracts value of given from the associated number.
* Creates new {@link AggregationExpression} that subtracts value of given from the associated number.
*
* @param fieldReference must not be {@literal null}.
* @return
@@ -415,7 +415,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that subtracts value of given from the associated number.
* Creates new {@link AggregationExpression} that subtracts value of given from the associated number.
*
* @param expression must not be {@literal null}.
* @return
@@ -427,7 +427,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that subtracts value from the associated number.
* Creates new {@link AggregationExpression} that subtracts value from the associated number.
*
* @param value
* @return
@@ -443,7 +443,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that truncates a number to its integer.
* Creates new {@link AggregationExpression} that truncates a number to its integer.
*
* @return
*/
@@ -452,7 +452,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates and returns the sum of numeric values.
* Creates new {@link AggregationExpression} that calculates and returns the sum of numeric values.
*
* @return
*/
@@ -462,7 +462,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the average value of the numeric values.
* Creates new {@link AggregationExpression} that returns the average value of the numeric values.
*
* @return
*/
@@ -472,7 +472,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the maximum value.
* Creates new {@link AggregationExpression} that returns the maximum value.
*
* @return
*/
@@ -482,7 +482,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the minimum value.
* Creates new {@link AggregationExpression} that returns the minimum value.
*
* @return
*/
@@ -492,7 +492,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the population standard deviation of the input values.
* Creates new {@link AggregationExpression} that calculates the population standard deviation of the input values.
*
* @return
*/
@@ -502,7 +502,7 @@ public class ArithmeticOperators {
}
/**
* Creates new {@link AggregationExpressions} that calculates the sample standard deviation of the input values.
* Creates new {@link AggregationExpression} that calculates the sample standard deviation of the input values.
*
* @return
*/

View File

@@ -50,7 +50,7 @@ public class ArrayOperators {
/**
* Take the array referenced resulting from the given {@link AggregationExpression}.
*
* @param fieldReference must not be {@literal null}.
* @param expression must not be {@literal null}.
* @return
*/
public static ArrayOperatorFactory arrayOf(AggregationExpression expression) {
@@ -90,7 +90,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and returns the element at the
* Creates new {@link AggregationExpression} that takes the associated array and returns the element at the
* specified array {@literal position}.
*
* @param position
@@ -101,8 +101,8 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and returns the element at the
* position resulting form the given {@literal expression}.
* Creates new {@link AggregationExpression} that takes the associated array and returns the element at the position
* resulting form the given {@literal expression}.
*
* @param expression must not be {@literal null}.
* @return
@@ -114,8 +114,8 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and returns the element at the
* position defined by the referenced {@literal field}.
* Creates new {@link AggregationExpression} that takes the associated array and returns the element at the position
* defined by the referenced {@literal field}.
*
* @param fieldReference must not be {@literal null}.
* @return
@@ -131,7 +131,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and concats the given
* Creates new {@link AggregationExpression} that takes the associated array and concats the given
* {@literal arrayFieldReference} to it.
*
* @param arrayFieldReference must not be {@literal null}.
@@ -144,7 +144,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and concats the array resulting form
* Creates new {@link AggregationExpression} that takes the associated array and concats the array resulting form
* the given {@literal expression} to it.
*
* @param expression must not be {@literal null}.
@@ -161,7 +161,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and selects a subset of the array to
* Creates new {@link AggregationExpression} that takes the associated array and selects a subset of the array to
* return based on the specified condition.
*
* @return
@@ -171,7 +171,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and an check if its an array.
* Creates new {@link AggregationExpression} that takes the associated array and an check if its an array.
*
* @return
*/
@@ -180,7 +180,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and retrieves its length.
* Creates new {@link AggregationExpression} that takes the associated array and retrieves its length.
*
* @return
*/
@@ -189,7 +189,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated array and selects a subset from it.
* Creates new {@link AggregationExpression} that takes the associated array and selects a subset from it.
*
* @return
*/
@@ -198,7 +198,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that searches the associated array for an occurrence of a specified
* Creates new {@link AggregationExpression} that searches the associated array for an occurrence of a specified
* value and returns the array index (zero-based) of the first occurrence.
*
* @param value must not be {@literal null}.
@@ -210,7 +210,7 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns an array with the elements in reverse order.
* Creates new {@link AggregationExpression} that returns an array with the elements in reverse order.
*
* @return
*/
@@ -219,7 +219,7 @@ public class ArrayOperators {
}
/**
* Start creating new {@link AggregationExpressions} that applies an {@link AggregationExpression} to each element
* Start creating new {@link AggregationExpression} that applies an {@link AggregationExpression} to each element
* in an array and combines them into a single value.
*
* @param expression must not be {@literal null}.
@@ -237,7 +237,7 @@ public class ArrayOperators {
}
/**
* Start creating new {@link AggregationExpressions} that applies an {@link AggregationExpression} to each element
* Start creating new {@link AggregationExpression} that applies an {@link AggregationExpression} to each element
* in an array and combines them into a single value.
*
* @param expressions
@@ -256,9 +256,9 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that transposes an array of input arrays so that the first element
* of the output array would be an array containing, the first element of the first input array, the first element
* of the second input array, etc.
* Creates new {@link AggregationExpression} that transposes an array of input arrays so that the first element of
* the output array would be an array containing, the first element of the first input array, the first element of
* the second input array, etc.
*
* @param arrays must not be {@literal null}.
* @return
@@ -268,8 +268,8 @@ public class ArrayOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns a boolean indicating whether a specified value is in
* the associated array.
* Creates new {@link AggregationExpression} that returns a boolean indicating whether a specified value is in the
* associated array.
*
* @param value must not be {@literal null}.
* @return
@@ -575,13 +575,18 @@ public class ArrayOperators {
this.filter = new Filter();
}
/**
* Creates new {@link InputBuilder}.
*
* @return
*/
public static InputBuilder newBuilder() {
return new FilterExpressionBuilder();
}
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Filter.InputBuilder#filter(java.util.List)
* @see org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter.InputBuilder#filter(java.util.List)
*/
@Override
public AsBuilder filter(List<?> array) {
@@ -593,7 +598,7 @@ public class ArrayOperators {
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Filter.InputBuilder#filter(org.springframework.data.mongodb.core.aggregation.Field)
* @see org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter.InputBuilder#filter(org.springframework.data.mongodb.core.aggregation.Field)
*/
@Override
public AsBuilder filter(Field field) {
@@ -605,7 +610,7 @@ public class ArrayOperators {
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Filter.AsBuilder#as(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter.AsBuilder#as(java.lang.String)
*/
@Override
public ConditionBuilder as(String variableName) {
@@ -617,7 +622,7 @@ public class ArrayOperators {
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Filter.ConditionBuilder#by(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
* @see org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter.ConditionBuilder#by(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
*/
@Override
public Filter by(AggregationExpression condition) {
@@ -629,7 +634,7 @@ public class ArrayOperators {
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Filter.ConditionBuilder#by(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter.ConditionBuilder#by(java.lang.String)
*/
@Override
public Filter by(String expression) {
@@ -641,7 +646,7 @@ public class ArrayOperators {
/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Filter.ConditionBuilder#by(com.mongodb.DBObject)
* @see org.springframework.data.mongodb.core.aggregation.ArrayOperators.Filter.ConditionBuilder#by(com.mongodb.DBObject)
*/
@Override
public Filter by(DBObject expression) {
@@ -1179,7 +1184,7 @@ public class ArrayOperators {
* <b>NOTE:</b> During evaluation of the in expression the variable references {@link Variable#THIS} and
* {@link Variable#VALUE} are available.
*
* @param expression must not be {@literal null}.
* @param expressions must not be {@literal null}.
* @return
*/
Reduce reduce(PropertyExpression... expressions);

View File

@@ -51,7 +51,7 @@ public class BooleanOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates the boolean value of the referenced field and returns the
* Creates new {@link AggregationExpression} that evaluates the boolean value of the referenced field and returns the
* opposite boolean value.
*
* @param fieldReference must not be {@literal null}.
@@ -62,7 +62,7 @@ public class BooleanOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates the boolean value of {@link AggregationExpression} result
* Creates new {@link AggregationExpression} that evaluates the boolean value of {@link AggregationExpression} result
* and returns the opposite boolean value.
*
* @param expression must not be {@literal null}.
@@ -105,7 +105,7 @@ public class BooleanOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates one or more expressions and returns {@literal true} if
* Creates new {@link AggregationExpression} that evaluates one or more expressions and returns {@literal true} if
* all of the expressions are {@literal true}.
*
* @param expression must not be {@literal null}.
@@ -118,7 +118,7 @@ public class BooleanOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates one or more expressions and returns {@literal true} if
* Creates new {@link AggregationExpression} that evaluates one or more expressions and returns {@literal true} if
* all of the expressions are {@literal true}.
*
* @param fieldReference must not be {@literal null}.
@@ -135,7 +135,7 @@ public class BooleanOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates one or more expressions and returns {@literal true} if
* Creates new {@link AggregationExpression} that evaluates one or more expressions and returns {@literal true} if
* any of the expressions are {@literal true}.
*
* @param expression must not be {@literal null}.
@@ -148,7 +148,7 @@ public class BooleanOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates one or more expressions and returns {@literal true} if
* Creates new {@link AggregationExpression} that evaluates one or more expressions and returns {@literal true} if
* any of the expressions are {@literal true}.
*
* @param fieldReference must not be {@literal null}.

View File

@@ -78,7 +78,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values.
* Creates new {@link AggregationExpression} that compares two values.
*
* @param fieldReference must not be {@literal null}.
* @return
@@ -88,7 +88,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values.
* Creates new {@link AggregationExpression} that compares two values.
*
* @param expression must not be {@literal null}.
* @return
@@ -98,7 +98,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values.
* Creates new {@link AggregationExpression} that compares two values.
*
* @param value must not be {@literal null}.
* @return
@@ -112,7 +112,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is equal to the value of the referenced field.
*
* @param fieldReference must not be {@literal null}.
@@ -123,7 +123,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is equal to the expression result.
*
* @param expression must not be {@literal null}.
@@ -134,7 +134,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is equal to the given value.
*
* @param value must not be {@literal null}.
@@ -149,7 +149,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is greater than the value of the referenced field.
*
* @param fieldReference must not be {@literal null}.
@@ -160,7 +160,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is greater than the expression result.
*
* @param expression must not be {@literal null}.
@@ -171,7 +171,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is greater than the given value.
*
* @param value must not be {@literal null}.
@@ -186,7 +186,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is greater than or equivalent to the value of the referenced field.
*
* @param fieldReference must not be {@literal null}.
@@ -197,7 +197,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is greater than or equivalent to the expression result.
*
* @param expression must not be {@literal null}.
@@ -208,7 +208,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is greater than or equivalent to the given value.
*
* @param value must not be {@literal null}.
@@ -223,7 +223,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is less than the value of the referenced field.
*
* @param fieldReference must not be {@literal null}.
@@ -234,7 +234,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is less than the expression result.
*
* @param expression must not be {@literal null}.
@@ -245,7 +245,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is less than to the given value.
*
* @param value must not be {@literal null}.
@@ -260,7 +260,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is less than or equivalent to the value of the referenced field.
*
* @param fieldReference must not be {@literal null}.
@@ -271,7 +271,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is less than or equivalent to the expression result.
*
* @param expression must not be {@literal null}.
@@ -282,7 +282,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the first
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the first
* value is less than or equivalent to the given value.
*
* @param value
@@ -297,7 +297,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the values
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the values
* are not equivalent.
*
* @param fieldReference must not be {@literal null}.
@@ -308,7 +308,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the values
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the values
* are not equivalent.
*
* @param expression must not be {@literal null}.
@@ -319,7 +319,7 @@ public class ComparisonOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares two values and returns {@literal true} when the values
* Creates new {@link AggregationExpression} that compares two values and returns {@literal true} when the values
* are not equivalent.
*
* @param value must not be {@literal null}.

View File

@@ -35,6 +35,7 @@ import com.mongodb.DBObject;
* Gateway to {@literal conditional expressions} that evaluate their argument expressions as booleans to a value.
*
* @author Mark Paluch
* @since 1.10
*/
public class ConditionalOperators {
@@ -69,7 +70,7 @@ public class ConditionalOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates an expression and returns the value of the expression if
* Creates new {@link AggregationExpression} that evaluates an expression and returns the value of the expression if
* the expression evaluates to a non-null value. If the expression evaluates to a {@literal null} value, including
* instances of undefined values or missing fields, returns the value of the replacement expression.
*
@@ -83,7 +84,7 @@ public class ConditionalOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates an expression and returns the value of the expression if
* Creates new {@link AggregationExpression} that evaluates an expression and returns the value of the expression if
* the expression evaluates to a non-null value. If the expression evaluates to a {@literal null} value, including
* instances of undefined values or missing fields, returns the value of the replacement expression.
*
@@ -182,7 +183,7 @@ public class ConditionalOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates a boolean expression to return one of the two specified
* Creates new {@link AggregationExpression} that evaluates a boolean expression to return one of the two specified
* return expressions.
*
* @param expression must not be {@literal null}.
@@ -195,7 +196,7 @@ public class ConditionalOperators {
}
/**
* Creates new {@link AggregationExpressions} that evaluates a boolean expression to return one of the two specified
* Creates new {@link AggregationExpression} that evaluates a boolean expression to return one of the two specified
* return expressions.
*
* @param fieldReference must not be {@literal null}.
@@ -230,7 +231,8 @@ public class ConditionalOperators {
* field references}, {@link AggregationExpression expressions}, values of simple MongoDB types or values that can be
* converted to a simple MongoDB type.
*
* @see http://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/
* @see <a href=
* "http://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/">http://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/</a>
* @author Mark Paluch
*/
public static class IfNull implements AggregationExpression {
@@ -308,7 +310,7 @@ public class ConditionalOperators {
/**
* @author Mark Paluch
*/
public static interface IfNullBuilder {
public interface IfNullBuilder {
/**
* @param fieldReference the field to check for a {@literal null} value, field reference must not be
@@ -328,7 +330,7 @@ public class ConditionalOperators {
/**
* @author Mark Paluch
*/
public static interface ThenBuilder {
public interface ThenBuilder {
/**
* @param value the value to be used if the {@code $ifNull} condition evaluates {@literal true}. Can be a
@@ -348,11 +350,11 @@ public class ConditionalOperators {
* @param expression the expression yielding to the replacement value, must not be {@literal null}.
* @return
*/
public IfNull thenValueOf(AggregationExpression expression);
IfNull thenValueOf(AggregationExpression expression);
}
/**
* Builder for fluent {@link IfNullOperator} creation.
* Builder for fluent {@link IfNull} creation.
*
* @author Mark Paluch
*/
@@ -363,7 +365,7 @@ public class ConditionalOperators {
private IfNullOperatorBuilder() {}
/**
* Creates a new builder for {@link IfNullOperator}.
* Creates a new builder for {@link IfNull}.
*
* @return never {@literal null}.
*/
@@ -372,7 +374,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.IfNull.IfNullBuilder#ifNull(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull.IfNullBuilder#ifNull(java.lang.String)
*/
public ThenBuilder ifNull(String fieldReference) {
@@ -382,7 +384,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.IfNull.IfNullBuilder#ifNull(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull.IfNullBuilder#ifNull(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
*/
@Override
public ThenBuilder ifNull(AggregationExpression expression) {
@@ -393,14 +395,14 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.IfNull.ThenBuilder#then(java.lang.Object)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull.ThenBuilder#then(java.lang.Object)
*/
public IfNull then(Object value) {
return new IfNull(condition, value);
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.IfNull.ThenBuilder#thenValueOf(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull.ThenBuilder#thenValueOf(java.lang.String)
*/
public IfNull thenValueOf(String fieldReference) {
@@ -409,7 +411,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.IfNull.ThenBuilder#thenValueOf(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.IfNull.ThenBuilder#thenValueOf(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
*/
public IfNull thenValueOf(AggregationExpression expression) {
@@ -532,7 +534,8 @@ public class ConditionalOperators {
* {@link AggregationExpression expressions}, values of simple MongoDB types or values that can be converted to a
* simple MongoDB type.
*
* @see http://docs.mongodb.com/manual/reference/operator/aggregation/cond/
* @see <a href=
* "http://docs.mongodb.com/manual/reference/operator/aggregation/cond/">http://docs.mongodb.com/manual/reference/operator/aggregation/cond/</a>
* @author Mark Paluch
* @author Christoph Strobl
*/
@@ -763,7 +766,7 @@ public class ConditionalOperators {
/**
* @author Mark Paluch
*/
public static interface WhenBuilder {
public interface WhenBuilder {
/**
* @param booleanExpression expression that yields in a boolean result, must not be {@literal null}.
@@ -793,7 +796,7 @@ public class ConditionalOperators {
/**
* @author Mark Paluch
*/
public static interface ThenBuilder {
public interface ThenBuilder {
/**
* @param value the value to be used if the condition evaluates {@literal true}. Can be a {@link DBObject}, a
@@ -819,7 +822,7 @@ public class ConditionalOperators {
/**
* @author Mark Paluch
*/
public static interface OtherwiseBuilder {
public interface OtherwiseBuilder {
/**
* @param value the value to be used if the condition evaluates {@literal false}. Can be a {@link DBObject}, a
@@ -864,7 +867,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.WhenBuilder#when(com.mongodb.DBObject)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.WhenBuilder#when(com.mongodb.DBObject)
*/
@Override
public ConditionalExpressionBuilder when(DBObject booleanExpression) {
@@ -876,7 +879,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.WhenBuilder#when(org.springframework.data.mongodb.core.query.CriteriaDefinition)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.WhenBuilder#when(org.springframework.data.mongodb.core.query.CriteriaDefinition)
*/
@Override
public ThenBuilder when(CriteriaDefinition criteria) {
@@ -887,7 +890,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.WhenBuilder#when(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.WhenBuilder#when(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
*/
@Override
public ThenBuilder when(AggregationExpression expression) {
@@ -898,7 +901,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.WhenBuilder#when(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.WhenBuilder#when(java.lang.String)
*/
@Override
public ThenBuilder when(String booleanField) {
@@ -909,7 +912,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.ThenBuilder#then(java.lang.Object)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.ThenBuilder#then(java.lang.Object)
*/
@Override
public OtherwiseBuilder then(Object thenValue) {
@@ -920,7 +923,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.ThenBuilder#thenValueOf(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.ThenBuilder#thenValueOf(java.lang.String)
*/
@Override
public OtherwiseBuilder thenValueOf(String fieldReference) {
@@ -931,7 +934,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.ThenBuilder#thenValueOf(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.ThenBuilder#thenValueOf(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
*/
@Override
public OtherwiseBuilder thenValueOf(AggregationExpression expression) {
@@ -942,7 +945,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.OtherwiseBuilder#otherwise(java.lang.Object)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.OtherwiseBuilder#otherwise(java.lang.Object)
*/
@Override
public Cond otherwise(Object otherwiseValue) {
@@ -952,7 +955,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.OtherwiseBuilder#otherwiseValueOf(java.lang.String)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.OtherwiseBuilder#otherwiseValueOf(java.lang.String)
*/
@Override
public Cond otherwiseValueOf(String fieldReference) {
@@ -962,7 +965,7 @@ public class ConditionalOperators {
}
/* (non-Javadoc)
* @see org.springframework.data.mongodb.core.aggregation.AggregationExpressions.Cond.OtherwiseBuilder#otherwiseValueOf(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
* @see org.springframework.data.mongodb.core.aggregation.ConditionalOperators.Cond.OtherwiseBuilder#otherwiseValueOf(org.springframework.data.mongodb.core.aggregation.AggregationExpression)
*/
@Override
public Cond otherwiseValueOf(AggregationExpression expression) {

View File

@@ -85,7 +85,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the day of the year for a date as a number between 1 and
* Creates new {@link AggregationExpression} that returns the day of the year for a date as a number between 1 and
* 366.
*
* @return
@@ -95,7 +95,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the day of the month for a date as a number between 1 and
* Creates new {@link AggregationExpression} that returns the day of the month for a date as a number between 1 and
* 31.
*
* @return
@@ -105,7 +105,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the day of the week for a date as a number between 1
* Creates new {@link AggregationExpression} that returns the day of the week for a date as a number between 1
* (Sunday) and 7 (Saturday).
*
* @return
@@ -115,7 +115,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the year portion of a date.
* Creates new {@link AggregationExpression} that returns the year portion of a date.
*
* @return
*/
@@ -124,7 +124,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the month of a date as a number between 1 and 12.
* Creates new {@link AggregationExpression} that returns the month of a date as a number between 1 and 12.
*
* @return
*/
@@ -133,7 +133,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the week of the year for a date as a number between 0 and
* Creates new {@link AggregationExpression} that returns the week of the year for a date as a number between 0 and
* 53.
*
* @return
@@ -143,7 +143,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the hour portion of a date as a number between 0 and 23.
* Creates new {@link AggregationExpression} that returns the hour portion of a date as a number between 0 and 23.
*
* @return
*/
@@ -152,8 +152,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the minute portion of a date as a number between 0 and
* 59.
* Creates new {@link AggregationExpression} that returns the minute portion of a date as a number between 0 and 59.
*
* @return
*/
@@ -162,8 +161,8 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the second portion of a date as a number between 0 and
* 59, but can be 60 to account for leap seconds.
* Creates new {@link AggregationExpression} that returns the second portion of a date as a number between 0 and 59,
* but can be 60 to account for leap seconds.
*
* @return
*/
@@ -172,7 +171,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the millisecond portion of a date as an integer between 0
* Creates new {@link AggregationExpression} that returns the millisecond portion of a date as an integer between 0
* and 999.
*
* @return
@@ -182,7 +181,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that converts a date object to a string according to a user-specified
* Creates new {@link AggregationExpression} that converts a date object to a string according to a user-specified
* {@literal format}.
*
* @param format must not be {@literal null}.
@@ -193,8 +192,8 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the weekday number in ISO 8601 format, ranging from 1
* (for Monday) to 7 (for Sunday).
* Creates new {@link AggregationExpression} that returns the weekday number in ISO 8601 format, ranging from 1 (for
* Monday) to 7 (for Sunday).
*
* @return
*/
@@ -203,7 +202,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the week number in ISO 8601 format, ranging from 1 to 53.
* Creates new {@link AggregationExpression} that returns the week number in ISO 8601 format, ranging from 1 to 53.
*
* @return
*/
@@ -212,7 +211,7 @@ public class DateOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the year number in ISO 8601 format.
* Creates new {@link AggregationExpression} that returns the year number in ISO 8601 format.
*
* @return
*/

View File

@@ -56,7 +56,7 @@ public class LiteralOperators {
}
/**
* Creates new {@link AggregationExpressions} that returns the associated value without parsing.
* Creates new {@link Literal} that returns the associated value without parsing.
*
* @return
*/

View File

@@ -83,7 +83,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares the previously mentioned field to one or more arrays and
* Creates new {@link AggregationExpression} that compares the previously mentioned field to one or more arrays and
* returns {@literal true} if they have the same distinct elements and {@literal false} otherwise.
*
* @param arrayReferences must not be {@literal null}.
@@ -94,7 +94,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that compares the previously mentioned field to one or more arrays and
* Creates new {@link AggregationExpression} that compares the previously mentioned field to one or more arrays and
* returns {@literal true} if they have the same distinct elements and {@literal false} otherwise.
*
* @param expressions must not be {@literal null}.
@@ -109,7 +109,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and one or more
* Creates new {@link AggregationExpression} 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.
*
* @param arrayReferences must not be {@literal null}.
@@ -120,7 +120,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and one or more
* Creates new {@link AggregationExpression} 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.
*
* @param expressions must not be {@literal null}.
@@ -135,7 +135,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and one or more
* Creates new {@link AggregationExpression} 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.
*
* @param arrayReferences must not be {@literal null}.
@@ -146,7 +146,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and one or more
* Creates new {@link AggregationExpression} 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.
*
* @param expressions must not be {@literal null}.
@@ -161,8 +161,8 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and returns an
* array containing the elements that do not exist in the given {@literal arrayReference}.
* Creates new {@link AggregationExpression} that takes array of the previously mentioned field and returns an array
* containing the elements that do not exist in the given {@literal arrayReference}.
*
* @param arrayReference must not be {@literal null}.
* @return
@@ -172,8 +172,8 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and returns an
* array containing the elements that do not exist in the given {@link AggregationExpression}.
* Creates new {@link AggregationExpression} that takes array of the previously mentioned field and returns an array
* containing the elements that do not exist in the given {@link AggregationExpression}.
*
* @param expression must not be {@literal null}.
* @return
@@ -187,7 +187,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and returns
* Creates new {@link AggregationExpression} that takes array of the previously mentioned field and returns
* {@literal true} if it is a subset of the given {@literal arrayReference}.
*
* @param arrayReference must not be {@literal null}.
@@ -198,7 +198,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and returns
* Creates new {@link AggregationExpression} that takes array of the previously mentioned field and returns
* {@literal true} if it is a subset of the given {@link AggregationExpression}.
*
* @param expression must not be {@literal null}.
@@ -213,7 +213,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes array of the previously mentioned field and returns
* Creates new {@link AggregationExpression} that takes array of the previously mentioned field and returns
* {@literal true} if any of the elements are {@literal true} and {@literal false} otherwise.
*
* @return
@@ -223,7 +223,7 @@ public class SetOperators {
}
/**
* Creates new {@link AggregationExpressions} that tkes array of the previously mentioned field and returns
* Creates new {@link AggregationExpression} that tkes array of the previously mentioned field and returns
* {@literal true} if no elements is {@literal false}.
*
* @return

View File

@@ -84,7 +84,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and concats the value
* Creates new {@link AggregationExpression} that takes the associated string representation and concats the value
* of the referenced field to it.
*
* @param fieldReference must not be {@literal null}.
@@ -97,7 +97,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and concats the result
* Creates new {@link AggregationExpression} that takes the associated string representation and concats the result
* of the given {@link AggregationExpression} to it.
*
* @param expression must not be {@literal null}.
@@ -110,7 +110,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and concats given
* Creates new {@link AggregationExpression} that takes the associated string representation and concats given
* {@literal value} to it.
*
* @param value must not be {@literal null}.
@@ -127,8 +127,8 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and returns a
* substring starting at a specified index position.
* Creates new {@link AggregationExpression} that takes the associated string representation and returns a substring
* starting at a specified index position.
*
* @param start
* @return
@@ -138,8 +138,8 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and returns a
* substring starting at a specified index position including the specified number of characters.
* Creates new {@link AggregationExpression} that takes the associated string representation and returns a substring
* starting at a specified index position including the specified number of characters.
*
* @param start
* @param nrOfChars
@@ -154,7 +154,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and lowers it.
* Creates new {@link AggregationExpression} that takes the associated string representation and lowers it.
*
* @return
*/
@@ -163,7 +163,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and uppers it.
* Creates new {@link AggregationExpression} that takes the associated string representation and uppers it.
*
* @return
*/
@@ -172,7 +172,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and performs
* Creates new {@link AggregationExpression} that takes the associated string representation and performs
* case-insensitive comparison to the given {@literal value}.
*
* @param value must not be {@literal null}.
@@ -185,7 +185,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and performs
* Creates new {@link AggregationExpression} that takes the associated string representation and performs
* case-insensitive comparison to the referenced {@literal fieldReference}.
*
* @param fieldReference must not be {@literal null}.
@@ -198,7 +198,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and performs
* Creates new {@link AggregationExpression} that takes the associated string representation and performs
* case-insensitive comparison to the result of the given {@link AggregationExpression}.
*
* @param expression must not be {@literal null}.
@@ -215,7 +215,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and searches a string
* Creates new {@link AggregationExpression} that takes the associated string representation and searches a string
* for an occurrence of a given {@literal substring} and returns the UTF-8 byte index (zero-based) of the first
* occurrence.
*
@@ -229,7 +229,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and searches a string
* Creates new {@link AggregationExpression} that takes the associated string representation and searches a string
* for an occurrence of a substring contained in the given {@literal field reference} and returns the UTF-8 byte
* index (zero-based) of the first occurrence.
*
@@ -243,7 +243,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and searches a string
* Creates new {@link AggregationExpression} that takes the associated string representation and searches a string
* for an occurrence of a substring resulting from the given {@link AggregationExpression} and returns the UTF-8
* byte index (zero-based) of the first occurrence.
*
@@ -261,7 +261,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and searches a string
* Creates new {@link AggregationExpression} that takes the associated string representation and searches a string
* for an occurrence of a given {@literal substring} and returns the UTF-8 code point index (zero-based) of the
* first occurrence.
*
@@ -275,7 +275,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and searches a string
* Creates new {@link AggregationExpression} that takes the associated string representation and searches a string
* for an occurrence of a substring contained in the given {@literal field reference} and returns the UTF-8 code
* point index (zero-based) of the first occurrence.
*
@@ -289,7 +289,7 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and searches a string
* Creates new {@link AggregationExpression} that takes the associated string representation and searches a string
* for an occurrence of a substring resulting from the given {@link AggregationExpression} and returns the UTF-8
* code point index (zero-based) of the first occurrence.
*
@@ -365,8 +365,8 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and returns a
* substring starting at a specified code point index position.
* Creates new {@link AggregationExpression} that takes the associated string representation and returns a substring
* starting at a specified code point index position.
*
* @param codePointStart
* @return
@@ -376,8 +376,8 @@ public class StringOperators {
}
/**
* Creates new {@link AggregationExpressions} that takes the associated string representation and returns a
* substring starting at a specified code point index position including the specified number of code points.
* Creates new {@link AggregationExpression} that takes the associated string representation and returns a substring
* starting at a specified code point index position including the specified number of code points.
*
* @param codePointStart
* @param nrOfCodePoints

View File

@@ -129,7 +129,7 @@ public class VariableOperators {
}
};
};
}
/**
* Starts building new {@link Map} that applies an {@link AggregationExpression} to each item of a referenced array

View File

@@ -57,9 +57,9 @@ import org.springframework.data.mapping.model.MappingException;
import org.springframework.data.mongodb.core.CollectionCallback;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.Venue;
import org.springframework.data.mongodb.core.aggregation.VariableOperators.Let.ExpressionVariable;
import org.springframework.data.mongodb.core.aggregation.AggregationTests.CarDescriptor.Entry;
import org.springframework.data.mongodb.core.aggregation.BucketAutoOperation.Granularities;
import org.springframework.data.mongodb.core.aggregation.VariableOperators.Let.ExpressionVariable;
import org.springframework.data.mongodb.core.index.GeospatialIndex;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.query.Criteria;