org.jcon.text
Class FixedLengthRecordDef

java.lang.Object
  extended by org.jcon.text.FixedLengthRecordDef
All Implemented Interfaces:
java.io.Serializable, TextRecordDef

public class FixedLengthRecordDef
extends java.lang.Object
implements TextRecordDef

Contains the definition for a fixed-length, COBOL-style record.

Author:
Paul Reavis
See Also:
Serialized Form

Constructor Summary
FixedLengthRecordDef()
          Create a new, blank FixedLengthRecordDef
 
Method Summary
 java.lang.String format(java.lang.Object source)
          Convert an object to a formatted String.
 java.util.Set getFixedLengthFieldDefs()
          The fixed-length field object definitions.
 int getLength()
          The maximum length for the record.
 java.lang.String getName()
          The name or identifier for the record.
 java.lang.Class getSourceClass()
          The class the record represents.
 java.lang.String getSourceClassName()
           
 void setFixedLengthFieldDefs(java.util.Set newFieldDefs)
           
 void setLength(int newLength)
           
 void setName(java.lang.String newName)
           
 void setSourceClassName(java.lang.String newSourceClassName)
           
 java.lang.Object unformat(java.lang.String recordString)
          Convert a formatted string to an object of the source class
 java.lang.Object unformat(java.lang.String recordString, java.lang.Class objectClass)
          Convert a formatted string to an object of the indicated class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLengthRecordDef

public FixedLengthRecordDef()
Create a new, blank FixedLengthRecordDef

Method Detail

unformat

public java.lang.Object unformat(java.lang.String recordString)
Convert a formatted string to an object of the source class

Specified by:
unformat in interface TextRecordDef

unformat

public java.lang.Object unformat(java.lang.String recordString,
                                 java.lang.Class objectClass)
Convert a formatted string to an object of the indicated class.

Specified by:
unformat in interface TextRecordDef

format

public java.lang.String format(java.lang.Object source)
Convert an object to a formatted String.

Specified by:
format in interface TextRecordDef

getName

public java.lang.String getName()
The name or identifier for the record.


setName

public void setName(java.lang.String newName)

getSourceClass

public java.lang.Class getSourceClass()
The class the record represents.


getSourceClassName

public java.lang.String getSourceClassName()

setSourceClassName

public void setSourceClassName(java.lang.String newSourceClassName)

getFixedLengthFieldDefs

public java.util.Set getFixedLengthFieldDefs()
The fixed-length field object definitions.


setFixedLengthFieldDefs

public void setFixedLengthFieldDefs(java.util.Set newFieldDefs)

getLength

public int getLength()
The maximum length for the record.


setLength

public void setLength(int newLength)