com.mungoknotwise.sqlcli
Class SelectCommand

java.lang.Object
  |
  +--com.mungoknotwise.sqlcli.SelectCommand
All Implemented Interfaces:
Command, ResultSetExtractingCommand

public class SelectCommand
extends java.lang.Object
implements ResultSetExtractingCommand

Performs a select command and handles the results.

Version:
$Id: SelectCommand.java,v 1.2 2004/07/28 23:24:18 mungoknotwise Exp $
Author:
Steven Caswell

Constructor Summary
SelectCommand()
          Constructs a new instance of SelectCommand.
 
Method Summary
 void execute()
          Executes this command. Results are handled by the configured result set extractor.
 void setCommand(java.lang.String command)
          Sets the SQL select command for this command to execute.
 void setConnection(java.sql.Connection connection)
          Sets the connection for this command.
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          Sets the exception handler for this command.
 void setResultSetExtractor(ResultSetExtractor resultSetExtractor)
          Sets the result set extractor for this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectCommand

public SelectCommand()
Constructs a new instance of SelectCommand.

Method Detail

execute

public void execute()
Executes this command. Results are handled by the configured result set extractor.

Specified by:
execute in interface ResultSetExtractingCommand

setCommand

public void setCommand(java.lang.String command)
Sets the SQL select command for this command to execute.

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 ResultSetExtractingCommand
Parameters:
exceptionHandler - the exception handler

setResultSetExtractor

public void setResultSetExtractor(ResultSetExtractor resultSetExtractor)
Sets the result set extractor for this command.

Specified by:
setResultSetExtractor in interface ResultSetExtractingCommand
Parameters:
resultSetExtractor - the result set extractor


Copyright © 2004 Steven Caswell. All Rights Reserved.