net.sourceforge.jpalm.mobiledb.record
Class DataRecord

java.lang.Object
  extended by net.sourceforge.jpalm.DataBlock
      extended by net.sourceforge.jpalm.mobiledb.record.AbstractRecord
          extended by net.sourceforge.jpalm.mobiledb.record.DataRecord
All Implemented Interfaces:
Record
Direct Known Subclasses:
FilteredDataRecord

public class DataRecord
extends AbstractRecord

A data record in a MobileDB database.


Field Summary
static net.sourceforge.juint.UInt8 CATEGORY_ID
          The category identifier for this record.
 
Fields inherited from class net.sourceforge.jpalm.mobiledb.record.AbstractRecord
fields, header, HEADER, MAX_FIELD_WIDTH, TERIMINATOR, TRAILER
 
Constructor Summary
DataRecord()
          Creates a new data record with no fields.
DataRecord(byte[] data)
          Creates a new data record from a byte array.
DataRecord(java.util.List<Type> fields)
          Creates a new data record from the specified fields.
DataRecord(Record record)
          Creates a new data record from a Record.
 
Method Summary
 java.util.List<Type> getFields(java.util.List<Definition> fieldDefinitions)
          Gets the fields using the specified field definitions.
 void setFields(java.util.List<Type> fields)
          Sets the fields.
 
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

CATEGORY_ID

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

Constructor Detail

DataRecord

public DataRecord()
Creates a new data record with no fields.


DataRecord

public DataRecord(Record record)
Creates a new data record from a Record.

Parameters:
record - the record

DataRecord

public DataRecord(byte[] data)
Creates a new data record from a byte array.

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

DataRecord

public DataRecord(java.util.List<Type> fields)
Creates a new data record from the specified fields.

Parameters:
fields - the fields
See Also:
setFields(List)
Method Detail

getFields

public java.util.List<Type> getFields(java.util.List<Definition> fieldDefinitions)
Gets the fields using the specified field definitions. If the field definitions list is smaller than the number of fields, the remaining fields will be treated as a TextDefinition.

Parameters:
fieldDefinitions - the field definitions
Returns:
the fields

setFields

public void setFields(java.util.List<Type> fields)
Sets the fields.

Parameters:
fields - the fields