net.sf.colle.sql.schema
Class TableLoader

java.lang.Object
  extended bynet.sf.colle.sql.schema.TableLoader

public class TableLoader
extends Object

Loads tables with text files. Provides a DBMS neutral table loading facility. Created: 06 Jun 2003

Version:
$Revision: 1.10 $, $Date: 2004/07/11 19:29:05 $
Author:
Dwayne Schultz

Field Summary
(package private) static int DEFAULT_INSERTS_PER_COMMIT
           
 
Constructor Summary
TableLoader(Table pxTable, Connection pxConnection)
          Constructs the table loader and prepares the table for loading.
TableLoader(Table pxTable, List pxLoaderFilters, Connection pxConnection)
          Constructs the table loader and prepares the table for loading.
 
Method Summary
 void loadCSV(File pxCSVFile)
          Loads a .CSV file.
 void setDateFormat(DateFormat pxDateFormat)
           
 void setDoubleFormat(NumberFormat pxDoubleFormat)
           
 void setInsertsPerCommit(int pnInsertsPerCommit)
           
 void setIntFormat(NumberFormat pxIntFormat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INSERTS_PER_COMMIT

static final int DEFAULT_INSERTS_PER_COMMIT
See Also:
Constant Field Values
Constructor Detail

TableLoader

public TableLoader(Table pxTable,
                   Connection pxConnection)
Constructs the table loader and prepares the table for loading.

Parameters:
pxTable - table to be loaded
pxConnection - connection to the database containing the table

TableLoader

public TableLoader(Table pxTable,
                   List pxLoaderFilters,
                   Connection pxConnection)
Constructs the table loader and prepares the table for loading.

Parameters:
pxTable - table to be loaded
pxLoaderFilters - list of objects derived from @see LoaderFilter used filter the incoming data
pxConnection - connection to the database containing the table
Method Detail

setDateFormat

public void setDateFormat(DateFormat pxDateFormat)

setDoubleFormat

public void setDoubleFormat(NumberFormat pxDoubleFormat)

setIntFormat

public void setIntFormat(NumberFormat pxIntFormat)

setInsertsPerCommit

public void setInsertsPerCommit(int pnInsertsPerCommit)

loadCSV

public void loadCSV(File pxCSVFile)
Loads a .CSV file.

Parameters:
pxCSVFile - file to be loaded