Class ClassExpression

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • Field Detail

      • candidateExpression

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

      • ClassExpression

        public ClassExpression​(java.lang.String alias)
    • Method Detail

      • setCandidateExpression

        public void setCandidateExpression​(java.lang.String expr)
      • getCandidateExpression

        public java.lang.String getCandidateExpression()
      • setJoinExpression

        public void setJoinExpression​(JoinExpression expr)
        Set the right expression to the provided join.
        Parameters:
        expr - Join information
      • 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object