com.mungoknotwise.sqlcli
Class UpdateCommand

java.lang.Object
  |
  +--com.mungoknotwise.sqlcli.UpdateCommand
All Implemented Interfaces:
RowcountHandlingCommand

public class UpdateCommand
extends java.lang.Object
implements RowcountHandlingCommand

Performs a non-SELECT SQL command and handles the resulting rowcount.

Version:
$Id: UpdateCommand.java,v 1.2 2004/07/28 23:26:36 mungoknotwise Exp $
Author:
Steven Caswell

Constructor Summary
UpdateCommand()
          Constructs a new instance of UpdateCommand.
 
Method Summary
 void execute()
          Executes the command, handling the results.
 void setCommand(java.lang.String command)
          Sets the SQL command to be executed.
 void setConnection(java.sql.Connection connection)
          Sets the connection for this command.
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          Sets the exception handler for this command.
 void setRowcountHandler(UpdateRowcountHandler rowcountHandler)
          Sets the update rowcount handler for this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateCommand

public UpdateCommand()
Constructs a new instance of UpdateCommand.

Method Detail

execute

public void execute()
Executes the command, handling the results.

Specified by:
execute in interface RowcountHandlingCommand

setCommand

public void setCommand(java.lang.String command)
Sets the SQL command to be executed.

Parameters:
command - the command

setConnection

public void setConnection(java.sql.Connection connection)
Sets the connection for this command.

Parameters:
connection - the connection

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
Sets the exception handler for this command.

Specified by:
setExceptionHandler in interface RowcountHandlingCommand
Parameters:
exceptionHandler - the exception handler

setRowcountHandler

public void setRowcountHandler(UpdateRowcountHandler rowcountHandler)
Sets the update rowcount handler for this command.

Specified by:
setRowcountHandler in interface RowcountHandlingCommand
Parameters:
rowcountHandler - the rowcount handler


Copyright © 2004 Steven Caswell. All Rights Reserved.