com.planet_ink.coffee_mud.core.intermud.i3.persist
Interface Persistent

All Known Implementing Classes:
Intermud

public interface Persistent

Specified methods which must be implemented by objects wishing to be saved.


Field Summary
static int DELETED
          The Persistent needs to be deleted from the data store.
static int MODIFIED
          The Peersistence has been modified since last save or restore.
static int NEW
          The Persistent is a brand new object.
static int UNMODIFIED
          The Persistent has not yet been modified since last save or restore.
 
Method Summary
 void restore()
          Prescribes a method for restoration from a data store.
 void save()
          Prescribes a method for saving this object's data to a data store.
 

Field Detail

UNMODIFIED

static final int UNMODIFIED
The Persistent has not yet been modified since last save or restore.

See Also:
Constant Field Values

MODIFIED

static final int MODIFIED
The Peersistence has been modified since last save or restore.

See Also:
Constant Field Values

NEW

static final int NEW
The Persistent is a brand new object.

See Also:
Constant Field Values

DELETED

static final int DELETED
The Persistent needs to be deleted from the data store.

See Also:
Constant Field Values
Method Detail

restore

void restore()
             throws PersistenceException
Prescribes a method for restoration from a data store. An implementation will usually call the object's PersistentPeer method to perform the actual save.

Throws:
PersistenceException - thrown when an error occurs in restoring
See Also:
PersistentPeer

save

void save()
          throws PersistenceException
Prescribes a method for saving this object's data to a data store. An implementation will usually check to see if the object has been modified and trigger the actual saving mechanism in its PersistentPeer implementation.

Throws:
PersistenceException - thrown when an error occurs in saving
See Also:
PersistentPeer