org.nakedobjects.runtime.memento
Class Memento

java.lang.Object
  extended by 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.
 
Method Summary
 void debug(DebugString debug)
           
 void encodedData(DataOutputStreamExtended outputImpl)
           
protected  org.nakedobjects.runtime.memento.Data getData()
           
 Oid getOid()
           
 NakedObject recreateObject()
           
 void restore(DataInputStreamExtended inputImpl)
           
 java.lang.String toString()
           
 void updateObject(NakedObject object)
          Updates the specified object (assuming it is the correct object for this memento) with the state held by this memento.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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.