proper.database
Class TableLister

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

public class TableLister
extends ExecutorObject
implements Lister

This class retrieves a list of table names for the current database.

Version:
$Revision: 1.2 $
Author:
FracPete

Field Summary
 
Fields inherited from interface proper.core.ProperInterface
VERSION
 
Constructor Summary
TableLister(Connector conn)
          initializes the object
 
Method Summary
 void clear()
          resets the default
 java.util.Vector getList()
          retrieves the list of table names and returns them in a Vector
 java.util.Vector getList(java.lang.String pattern)
          retrieves the list of table names and returns them in a Vector
 boolean getSort()
          returns whether the tables are sorted or not
 boolean getSortByName()
          returns whether the tables are sorted by name or size (number or records)
static void main(java.lang.String[] args)
          for testing only
 void setExcludes(java.lang.String excludes)
          sets the tables (String) to exclude from export
 void setExcludes(java.util.Vector excludes)
          sets the tables (String) to exclude from export
 void setSort(boolean sort)
          sets whether to sort the tables or not
 void setSortByName(boolean sortByName)
          sets whether to sort the tables by name or size (numer of records)
 
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

TableLister

public TableLister(Connector conn)
initializes the object

Parameters:
conn - the Connector used for Database-Handling
Method Detail

clear

public void clear()
resets the default

Specified by:
clear in interface Lister

setSort

public void setSort(boolean sort)
sets whether to sort the tables or not

Specified by:
setSort in interface Lister

getSort

public boolean getSort()
returns whether the tables are sorted or not

Specified by:
getSort in interface Lister

setSortByName

public void setSortByName(boolean sortByName)
sets whether to sort the tables by name or size (numer of records)


getSortByName

public boolean getSortByName()
returns whether the tables are sorted by name or size (number or records)


setExcludes

public void setExcludes(java.util.Vector excludes)
sets the tables (String) to exclude from export


setExcludes

public void setExcludes(java.lang.String excludes)
sets the tables (String) to exclude from export


getList

public java.util.Vector getList()
retrieves the list of table names and returns them in a Vector

Specified by:
getList in interface Lister

getList

public java.util.Vector getList(java.lang.String pattern)
retrieves the list of table names and returns them in a Vector

Parameters:
pattern - is the pattern for the names of the tables (the wildcard used here is the one from SQL: %)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
for testing only

Parameters:
args - expects the url, database, user and password
Throws:
java.lang.Exception