Class PrimaryExpression

java.lang.Object
org.datanucleus.store.query.expression.Expression
org.datanucleus.store.query.expression.PrimaryExpression
All Implemented Interfaces:
Serializable

public class PrimaryExpression extends Expression
Expression for a primary object. This may be a field, or an explicit variable/parameter, or a field invoked on an expression.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • tuples

      List<String> tuples
      The components of the expression. e.g "a.b.c" will have "a", "b", "c".
  • Constructor Details

    • PrimaryExpression

      public PrimaryExpression(List<String> tuples)
      PrimaryExpression made up of a series of field names. e.g "a.b.c"
      Parameters:
      tuples - The components of the expression
    • PrimaryExpression

      public PrimaryExpression(Expression left, List<String> tuples)
      PrimaryExpression on an expression. e.g "((B)a).c" so the left expression is a CastExpression, and the tuples are "c".
      Parameters:
      left - The left expression
      tuples - The tuples of the primary
  • Method Details

    • getId

      public String getId()
      Accessor for the expression "id". This will be something like "a.b.c".
      Returns:
      The id
    • getTuples

      public List<String> getTuples()
    • bind

      public Symbol bind(SymbolTable symtbl)
      Method to bind the expression to the symbol table as appropriate.
      Specified by:
      bind in class Expression
      Parameters:
      symtbl - Symbol Table
      Returns:
      The symbol for this expression
    • toString

      public String toString()
      Accessor for string form of the expression. Returns something like "PrimaryExpression {a.b.c}" when left is null, or "PrimaryExpression {ParameterExpression {a}.b.c}" when left is the ParameterExpression
      Overrides:
      toString in class Object