co.uk.hjcs.canyon.parsing
Class FlatFileLine

java.lang.Object
  extended by co.uk.hjcs.canyon.parsing.FlatFileLine

public class FlatFileLine
extends java.lang.Object

This class is responsible for turning a collection of fields and values into a String representation of a record, that can then be used for persistence or manipulation. It orders the fields so that they are concatenated in the correct order. This class also represents the data retrieved from a line of data It makes it possible to retrieve the data elements by name without having to parse the line of text again. It is also the container of the meta data that accompanies the line of text.

Author:
HJC Solutions Ltd (http://canyon.hjcsolutions.co.uk)

Constructor Summary
FlatFileLine()
           
 
Method Summary
 void addField(FieldDefinition field, java.lang.Object value)
          Add a value from the line data
 java.lang.String get(java.lang.String key)
          Get a value from the resultset
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlatFileLine

public FlatFileLine()
Method Detail

addField

public void addField(FieldDefinition field,
                     java.lang.Object value)
Add a value from the line data

Parameters:
field - - the field definition
value - - the value of the field

get

public java.lang.String get(java.lang.String key)
Get a value from the resultset

Parameters:
key - - the field name
Returns:
- the value of the field

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object