org.jmonks.batch.io.flat
Class FlatFileReader.FlatFileReaderRecord
java.lang.Object
org.jmonks.batch.io.Record
org.jmonks.batch.io.ReaderRecord
org.jmonks.batch.io.flat.FlatFileReader.FlatFileReaderRecord
- Enclosing class:
- FlatFileReader
- public class FlatFileReader.FlatFileReaderRecord
- extends ReaderRecord
FixedWidthFlatFileReaderRecord implements ReaderRecord by maintaing the
field names and values as a map and provides the methods with proper
access privileges to read into and write from the record.
- Author:
- Suresh Pragada
Method Summary |
java.lang.Object |
readField(java.lang.String fieldName)
Field values can be read by using the names provided in the field spec. |
protected void |
writeField(java.lang.String fieldName,
java.lang.String fieldValue)
This is for the Reader to write the data into the record. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlatFileReader.FlatFileReaderRecord
protected FlatFileReader.FlatFileReaderRecord(RecordType recordType,
int fieldCount)
- Private constructor to make sure only reader can create the record.
- Parameters:
recordType
- Type of the record.fieldCount
- Number of fields expected in this record to initializes the map properly.
readField
public java.lang.Object readField(java.lang.String fieldName)
- Field values can be read by using the names provided in the field spec.
- Specified by:
readField
in class ReaderRecord
- Parameters:
fieldName
- Name of the field.
- Returns:
- Returns the field value.
writeField
protected void writeField(java.lang.String fieldName,
java.lang.String fieldValue)
- This is for the Reader to write the data into the record.
- Parameters:
fieldName
- Name of the field.fieldValue
- Value of the field.