Enum Class SystemVariable

java.lang.Object
java.lang.Enum<SystemVariable>
org.springframework.data.mongodb.core.aggregation.SystemVariable
All Implemented Interfaces:
Serializable, Comparable<SystemVariable>, Constable

public enum SystemVariable extends Enum<SystemVariable>
Describes the system variables available in MongoDB aggregation framework pipeline expressions.
Author:
Thomas Darimont, Christoph Strobl
See Also:
  • Enum Constant Details

    • NOW

      public static final SystemVariable NOW
      Variable for the current datetime.
      Since:
      4.0
    • CLUSTER_TIME

      public static final SystemVariable CLUSTER_TIME
      Variable for the current timestamp.
      Since:
      4.0
    • ROOT

      public static final SystemVariable ROOT
      Variable that references the root document.
    • CURRENT

      public static final SystemVariable CURRENT
      Variable that references the start of the field path being processed.
    • REMOVE

      public static final SystemVariable REMOVE
      Variable that evaluates to a missing value.
    • DESCEND

      public static final SystemVariable DESCEND
      One of the allowed results of a $redact expression
      Since:
      4.0
    • PRUNE

      public static final SystemVariable PRUNE
      One of the allowed results of a $redact expression
      Since:
      4.0
    • KEEP

      public static final SystemVariable KEEP
      One of the allowed results of a $redact expression
      Since:
      4.0
    • SEARCH_META

      public static final SystemVariable SEARCH_META
      A variable that stores the metadata results of an Atlas Search query.
      Since:
      4.0
  • Method Details

    • values

      public static SystemVariable[] 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

      public static SystemVariable valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isReferingToSystemVariable

      public static boolean isReferingToSystemVariable(@Nullable String fieldRef)
      Return true if the given fieldRef denotes a well-known system variable, false otherwise.
      Parameters:
      fieldRef - may be null.
      Returns:
      true if the given field refers to a SystemVariable.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<SystemVariable>