Class DeleteStatement

  • All Implemented Interfaces:
    Expression

    public final class DeleteStatement
    extends AbstractExpression
    Bulk delete operation apply to entities of a single entity class (together with its subclasses, if any).
    BNF: delete_statement ::= delete_clause [where_clause]

    Since:
    2.3
    Version:
    2.5
    Author:
    Pascal Filion
    • Constructor Detail

      • DeleteStatement

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

      • addDeleteClause

        public DeleteClause addDeleteClause()
        Manually adds the delete clause to this delete statement.
      • getDeleteClause

        public DeleteClause getDeleteClause()
        Returns the Expression representing the DELETE clause.
        Returns:
        The expression that was parsed representing the DELETE expression
      • getWhereClause

        public Expression getWhereClause()
        Returns the Expression representing the WHERE clause.
        Returns:
        The expression representing the WHERE clause
      • hasSpaceAfterDeleteClause

        public boolean hasSpaceAfterDeleteClause()
        Determines whether a whitespace was found after the DELETE FROM clause. In some cases, the space is owned by a child of the DELETE FROM clause.
        Returns:
        true if there was a whitespace after the DELETE FROM clause and owned by this expression; false otherwise
      • hasWhereClause

        public boolean hasWhereClause()
        Determines whether the WHERE clause is defined.
        Returns:
        true if the query that got parsed had the WHERE clause