public interface DataReader
This class defines a common interface for the physical data reader.
The main method is next(). It returns an Object
of data which
will be passed to a business object builder to populate a logical business object.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
This method closes the data source(s) after they are no longer needed.
|
ConfigProperties |
getConfigProperties()
Get the instance of the configuration for this data reader.
|
java.lang.Integer |
getSourcePosition()
It returns the source position of the data object returned by the next() method
you called last time.
|
void |
init()
This method initializes the data reader.
|
ConfigProperties |
initConfig(org.w3c.dom.Node dataReaderNode,
ConfigProperties parentConfigProperties)
This method parses the
DataReader xml node read in from the business object configuration file
and stores the configuration in memory. |
java.lang.Object |
next()
This method returns one chunk of data read from a data source.
|
void |
setConfigProperties(ConfigProperties aConfigProperties)
Sets the ConfigProperties to the DataReader.
|
static final java.lang.String COPYRIGHT
ConfigProperties getConfigProperties()
Get the instance of the configuration for this data reader.
Call this method when you need to get more specific properties from the
ConfigProperties.
void setConfigProperties(ConfigProperties aConfigProperties)
aConfigProperties
- a ConfigPropertiesvoid init() throws DataLoadException
This method initializes the data reader.
DataLoadException
- An application exception will be thrown if there was a problem initializing the data reader.ConfigProperties initConfig(org.w3c.dom.Node dataReaderNode, ConfigProperties parentConfigProperties) throws DataLoadException
This method parses the DataReader
xml node read in from the business object configuration file
and stores the configuration in memory.
dataReaderNode
- The DataReader
xml node read in from the business object configuration file.parentConfigProperties
- The configuration properties for the parent data loader of this data reader.DataLoadException
- An application exception will be thrown if there was a problem initializing the configuration for the data reader.java.lang.Object next() throws DataLoadException
DataLoadException
- An application exception will be thrown if there was a problem reading data from the data source.java.lang.Integer getSourcePosition()
void close() throws DataLoadException
This method closes the data source(s) after they are no longer needed.
DataLoadException
- An application exception will be thrown if there was a problem closing the data source.