org.cdgsoftware.icl.record
Class Record

java.lang.Object
  extended by org.cdgsoftware.icl.record.Record
All Implemented Interfaces:
Loggeable
Direct Known Subclasses:
BundleControlRecord, BundleHeaderRecord, CashLetterControlRecord, CashLetterHeaderRecord, CheckDetailAddendumARecord, CheckDetailRecord, FileControlRecord, FileHeaderRecord, ImageViewAnalysisRecord, ImageViewDataRecord, ImageViewDetailRecord

public abstract class Record
extends java.lang.Object
implements Loggeable

The Class Record.


Constructor Summary
Record()
           
 
Method Summary
 void dump(java.io.PrintStream p, java.lang.String indent)
           
 byte[] getBytes()
          Gets the bytes from the record
 Field getFieldAtPosition(int fieldNumber)
          Gets the field at position.
 java.lang.String getFieldDataAtPosition(int fieldNumber)
          Gets the field data at position.
 java.lang.String getFieldNameAtPosition(int fieldNumber)
          Gets the field name at position.
 java.util.ArrayList<Field> getFields()
          Gets the fields.
 int getRecordLength()
          Gets the record length.
 java.lang.String getRecordName()
          Gets the record name.
 java.lang.String getStructureXML()
          Gets the structure xml.
 void populateFields(byte[] data)
          Populate fields.
 void setFieldData(int fieldNumber, java.lang.String data)
          Sets the field data.
 void setFields(java.util.ArrayList<Field> fields)
          Sets the fields.
 void setRecordName(java.lang.String recordName)
          Sets the record name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Record

public Record()
Method Detail

setFieldData

public void setFieldData(int fieldNumber,
                         java.lang.String data)
                  throws ICLException
Sets the field data.

Parameters:
fieldNumber - the field number FROM THE SPEC. Do not consider this a zero based collection
data - the data
Throws:
ICLException - the ICL exception

getFieldNameAtPosition

public java.lang.String getFieldNameAtPosition(int fieldNumber)
Gets the field name at position.

Parameters:
fieldNumber - the field number FROM THE SPEC. Do not consider this a zero based collection
Returns:
the field name at position

getFieldDataAtPosition

public java.lang.String getFieldDataAtPosition(int fieldNumber)
Gets the field data at position.

Parameters:
fieldNumber - the field number FROM THE SPEC. Do not consider this a zero based collection
Returns:
the field data at position

getFieldAtPosition

public Field getFieldAtPosition(int fieldNumber)
Gets the field at position.

Parameters:
fieldNumber - the field number FROM THE SPEC. Do not consider this a zero based collection
Returns:
the field data at position

getFields

public java.util.ArrayList<Field> getFields()
Gets the fields.

Returns:
the fields

setFields

public void setFields(java.util.ArrayList<Field> fields)
Sets the fields.

Parameters:
fields - the new fields

getRecordName

public java.lang.String getRecordName()
Gets the record name.

Returns:
the record name

setRecordName

public void setRecordName(java.lang.String recordName)
Sets the record name.

Parameters:
recordName - the new record name

dump

public void dump(java.io.PrintStream p,
                 java.lang.String indent)
Specified by:
dump in interface Loggeable

getStructureXML

public java.lang.String getStructureXML()
Gets the structure xml.

Returns:
the structure xml

getBytes

public byte[] getBytes()
Gets the bytes from the record

Returns:
the bytes

toString

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

populateFields

public void populateFields(byte[] data)
                    throws ICLException
Populate fields.

Parameters:
data - the data
Throws:
ICLException - the ICL exception

getRecordLength

public int getRecordLength()
Gets the record length.

Returns:
the record length