java.beans
Class PersistenceDelegate

java.lang.Object
  extended by java.beans.PersistenceDelegate
Direct Known Subclasses:
DefaultPersistenceDelegate

public abstract class PersistenceDelegate
extends Object

A PersistenceDelegate describes how a another object has to constructed and transformed in order to create a complete replicate.

For custom classes you will need to implement PersistenceDelegate in a way that is suitable for them. To make use of the implementation you have to register it with an Encoder using the {Encoder#setPersistenceDelegate} method.

Since:
1.4

Constructor Summary
PersistenceDelegate()
           
 
Method Summary
protected  void initialize(Class<?> type, Object oldInstance, Object newInstance, Encoder out)
           
protected abstract  Expression instantiate(Object oldInstance, Encoder out)
           
protected  boolean mutatesTo(Object oldInstance, Object newInstance)
           
 void writeObject(Object oldInstance, Encoder out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceDelegate

public PersistenceDelegate()
Method Detail

initialize

protected void initialize(Class<?> type,
                          Object oldInstance,
                          Object newInstance,
                          Encoder out)

writeObject

public void writeObject(Object oldInstance,
                        Encoder out)

mutatesTo

protected boolean mutatesTo(Object oldInstance,
                            Object newInstance)

instantiate

protected abstract Expression instantiate(Object oldInstance,
                                          Encoder out)