uk.org.ogsadai.converters.resultset
Interface ResultSetHandler

All Known Implementing Classes:
CSVResultSetHandler, StrategicResultSetHandler, WebRowSetResultSetHandler

public interface ResultSetHandler

The interface for handling the events that are generated when a result set is converted. The events will be invoked in the following sequence:

Author:
The OGSA-DAI Project Team
See Also:
ResultSetConverter

Method Summary
 void columnEnd(java.lang.StringBuffer output)
          Write any data corresponding to the end of a new column.
 void columnStart(java.lang.StringBuffer output)
          Write any data corresponding to the start of a new column.
 void field(java.lang.StringBuffer output, java.sql.ResultSet resultSet, int column)
          Write the data contained in the specified field.
 void footer(java.lang.StringBuffer output)
          Write any footer data.
 void header(java.lang.StringBuffer output, java.sql.ResultSet rs)
          Write any header data to the output stream.
 void rowEnd(java.lang.StringBuffer output)
          Write any data corresponding to the end of a row.
 void rowStart(java.lang.StringBuffer output)
          Write any data corresponding to the start of a new row.
 

Method Detail

header

public void header(java.lang.StringBuffer output,
                   java.sql.ResultSet rs)
            throws ResultSetHandlerException
Write any header data to the output stream. This will be invoked once by the ResultSetConverter before any other events.

Parameters:
output - Output string buffer to append data to
rs - ResultSet from which to extract header information.
Throws:
ResultSetHandlerException - If a problem occurs when accessing the ResultSet.

rowStart

public void rowStart(java.lang.StringBuffer output)
Write any data corresponding to the start of a new row.

Parameters:
output - Output string buffer to append data to.

columnStart

public void columnStart(java.lang.StringBuffer output)
Write any data corresponding to the start of a new column.

Parameters:
output - Output string buffer to append data to.

field

public void field(java.lang.StringBuffer output,
                  java.sql.ResultSet resultSet,
                  int column)
           throws ResultSetHandlerException
Write the data contained in the specified field.

Parameters:
output - Output string buffer to append data to.
resultSet - ResultSet from which to extract column information.
column - The column number of the field.
Throws:
ResultSetHandlerException - If a problem occurs when accessing the ResultSet.

columnEnd

public void columnEnd(java.lang.StringBuffer output)
Write any data corresponding to the end of a new column.

Parameters:
output - Output string buffer to append data to.

rowEnd

public void rowEnd(java.lang.StringBuffer output)
Write any data corresponding to the end of a row.

Parameters:
output - Output string buffer to append data to.

footer

public void footer(java.lang.StringBuffer output)
Write any footer data.

Parameters:
output - Output string buffer to append data to.