Class ClassExpression

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

public class ClassExpression extends Expression
Expression representing a candidate in a FROM clause. This is used in JPQL where we have a "from" clause like
 SELECT ... FROM Product p JOIN p.reviews r
so the ClassExpression is for alias "p" of type Product. The class name is stored in the Symbol, keyed by this alias. Can have a JoinExpression to its right.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • candidateExpression

      String candidateExpression
      Optional candidate expression when in subquery and the class is a relation to the outer query.
  • Constructor Details

    • ClassExpression

      public ClassExpression(String alias)
  • Method Details

    • setCandidateExpression

      public void setCandidateExpression(String expr)
    • getCandidateExpression

      public String getCandidateExpression()
    • setJoinExpression

      public void setJoinExpression(JoinExpression expr)
      Set the right expression to the provided join.
      Parameters:
      expr - Join information
    • getAlias

      public String getAlias()
      Overrides:
      getAlias in class Expression
    • 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()
      Overrides:
      toString in class Object