iio_v2
Class Record

java.lang.Object
  extended by iio_v2.Record
All Implemented Interfaces:
java.io.Serializable

public class Record
extends java.lang.Object
implements java.io.Serializable

The Record Class for use with the Indexed File IO Processor. This class is used to define the records being used in the master IO class.

Since:
Version 2.0 - 07/01/2008
See Also:
Serialized Form

Constructor Summary
Record()
          Default Constructor Not used in this application
Record(int fields)
          Alternate Constructor that initializes all the fields to null strings
Initialize all of the records fields to null strings.
 
Method Summary
 java.lang.String getFieldValue(int index)
          Returns a specific field value from this record based upon the passed pointer value
Preconditions: Field index value is checked for negative values and values beyond the file size
Field index values that are negative are assumed zero
Field index values that are beyond the file size are are assumed to be the last field index Returns a String value.
 java.lang.String getKeyValue()
          Return the current key value for this record
Returns a String value for the key for this Record Object
If an exception is thrown, a null string is returned.
 int getSize()
          Return the current size of the record as an integer value
This value is set on the Record Constructor.
 void setFieldValue(int index, java.lang.Object value)
          Sets a specific field with an object located at the passed index
Preconditions: The passed index value must be a positive integer less than the number of fields in the record
The passed value must always be an object.
If the passed index value is negative, it is set to zero
If the passed index value is greater than the number of fields in the record, it is set to the last field index value.
 void setFieldValue(int index, java.lang.String value)
          Sets a specific field with a string value located at the passed index
Preconditions: The passed index value must be a positive integer less than the number of fields in the record
The passed value must always be string.
If the passed index value is negative, it is set to zero
If the passed index value is greater than the number of fields in the record, it is set to the last field index value.
 void setKeyIndex(int index)
          Set the record key index value
This passed index value can be an integer value between 0 and record length - 1
If the passed index value is negative, it is set to zero.
If the passed index value is greater than the number of fields in the record, it is set to the last field index value.
 void setKeyValue(java.lang.String value)
          Set the record key field to the passed string value
It is assumed they key index has been properly set.
 void setSize(int count)
          Sets the field count for this record object
If the passed index value is less than zero, the field count is set to zero.
 void snap(java.lang.String title)
          Dump all the record field values to the system out device
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Record

public Record()
Default Constructor Not used in this application

Since:
Version 2.0 - 07/01/2008

Record

public Record(int fields)
Alternate Constructor that initializes all the fields to null strings
Initialize all of the records fields to null strings.

Since:
Version 2.0 - 07/01/2008
Method Detail

setFieldValue

public void setFieldValue(int index,
                          java.lang.String value)
Sets a specific field with a string value located at the passed index
Preconditions: The passed index value must be a positive integer less than the number of fields in the record
The passed value must always be string.
If the passed index value is negative, it is set to zero
If the passed index value is greater than the number of fields in the record, it is set to the last field index value.

Since:
Version 2.0 - 07/01/2008

setFieldValue

public void setFieldValue(int index,
                          java.lang.Object value)
Sets a specific field with an object located at the passed index
Preconditions: The passed index value must be a positive integer less than the number of fields in the record
The passed value must always be an object.
If the passed index value is negative, it is set to zero
If the passed index value is greater than the number of fields in the record, it is set to the last field index value.

Since:
Version 2.0 - 07/01/2008

setSize

public void setSize(int count)
Sets the field count for this record object
If the passed index value is less than zero, the field count is set to zero.

Since:
Version 2.0 - 07/01/2008

setKeyValue

public void setKeyValue(java.lang.String value)
Set the record key field to the passed string value
It is assumed they key index has been properly set. If not, the key index value of zer is used.

Since:
Version 2.0 - 07/01/2008

setKeyIndex

public void setKeyIndex(int index)
Set the record key index value
This passed index value can be an integer value between 0 and record length - 1
If the passed index value is negative, it is set to zero.
If the passed index value is greater than the number of fields in the record, it is set to the last field index value.

Since:
Version 2.0 - 07/01/2008

getSize

public int getSize()
Return the current size of the record as an integer value
This value is set on the Record Constructor.

Since:
Version 2.0 - 07/01/2008

getKeyValue

public java.lang.String getKeyValue()
Return the current key value for this record
Returns a String value for the key for this Record Object
If an exception is thrown, a null string is returned.

Returns:
String
Since:
Version 2.0 - 07/01/2008

getFieldValue

public java.lang.String getFieldValue(int index)
Returns a specific field value from this record based upon the passed pointer value
Preconditions: Field index value is checked for negative values and values beyond the file size
Field index values that are negative are assumed zero
Field index values that are beyond the file size are are assumed to be the last field index Returns a String value.

Returns:
String
Since:
Version 2.0 - 07/01/2008

snap

public void snap(java.lang.String title)
Dump all the record field values to the system out device

Since:
Version 2.0 - 07/01/2008