org.intermine.sql.writebatch
Interface BatchWriter

All Known Implementing Classes:
BatchWriterPostgresCopyImpl, BatchWriterPreparedStatementImpl, BatchWriterSimpleImpl

public interface BatchWriter

An interface representing an object that can flush a TableBatch to an SQL server Connection.


Method Summary
 void updateStatistics(java.util.Map activity, java.sql.Connection con)
          Updates the per-table statistics held in this object, and may tell the SQL database to update its statistics using the supplied Connection.
 java.util.List write(java.sql.Connection con, java.util.Map tables, java.util.Set filter)
          Performs all the processing for flushing a few tables to the connection, and returns a List of jobs to do the actual flushing.
 

Method Detail

write

java.util.List write(java.sql.Connection con,
                     java.util.Map tables,
                     java.util.Set filter)
                     throws java.sql.SQLException
Performs all the processing for flushing a few tables to the connection, and returns a List of jobs to do the actual flushing.

Parameters:
con - the SQL connection
tables - a Map from table name to Table
filter - a Set of table names to write, or null to write all tables
Returns:
a List of jobs to run to actually do the flushing
Throws:
java.sql.SQLException - if there is an underlying DB problem

updateStatistics

void updateStatistics(java.util.Map activity,
                      java.sql.Connection con)
                      throws java.sql.SQLException
Updates the per-table statistics held in this object, and may tell the SQL database to update its statistics using the supplied Connection.

Parameters:
activity - a Map from table name to the amount of activity (in rows) as an Integer
con - a Connection, over which to talk to the database
Throws:
java.sql.SQLException - if there is an underlying DB problem