org.axiondb.engine.commands
Class DeleteCommand

java.lang.Object
  extended byorg.axiondb.engine.commands.BaseAxionCommand
      extended byorg.axiondb.engine.commands.DeleteCommand
All Implemented Interfaces:
AxionCommand

public class DeleteCommand
extends BaseAxionCommand

A DELETE command.

Version:
$Revision: 1.26 $ $Date: 2004/08/19 02:18:49 $

Constructor Summary
DeleteCommand(String tableName, Selectable where)
           
DeleteCommand(TableIdentifier table, Selectable where)
           
 
Method Summary
 boolean execute(Database database)
          Executes an SQL statement that may return multiple results.
 AxionResultSet executeQuery(Database database)
          Unsupported
 int executeUpdate(Database db)
          Executes an SQL that may add, delete or modify zero or more rows within the database, such as an INSERT, UPDATE or DELETE statement.
protected  Iterator getBindVariableIterator()
          Returns an Iteratorover all my BindVariables, in the proper order.
 TableIdentifier getTable()
           
 Selectable getWhere()
           
 void setTable(TableIdentifier table)
           
 void setWhere(Selectable where)
           
 
Methods inherited from class org.axiondb.engine.commands.BaseAxionCommand
appendBindVariables, assertNotReadOnly, attemptToConvertValue, bind, clearBindings, getEffectedRowCount, getResultSet, getRowIterator, getRowIterator, getTableForIdentifier, resolveSelectableList, resolveSelectableList, setEffectedRowCount, setResultSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteCommand

public DeleteCommand(String tableName,
                     Selectable where)

DeleteCommand

public DeleteCommand(TableIdentifier table,
                     Selectable where)
Method Detail

getTable

public TableIdentifier getTable()

setTable

public void setTable(TableIdentifier table)

setWhere

public void setWhere(Selectable where)

getWhere

public Selectable getWhere()

executeUpdate

public int executeUpdate(Database db)
                  throws AxionException
Description copied from interface: AxionCommand
Executes an SQL that may add, delete or modify zero or more rows within the database, such as an INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing, such as SQL DDL statements, can be executed via this method.

Returns:
the number of rows modified
Throws:
AxionException
See Also:
Statement.executeUpdate(java.lang.String), PreparedStatement.executeUpdate()

executeQuery

public AxionResultSet executeQuery(Database database)
                            throws AxionException
Unsupported

Returns:
the generated ResultSet
Throws:
AxionException
See Also:
Statement.executeQuery(java.lang.String), PreparedStatement.executeQuery()

execute

public boolean execute(Database database)
                throws AxionException
Description copied from interface: AxionCommand
Executes an SQL statement that may return multiple results.

Returns:
true if one or more ResultSets were generated, false otherwise
Throws:
AxionException
See Also:
Statement.execute(java.lang.String), PreparedStatement.execute()

getBindVariableIterator

protected Iterator getBindVariableIterator()
Description copied from class: BaseAxionCommand
Returns an Iteratorover all my BindVariables, in the proper order. Default impl returns empty iterator.

Overrides:
getBindVariableIterator in class BaseAxionCommand