org.oreodata
Class DefaultRecord

java.lang.Object
  |
  +--org.oreodata.AbstractRecord
        |
        +--org.oreodata.DefaultRecord
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, OreoConstants, Record, java.io.Serializable
Direct Known Subclasses:
AntiRecord

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 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
DefaultRecord()
           
 
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

DefaultRecord

public DefaultRecord()
Method Detail

isImmutable

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.


setMetadata

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

Specified by:
setMetadata in interface Record
Overrides:
setMetadata in class AbstractRecord

set

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

get

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

getMutableCopy

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
Overrides:
getMutableCopy in class AbstractRecord