org.oreodata.standalone
Class AntiRecord
java.lang.Object
|
+--org.oreodata.AbstractRecord
|
+--org.oreodata.DefaultRecord
|
+--org.oreodata.standalone.AntiRecord
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Externalizable, OreoConstants, Record, java.io.Serializable
- public class AntiRecord
- extends DefaultRecord
An AntiRecord is to a regular record like Anti-matter is
to matter. A record's antirecord cancels it out.
This is really a trick so that we can treat a log with
deletions in it as a stream of records (the deletion is itself
a record.)
- Author:
- Jonathan Revusky
- See Also:
- Serialized Form
Method Summary |
void |
freeze()
make this record immutable. |
java.lang.Object |
getPrimaryKey()
Retrieve the value of the record's primary key. |
boolean |
isImmutable()
Have the fields all been set?
Once a record is put in a
DataSource, its fields are immutable. |
java.lang.String |
toString()
Provides a default string representation of the
record for a human-readable flat-file
persistence scheme. |
Methods inherited from class org.oreodata.AbstractRecord |
checkValidity, clearFields, equals, get, get, get, getChildren, getMetadata, getParent, getType, hasChildren, isRootElement, isStale, postCheck, preCheck, readExternal, set, set, setPrimaryKey, setValuesFromTable, writeExternal |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AntiRecord
public AntiRecord(Record nestedRec)
toString
public java.lang.String toString()
- Description copied from class:
AbstractRecord
- Provides a default string representation of the
record for a human-readable flat-file
persistence scheme.
- Overrides:
toString
in class AbstractRecord
- Returns:
- string of form field=value \n field=value \n\n
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.
- Specified by:
isImmutable
in interface Record
- Overrides:
isImmutable
in class DefaultRecord
getPrimaryKey
public java.lang.Object getPrimaryKey()
- Description copied from interface:
Record
- Retrieve the value of the record's primary key.
- Specified by:
getPrimaryKey
in interface Record
- Overrides:
getPrimaryKey
in class AbstractRecord
- Returns:
- the value of this record's primary key, or null if it
has not been set.
freeze
public void freeze()
- Description copied from interface:
Record
- make this record immutable.
This will typically only be called by an OreoDataSource object.
- Specified by:
freeze
in interface Record
- Overrides:
freeze
in class AbstractRecord