Class Variable<TExpression>

java.lang.Object
com.mongodb.client.model.Variable<TExpression>
Type Parameters:
TExpression - the type of the value for the new variable

public class Variable<TExpression> extends Object
Helps define new variable for the $lookup pipeline stage
Since:
3.7
MongoDB documentation
$lookup
Since server release
3.6
  • Constructor Details

    • Variable

      public Variable(String name, TExpression value)
      Creates a new variable definition for use in $lookup pipeline stages
      Parameters:
      name - the name of the new variable
      value - the value of the new variable
      MongoDB documentation
      $lookup
  • Method Details

    • getName

      public String getName()
      Returns:
      the name of the new variable
    • getValue

      public TExpression getValue()
      Returns:
      the value of the new variable
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object