Class Update

  • All Implemented Interfaces:
    Serializable

    public class Update
    extends Expression
    Represents the UPDATE operator.
    Since:
    2.0.0
    Author:
    Rui Vilao(rui.vilao@feedzai.com)
    See Also:
    Serialized Form
    • Constructor Detail

      • Update

        public Update​(Expression table)
        Creates a new instance of Update.
        Parameters:
        table - The table to update.
    • Method Detail

      • set

        public Update set​(Expression... exps)
        The set keyword.
        Parameters:
        exps - The expressions.
        Returns:
        This expression.
      • translate

        public String translate()
        Description copied from class: Expression
        Translates the expression.
        Specified by:
        translate in class Expression
        Returns:
        A translation of the implementing expression.
      • getTable

        public Expression getTable()
        Gets the table.
        Returns:
        The table.
      • getColumns

        public List<Expression> getColumns()
        Gets the columns.
        Returns:
        The columns.
      • getFrom

        public Expression getFrom()
        Gets the FROM expression.
        Returns:
        The FROM expression.
      • hasFrom

        public boolean hasFrom()
        Checks whether the FROM expression is defined.
        Returns:
        true if the FROM expression is defined, false otherwise.
      • getWhere

        public Expression getWhere()
        Gets the WHERE expression.
        Returns:
        The WHERE expression.
      • hasWhere

        public boolean hasWhere()
        Checks whether the WHERE expression is defined.
        Returns:
        true if the WHERE expression is defined, false otherwise.
      • set

        public Update set​(Collection<? extends Expression> exps)
        The set keyword.
        Parameters:
        exps - The expressions.
        Returns:
        This expression.
      • from

        public Update from​(Expression from)
        Adds the FROM expression.
        Parameters:
        from - The FROM expression.
        Returns:
        This expression.
      • where

        public Update where​(Expression where)
        Adds the WHERE expression.
        Parameters:
        where - The WHERE expression.
        Returns:
        This expression.