Class UpdateStatement

  • All Implemented Interfaces:
    Expression

    public final class UpdateStatement
    extends AbstractExpression
    The UPDATE clause of a query consists of a conditional expression used to select objects or values that satisfy the expression. The UPDATE clause restricts the result of a select statement or the scope of an update operation.
    BNF: update_statement ::= update_clause [where_clause]

    Since:
    2.3
    Version:
    2.5
    Author:
    Pascal Filion
    See Also:
    JPQLExpression, UpdateClause, WhereClause
    • Constructor Detail

      • UpdateStatement

        public UpdateStatement​(AbstractExpression parent)
        Creates a new UpdateStatement.
        Parameters:
        parent - The parent of this expression
    • Method Detail

      • getUpdateClause

        public UpdateClause getUpdateClause()
        Returns the UpdateClause representing the UPDATE clause.
        Returns:
        The section of the update statement representing the UPDATE clause
      • getWhereClause

        public Expression getWhereClause()
        Returns the Expression representing the WHERE clause.
        Returns:
        The section of the update statement representing the WHERE clause
      • hasSpaceAfterUpdateClause

        public boolean hasSpaceAfterUpdateClause()
        Determines whether a whitespace was parsed after the UPDATE clause.
        Returns:
        true if a whitespace was parsed after the UPDATE clause; false otherwise
      • hasWhereClause

        public boolean hasWhereClause()
        Determines whether the WHERE clause is defined or not.
        Returns:
        true if this statement has a WHERE clause; false if it was not parsed