Enum Class SystemVariable
- All Implemented Interfaces:
Serializable
,Comparable<SystemVariable>
,Constable
,AggregationVariable
,Field
Describes the system variables available in MongoDB aggregation framework pipeline expressions.
- Author:
- Thomas Darimont, Christoph Strobl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionVariable for the current timestamp.Variable that references the start of the field path being processed.One of the allowed results of a $redact expressionOne of the allowed results of a $redact expressionVariable for the current datetime.One of the allowed results of a $redact expressionVariable that evaluates to a missing value.Variable that references the root document.A variable that stores the metadata results of an Atlas Search query. -
Field Summary
Fields inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationVariable
PREFIX
-
Method Summary
Modifier and TypeMethodDescriptionReturns the target of the field.static boolean
isReferingToSystemVariable
(String fieldRef) Return true if the givenfieldRef
denotes a well-known system variable, false otherwise.toString()
static SystemVariable
Returns the enum constant of this class with the specified name.static SystemVariable[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface org.springframework.data.mongodb.core.aggregation.AggregationVariable
getName, isAliased, isInternal
-
Enum Constant Details
-
NOW
Variable for the current datetime.- Since:
- 4.0
-
CLUSTER_TIME
Variable for the current timestamp.- Since:
- 4.0
-
ROOT
Variable that references the root document. -
CURRENT
Variable that references the start of the field path being processed. -
REMOVE
Variable that evaluates to a missing value. -
DESCEND
One of the allowed results of a $redact expression- Since:
- 4.0
-
PRUNE
One of the allowed results of a $redact expression- Since:
- 4.0
-
KEEP
One of the allowed results of a $redact expression- Since:
- 4.0
-
SEARCH_META
A variable that stores the metadata results of an Atlas Search query.- Since:
- 4.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isReferingToSystemVariable
Return true if the givenfieldRef
denotes a well-known system variable, false otherwise.- Parameters:
fieldRef
- may be null.- Returns:
- true if the given field refers to a
SystemVariable
.
-
toString
- Overrides:
toString
in classEnum<SystemVariable>
-
getTarget
Description copied from interface:Field
Returns the target of the field. In case no explicit target is availableField.getName()
should be returned.
-