net.sourceforge.jdbcexporter
Interface ExportEngine

All Known Implementing Classes:
BasicEngine

public interface ExportEngine

The ExportEngine defines the methods needed to export a row from a database.

Version:
0.6
Author:
Chris Nagy

Method Summary
 void cleanup()
          Cleans up any resources that the export engine used to export data for the current entity definition.
 ColumnValue[] exportRow()
          Export a row as a set of values from the database
 java.sql.Connection getConnection()
          Returns the database connection to use for exporting the row.
 void init()
          Initializes the export engine with the current entity definition.
 void setConnection(java.sql.Connection con)
          Sets the database connection to use for exporting the row.
 void setEntityDef(ExportEntityDef entityDef)
          Sets the entity definition to use for exporting the row
 

Method Detail

setConnection

public void setConnection(java.sql.Connection con)
Sets the database connection to use for exporting the row.

Parameters:
con - database connection

getConnection

public java.sql.Connection getConnection()
Returns the database connection to use for exporting the row.

Returns:
database connection

setEntityDef

public void setEntityDef(ExportEntityDef entityDef)
Sets the entity definition to use for exporting the row

Parameters:
entityDef - entity definition

init

public void init()
          throws java.sql.SQLException
Initializes the export engine with the current entity definition.

Throws:
java.sql.SQLException - if a database error occurs during initialization

cleanup

public void cleanup()
             throws java.sql.SQLException
Cleans up any resources that the export engine used to export data for the current entity definition.

Throws:
java.sql.SQLException - if a database error occurs during cleanup

exportRow

public ColumnValue[] exportRow()
                        throws java.sql.SQLException
Export a row as a set of values from the database

Returns:
values the column values for the row
Throws:
java.sql.SQLException - if a database error occurs during the export