com.revusky.niggle.data
Class AntiRecord
java.lang.Object
|
+--com.revusky.niggle.data.DefaultRecord
|
+--com.revusky.niggle.data.AntiRecord
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Externalizable, 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 |
java.lang.Object |
getPrimaryKey()
Retrieve the value of the record's primary key. |
boolean |
isImmutable()
Once a record is immutable,
attempts to change data will result in
an ImmutableDataException being thrown. |
java.lang.String |
toString()
Provides a default string representation of the
record for a human-readable flat-file
persistence scheme. |
Methods inherited from class com.revusky.niggle.data.DefaultRecord |
checkValidity, clearFields, equals, get, get, get, getCreationDate, getDisplayLocale, getLastModified, getMetadata, getMutableCopy, getType, getVersion, isStale, postCheck, preCheck, readExternal, set, set, set, setMetadata, setPrimaryKey, setValuesFromTable, touch, 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:
DefaultRecord
- Provides a default string representation of the
record for a human-readable flat-file
persistence scheme.
- Overrides:
toString
in class DefaultRecord
- Following copied from class:
com.revusky.niggle.data.DefaultRecord
- Returns:
- string of form field=value \n field=value \n\n
isImmutable
public boolean isImmutable()
- Description copied from class:
DefaultRecord
- Once a record is immutable,
attempts to change data will result in
an ImmutableDataException being thrown.
- Overrides:
isImmutable
in class DefaultRecord
- Following copied from class:
com.revusky.niggle.data.DefaultRecord
- Returns:
- boolean value representing whether the
record is immutable.
getPrimaryKey
public java.lang.Object getPrimaryKey()
- Description copied from interface:
Record
- Retrieve the value of the record's primary key.
- Overrides:
getPrimaryKey
in class DefaultRecord
- Following copied from interface:
com.revusky.niggle.data.Record
- Returns:
- the value of this record's primary key, or null if it
has not been set.