pt.moredata.dao
Interface SQLStatementBuilder

All Known Implementing Classes:
AbstractSQLStatementBuilder, SQLDeleteBuilder, SQLInsertBuilder, SQLSelectBuilder, SQLUpdateBuilder

public interface SQLStatementBuilder

A specification of the interface for a class that build SQL statements from a DataAccessObject RecordSet. Company MoreData

Version:
$Revision: 1.5 $
Author:
pcarmo

Method Summary
 java.lang.String getSQLStatement(SQLInformation info)
          Builds a SQL command for interacting with a table of a relational database repository.
 void loadData(java.sql.ResultSet resultSet)
          Load data from a ResultSet into the RecordSet.
 void setDAOFieldsInfo(DAOFieldsInfo fieldsInfo)
          Set the DAOFieldsInfo object with information about the columns of the RecordSet.
 void setRecordSet(RecordSet recordSet)
          Set the RecordSet used to store the information read from the repository.
 void setStatementParameters(java.sql.PreparedStatement statement, SQLInformation info)
          Set the values of a statement parameters.
 

Method Detail

getSQLStatement

public java.lang.String getSQLStatement(SQLInformation info)
Builds a SQL command for interacting with a table of a relational database repository.

Parameters:
info - Adicional information to help building the sql statement.

setDAOFieldsInfo

public void setDAOFieldsInfo(DAOFieldsInfo fieldsInfo)
Set the DAOFieldsInfo object with information about the columns of the RecordSet.

Parameters:
fieldsInfo - The DAOFieldInfo object.

setRecordSet

public void setRecordSet(RecordSet recordSet)
Set the RecordSet used to store the information read from the repository.

Parameters:
recordSet - The RecorSet object to store the readed information.

setStatementParameters

public void setStatementParameters(java.sql.PreparedStatement statement,
                                   SQLInformation info)
                            throws WriterException
Set the values of a statement parameters.

Parameters:
statement - The prepared statement.
info - Adicional information to help building the sql statement.
Throws:
WriteException - If an error occur will setting the statement parameters.
WriterException

loadData

public void loadData(java.sql.ResultSet resultSet)
              throws ReaderException
Load data from a ResultSet into the RecordSet. This method could and probably would use state build during the execution of the getSQLStatement() method.

Parameters:
resultSet - A resultSet with the data to be loaded into the RecordSet.
Throws:
ReaderException