proper.database
Class Modifier

java.lang.Object
  extended by proper.core.ProperObject
      extended by proper.database.ConnectorObject
          extended by proper.database.ExecutorObject
              extended by proper.database.Modifier
All Implemented Interfaces:
ProperInterface

public class Modifier
extends ExecutorObject

A small helper class e.g. for renaming tables and columns.

Version:
$Revision: 1.2 $
Author:
FracPete

Field Summary
 
Fields inherited from interface proper.core.ProperInterface
VERSION
 
Constructor Summary
Modifier(Connector conn)
          initializes the object
 
Method Summary
 boolean deleteColumn(java.lang.String table, java.lang.String name)
          deletes in the given table the specified column
 boolean renameColumn(java.lang.String table, java.lang.String oldName, java.lang.String newName)
          renames in the given table the column "oldName" to "newName"
 boolean renameTable(java.lang.String oldName, java.lang.String newName)
          returns the table "oldName" to "newName" and returns TRUE if it succeeds
 
Methods inherited from class proper.database.ExecutorObject
getExecutor, getLastException, getLastStatement
 
Methods inherited from class proper.database.ConnectorObject
getConnector
 
Methods inherited from class proper.core.ProperObject
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Modifier

public Modifier(Connector conn)
initializes the object

Method Detail

renameTable

public boolean renameTable(java.lang.String oldName,
                           java.lang.String newName)
returns the table "oldName" to "newName" and returns TRUE if it succeeds


renameColumn

public boolean renameColumn(java.lang.String table,
                            java.lang.String oldName,
                            java.lang.String newName)
renames in the given table the column "oldName" to "newName"


deleteColumn

public boolean deleteColumn(java.lang.String table,
                            java.lang.String name)
deletes in the given table the specified column