org.nakedobjects.runtime.memento
Class Memento
java.lang.Object
org.nakedobjects.runtime.memento.Memento
public class Memento
- extends java.lang.Object
|
Constructor Summary |
Memento(NakedObject object)
Creates a memento that hold the state for the specified object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Memento
public Memento(NakedObject object)
- Creates a memento that hold the state for the specified object. This object is Serializable and can be
passed over the network easily. Also for a persistent only the reference's Oids are held, avoiding the
need for serializing the whole object graph.
getOid
public Oid getOid()
recreateObject
public NakedObject recreateObject()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
updateObject
public void updateObject(NakedObject object)
- Updates the specified object (assuming it is the correct object for this memento) with the state held
by this memento.
- Throws:
java.lang.IllegalArgumentException - if the memento was created from different logical object to the one specified (i.e. its oid
differs).
getData
protected org.nakedobjects.runtime.memento.Data getData()
encodedData
public void encodedData(DataOutputStreamExtended outputImpl)
throws java.io.IOException
- Throws:
java.io.IOException
restore
public void restore(DataInputStreamExtended inputImpl)
throws java.io.IOException
- Throws:
java.io.IOException
debug
public void debug(DebugString debug)
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.