src.server
Class TableCreator

java.lang.Object
  extended bysrc.server.TableCreator

public class TableCreator
extends java.lang.Object

Creates the default tables for the server's database. All tables are reset when recreated so don't run this for a database that you don't want to clear.

Version:
2005-apr-26

Constructor Summary
TableCreator()
          Constructor for TableCreator.
 
Method Summary
 void createTable(java.lang.String tableName, boolean overwrite)
          Creates a sepcified table.
 java.lang.String[] getTableList()
          Gets the list of all tables that are available.
 boolean hasTable(java.lang.String tableName)
          Checks if a specified table exists in the creator's records.
static void main(java.lang.String[] args)
          Main for commandline.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableCreator

public TableCreator()
Constructor for TableCreator.

Method Detail

main

public static void main(java.lang.String[] args)
Main for commandline.

Parameters:
args - See -h.

getTableList

public java.lang.String[] getTableList()
Gets the list of all tables that are available.

Returns:
A list with table names.

hasTable

public boolean hasTable(java.lang.String tableName)
Checks if a specified table exists in the creator's records.

Parameters:
tableName - The name of the table to look for.
Returns:
True if the table does exist, false otherwise.

createTable

public void createTable(java.lang.String tableName,
                        boolean overwrite)
Creates a sepcified table.

Parameters:
tableName - The name of the table that should be created.
overwrite - If true then any old table will be overwritten along with any data contained.