jimm.datavision.gui.cmd
Class DbConnCommand

java.lang.Object
  extended by jimm.datavision.gui.cmd.CommandAdapter
      extended by jimm.datavision.gui.cmd.DbConnCommand
All Implemented Interfaces:
Command, Nameable

public class DbConnCommand
extends CommandAdapter

A command for changing a database's connection information.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  java.lang.String connInfo
           
protected  java.lang.String dbName
           
protected  java.lang.String driverClassName
           
protected  Database origDatabase
           
protected  Report report
           
protected  java.lang.String username
           
 
Fields inherited from class jimm.datavision.gui.cmd.CommandAdapter
name
 
Constructor Summary
DbConnCommand(Report report, java.lang.String driverClassName, java.lang.String connInfo, java.lang.String dbName, java.lang.String username, java.lang.String password)
          Constructor.
 
Method Summary
 void perform()
          Performs the command.
 void undo()
          Undoes the command.
 
Methods inherited from class jimm.datavision.gui.cmd.CommandAdapter
getName, redo, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

report

protected Report report

origDatabase

protected Database origDatabase

driverClassName

protected java.lang.String driverClassName

connInfo

protected java.lang.String connInfo

dbName

protected java.lang.String dbName

username

protected java.lang.String username
Constructor Detail

DbConnCommand

public DbConnCommand(Report report,
                     java.lang.String driverClassName,
                     java.lang.String connInfo,
                     java.lang.String dbName,
                     java.lang.String username,
                     java.lang.String password)
Constructor.

Parameters:
report - the report using this database
driverClassName - database driver class name
connInfo - database connection info string
dbName - the database name
username - the user name to use when logging in to the database
password - the database password
Method Detail

perform

public void perform()
Description copied from class: CommandAdapter
Performs the command. The default implementation does nothing.

Specified by:
perform in interface Command
Overrides:
perform in class CommandAdapter

undo

public void undo()
Description copied from class: CommandAdapter
Undoes the command. The default implementation does nothing.

Specified by:
undo in interface Command
Overrides:
undo in class CommandAdapter