org.castor.cpa.persistence.sql.query
Class Delete

java.lang.Object
  extended by org.castor.cpa.persistence.sql.query.QueryObject
      extended by org.castor.cpa.persistence.sql.query.Delete

public final class Delete
extends 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 Summary
Delete(java.lang.String name)
          Construct a SQL delete statement that deletes records of the table with given name.
 
Method Summary
 Condition getCondition()
          Get condition that specifies which records to delete.
 void setCondition(Condition condition)
          Set condition that specifies which records to delete.
 void toString(QueryContext ctx)
          Append a string representation of the object to the given QueryContext.
 
Methods inherited from class org.castor.cpa.persistence.sql.query.QueryObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Delete

public Delete(java.lang.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 Detail

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.

toString

public void toString(QueryContext ctx)
Description copied from class: QueryObject
Append a string representation of the object to the given QueryContext. In general, this toString method appends a string that "textually represents" this object. The result should be a string in valid SQL syntax. It is required that all subclasses override this method.

Specified by:
toString in class QueryObject
Parameters:
ctx - QueryContext to append the string representation of the object to.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com