Module spring.data.mongodb
Interface AggregationVariable
- All Superinterfaces:
Field
- All Known Implementing Classes:
ArrayOperators.Reduce.Variable,SystemVariable
A special field that points to a variable
$$ expression.- Since:
- 4.1.3
- Author:
- Christoph Strobl
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetName()Returns the name of the field.default booleanReturns whether the Field is aliased, which means it has a name set different from the target.default booleanstatic booleanisVariable(String fieldRef) Check if the given field name reference may be variable.static booleanisVariable(Field field) Check if the given field may be variable.static AggregationVariablelocalVariable(String value) Create a newlocalAggregationVariablefor the given name.static AggregationVariableCreate a newAggregationVariablefor the given name.
-
Field Details
-
PREFIX
- See Also:
-
-
Method Details
-
isAliased
default boolean isAliased()Description copied from interface:FieldReturns whether the Field is aliased, which means it has a name set different from the target. -
getName
Description copied from interface:FieldReturns the name of the field. -
isInternal
default boolean isInternal()- Specified by:
isInternalin interfaceField- Returns:
- true if the field name references a local value such as
$$this.
-
variable
Create a newAggregationVariablefor the given name.Variables start with
$$. If not, the given value gets prefixed with$$.- Parameters:
value- must not be null.- Returns:
- new instance of
AggregationVariable. - Throws:
IllegalArgumentException- if given value is null.
-
localVariable
Create a newlocalAggregationVariablefor the given name.Variables start with
$$. If not, the given value gets prefixed with$$.- Parameters:
value- must not be null.- Returns:
- new instance of
AggregationVariable. - Throws:
IllegalArgumentException- if given value is null.
-
isVariable
Check if the given field name reference may be variable.- Parameters:
fieldRef- can be null.- Returns:
- true if given value matches the variable identification pattern.
-
isVariable
Check if the given field may be variable.- Parameters:
field- can be null.- Returns:
- true if given
fieldis anAggregationVariableor if its value is avariable.
-