org.jmonks.batch.io
Class ReaderRecord

java.lang.Object
  extended byorg.jmonks.batch.io.Record
      extended byorg.jmonks.batch.io.ReaderRecord
Direct Known Subclasses:
FlatFileReader.FlatFileReaderRecord, XMLFileReader.XMLReaderRecord

public abstract class ReaderRecord
extends Record

ReaderRecord provides the methods to read the values of the fields from a record. This record will be generated from the FileReader's.

Since:
1.0
Version:
1.0
Author:
Suresh Pragada

Constructor Summary
protected ReaderRecord(RecordType recordType)
          Constructs the ReaderRecord by accepting the record type.
 
Method Summary
abstract  java.lang.Object readField(java.lang.String fieldName)
           Reads the value of the given field from the record.
 
Methods inherited from class org.jmonks.batch.io.Record
getRecordType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderRecord

protected ReaderRecord(RecordType recordType)
Constructs the ReaderRecord by accepting the record type.

Parameters:
recordType - Type of the record.
Method Detail

readField

public abstract java.lang.Object readField(java.lang.String fieldName)

Reads the value of the given field from the record. The value will be depends on the type of file. Concrete implementors provide the details on the kind of the object they return for different fields and what the field name corresponds to.

Parameters:
fieldName - Name of the field.
Returns:
Returns the value of the given field from the record, null if field doesnt exists.