Class DefaultRecord

All Implemented Interfaces:
java.lang.Cloneable,, OreoConstants, Record,
Direct Known Subclasses:

public class DefaultRecord
extends AbstractRecord

A concrete 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. DefaultRecord implements the 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.

Serialized Form

Field Summary
Fields inherited from interface org.oreodata.OreoConstants
Constructor Summary
Method Summary
protected  java.lang.Object get(int i)
 Record getMutableCopy()
          create a clone.
 boolean isImmutable()
          Have the fields all been set? Once a record is put in a DataSource, its fields are immutable.
protected  void set(int i, java.lang.Object value)
 void setMetadata(RecordDescriptor desc)
          Method only used internally.
Methods inherited from class org.oreodata.AbstractRecord
checkValidity, clearFields, equals, freeze, get, get, get, getChildren, getMetadata, getParent, getPrimaryKey, getType, hasChildren, isRootElement, isStale, postCheck, preCheck, readExternal, set, set, setPrimaryKey, setValuesFromTable, toString, writeExternal
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public DefaultRecord()
Method Detail


public boolean isImmutable()
Description copied from interface: Record
Have the fields all been set? Once a record is put in a DataSource, its fields are immutable.


public void setMetadata(RecordDescriptor desc)
Description copied from interface: Record
Method only used internally.

Specified by:
setMetadata in interface Record
setMetadata in class AbstractRecord


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


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


public Record getMutableCopy()
Description copied from class: AbstractRecord
create a clone. A shallow copy of the values array should be enough for immutable records Note that a newly cloned object has its immutable flag set to false, so that it is in a modifiable state.

Specified by:
getMutableCopy in interface Record
getMutableCopy in class AbstractRecord