Class AbstractCaseExpression

    • Constructor Detail

      • AbstractCaseExpression

        protected AbstractCaseExpression()
    • Method Detail

      • getWhenCount

        public abstract int getWhenCount()
        Gets the number of WHEN and THEN parts this case expression contains. This number is always >= 1.
        Returns:
      • getThenExpression

        public Expression getThenExpression​(int index)
        Gets the expression of the THEN part at the given index.
        Parameters:
        index -
        Returns:
      • getThen

        public List getThen()
        Gets the List of THEN expressions in this CASE expression. Never null.
        Returns:
      • setThen

        protected void setThen​(List then)
        Sets the List of THEN expressions in this CASE expression
        Parameters:
        then -
      • getElseExpression

        public Expression getElseExpression()
        Gets the expression in the ELSE part of this expression. May be null as the ELSE is optional.
        Returns:
      • setElseExpression

        public void setElseExpression​(Expression elseExpression)
        Sets the expression in the ELSE part of this expression. Can be null.
        Parameters:
        elseExpression -
      • setType

        public void setType​(Class type)
        Sets the type to which this expression has resolved.
        Parameters:
        type -
      • hashCode

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

        public abstract Object clone()
        Description copied from interface: LanguageObject
        Implement clone to make objects cloneable.
        Specified by:
        clone in interface LanguageObject
        Overrides:
        clone in class Object
        Returns:
        Deep clone of this object
      • toString

        public String toString()
        Return a String representation of this object using SQLStringVisitor.
        Overrides:
        toString in class Object
        Returns:
        String representation using SQLStringVisitor
      • setWhen

        public abstract void setWhen​(List whens,
                                     List thens)