pt.moredata.dao.core
Class AbstractReader

java.lang.Object
  extended bypt.moredata.dao.core.AbstractReader
All Implemented Interfaces:
Reader

public abstract class AbstractReader
extends java.lang.Object
implements Reader

Parcial implementation of the Reader interface. Company MoreData

Version:
$Revision: 1.4 $
Author:
pcarmo

Field Summary
protected  DAOFieldsInfo _fieldsInfo
          DAOFieldsInfo object with information about DAO columns and tables.
protected  ReaderInformation _info
          Aditional information to build the SQL command.
protected  RecordSet _recordSet
          DAO RecordSet.
 
Constructor Summary
AbstractReader(DAOFieldsInfo fieldsInfo, RecordSet recordSet)
          Creates a new instance of AbstractReader
 
Method Summary
protected abstract  void read()
          Read data from the repository and write it to a RecordSet.
 void read(ReaderInformation info)
          Read data from the repository and write it to a 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_info

protected ReaderInformation _info
Aditional information to build the SQL command.


_fieldsInfo

protected DAOFieldsInfo _fieldsInfo
DAOFieldsInfo object with information about DAO columns and tables.


_recordSet

protected RecordSet _recordSet
DAO RecordSet.

Constructor Detail

AbstractReader

public AbstractReader(DAOFieldsInfo fieldsInfo,
                      RecordSet recordSet)
Creates a new instance of AbstractReader

Parameters:
fieldsInfo - The DAO fields information object.
recordSet - The DAO RecordSet object witch contains the DAO data.
Method Detail

read

protected abstract void read()
                      throws ReaderException
Read data from the repository and write it to a RecordSet.

Throws:
ReaderException - If there is an error while reading data from the repository.

setDAOFieldsInfo

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

Specified by:
setDAOFieldsInfo in interface Reader
Parameters:
fieldsInfo - The DAOFieldInfo object.

setRecordSet

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

Specified by:
setRecordSet in interface Reader
Parameters:
recordSet - The RecorSet object to store the readed information.

read

public void read(ReaderInformation info)
          throws ReaderException
Read data from the repository and write it to a RecordSet.

Specified by:
read in interface Reader
Parameters:
info -
Throws:
ReadException - If an error occur will reading data from the repository.
ReaderException - If an error occur will reading data from the repository.