org.oreodata
Class CompactRecord

java.lang.Object
  |
  +--org.oreodata.AbstractRecord
        |
        +--org.oreodata.CompactRecord
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, OreoConstants, Record, java.io.Serializable

public class CompactRecord
extends AbstractRecord

An alternative implementation of the Record interface In this implementation, the records can be written out as a human-readable string. This is the scheme used for serialization. CompactRecord implements the java.io.Externalizable interface in order to avoid the general-purpose serialization scheme. The goal was that the resulting storage format should be human-readable and modifiable in a text editor in a pinch.

Author:
Serialized Form

Field Summary
 
Fields inherited from interface org.oreodata.OreoConstants
RECORD_STATUS_KEY, RECORD_TYPE_KEY
 
Constructor Summary
CompactRecord()
           
 
Method Summary
protected  java.lang.Object get(int i)
           
 boolean isImmutable()
          Once a record is immutable, attempts to change data will result in an ImmutableDataException being thrown.
protected  void set(int i, java.lang.Object value)
           
 
Methods inherited from class org.oreodata.AbstractRecord
checkValidity, clearFields, equals, freeze, get, get, get, getChildren, getMetadata, getMutableCopy, getParent, getPrimaryKey, getType, hasChildren, isRootElement, isStale, postCheck, preCheck, readExternal, set, set, setMetadata, setPrimaryKey, setValuesFromTable, toString, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompactRecord

public CompactRecord()
Method Detail

isImmutable

public boolean isImmutable()
Once a record is immutable, attempts to change data will result in an ImmutableDataException being thrown.

Returns:
boolean value representing whether the record is immutable.

get

protected final java.lang.Object get(int i)
Specified by:
get in class AbstractRecord

set

protected final void set(int i,
                         java.lang.Object value)
Specified by:
set in class AbstractRecord