net.sourceforge.jpalm.mobiledb.record
Class FieldLabelsRecord

java.lang.Object
  extended by net.sourceforge.jpalm.DataBlock
      extended by net.sourceforge.jpalm.mobiledb.record.AbstractRecord
          extended by net.sourceforge.jpalm.mobiledb.record.FieldLabelsRecord
All Implemented Interfaces:
Record

public class FieldLabelsRecord
extends AbstractRecord

The field labels record in a MobileDB database.

There should be exactly one of these records in a MobileDB database. The number of fields in this record determines the number of fields in the database.


Field Summary
static net.sourceforge.juint.UInt8 CATEGORY_ID
          The category identifier for this record.
static int MAX_FIELD_WIDTH
          The maximum length of a field label.
25
 
Fields inherited from class net.sourceforge.jpalm.mobiledb.record.AbstractRecord
fields, header, HEADER, TERIMINATOR, TRAILER
 
Constructor Summary
FieldLabelsRecord()
          Creates a new field labels record with no fields.
FieldLabelsRecord(byte[] data)
          Creates a new field labels record from a byte array.
FieldLabelsRecord(java.util.List<java.lang.String> fieldLabels)
          Creates a new field labels record from a list of field labels.
FieldLabelsRecord(Record record)
          Creates a new field labels record from a Record.
 
Method Summary
 java.util.List<java.lang.String> getFieldLabels()
          Gets the field labels.
 void setFieldLabels(java.util.List<java.lang.String> fieldLabels)
          Sets the field labels.
 
Methods inherited from class net.sourceforge.jpalm.mobiledb.record.AbstractRecord
deserialize, equals, getHeader, getInternalFields, serialize, setHeader, setInternalFields, trimOrFillList
 
Methods inherited from class net.sourceforge.jpalm.DataBlock
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_FIELD_WIDTH

public static final int MAX_FIELD_WIDTH
The maximum length of a field label.
25

See Also:
Constant Field Values

CATEGORY_ID

public static final net.sourceforge.juint.UInt8 CATEGORY_ID
The category identifier for this record.

Constructor Detail

FieldLabelsRecord

public FieldLabelsRecord()
Creates a new field labels record with no fields.


FieldLabelsRecord

public FieldLabelsRecord(byte[] data)
Creates a new field labels record from a byte array.

Parameters:
data - the byte array
See Also:
AbstractRecord.deserialize(byte[])

FieldLabelsRecord

public FieldLabelsRecord(Record record)
Creates a new field labels record from a Record.

Parameters:
record - the record

FieldLabelsRecord

public FieldLabelsRecord(java.util.List<java.lang.String> fieldLabels)
Creates a new field labels record from a list of field labels.

Parameters:
fieldLabels - the field labels
See Also:
setFieldLabels(List)
Method Detail

setFieldLabels

public void setFieldLabels(java.util.List<java.lang.String> fieldLabels)
Sets the field labels.

If the length of a label is longer than 25 characters, then it will be truncated to 25 characters.


getFieldLabels

public java.util.List<java.lang.String> getFieldLabels()
Gets the field labels.