Class Delete

java.lang.Object
org.castor.cpa.persistence.sql.query.Delete
All Implemented Interfaces:
QueryObject

public final class Delete extends Object implements QueryObject
Class to generate SQL delete query statements.
Note: Be aware that the SQL statement will be invalid for empty compound conditions.
Version:
$Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Ahmad Hassan, Ralf Joachim
  • Constructor Details

    • Delete

      public Delete(String name)
      Construct a SQL delete statement that deletes records of the table with given name.
      Parameters:
      name - Name of the table to delete records of.
  • Method Details

    • getCondition

      public Condition getCondition()
      Get condition that specifies which records to delete.
      Returns:
      Condition that specifies which records to delete.
    • setCondition

      public void setCondition(Condition condition)
      Set condition that specifies which records to delete.
      Parameters:
      condition - Condition that specifies which records to delete.
    • getQualifier

      public Qualifier getQualifier()
      Get method returning Qualifier currently set.
      Returns:
      Qualifier currently set.
    • accept

      public void accept(Visitor visitor)
      Accept method to handle incoming visitors.
      Specified by:
      accept in interface QueryObject
      Parameters:
      visitor - Visitor to be handled.
    • toString

      public String toString()
      Method constructing query string.
      Overrides:
      toString in class Object
      Returns:
      Constructed query string.