com.holub.database
Class TableFactory

java.lang.Object
  extended by com.holub.database.TableFactory

public class TableFactory
extends Object

©2004 Allen I. Holub. All rights reserved.

This code may be used freely by yourself with the following restrictions:

  1. Your splash screen, about box, or equivalent, must include Allen Holub's name, copyright, and URL. For example:

    This program contains Allen Holub's SQL package.
    (c) 2005 Allen I. Holub. All Rights Reserved.
    http://www.holub.com


    If your program does not run interactively, then the foregoing notice must appear in your documentation.
  2. You may not redistribute (or mirror) the source code.
  3. You must report any bugs that you find to me. Use the form at http://www.holub.com/company/contact.html or send email.
  4. The software is supplied as is. Neither Allen Holub nor Holub Associates are responsible for any bugs (or any problems caused by bugs, including lost productivity or data) in any of this code.

Constructor Summary
TableFactory()
           
 
Method Summary
static Table create(String name, String[] columns)
          Create an empty table with the specified columns.
static Table create(Table.Importer importer)
          Create a table from information provided by a Table.Importer object.
static Table load(String name)
          This convenience method is equivalent to load(name, new File(".") );
static Table load(String name, File directory)
           
static Table load(String name, String location)
          This convenience method is equivalent to load(name, new File(location) );
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableFactory

public TableFactory()
Method Detail

create

public static Table create(String name,
                           String[] columns)
Create an empty table with the specified columns.

Parameters:
name - the table name
columns - names of all the columns
Returns:
the table

create

public static Table create(Table.Importer importer)
                    throws IOException
Create a table from information provided by a Table.Importer object.

Throws:
IOException

load

public static Table load(String name)
                  throws IOException
This convenience method is equivalent to load(name, new File(".") );

Throws:
IOException
See Also:
load(String,File)

load

public static Table load(String name,
                         String location)
                  throws IOException
This convenience method is equivalent to load(name, new File(location) );

Throws:
IOException
See Also:
load(String,File)

load

public static Table load(String name,
                         File directory)
                  throws IOException
Throws:
IOException