org.oddjob.persist
Interface ComponentPersister

All Superinterfaces:
ComponentRestorer
All Known Implementing Classes:
PersisterBase

public interface ComponentPersister
extends ComponentRestorer

The definition for an object that can save and restore a heierarchy of components starting from the root component.

Author:
Rob Gordon.

Method Summary
 void close()
          Close the persister.
 java.lang.Object getRoot()
          Get the root component of the hierarchy being persisted.
 void initialise(ComponentRegistry componentRegistry)
          Initialise this perister.
 void setRoot(java.lang.Object component)
          The root component of the hierarchy being persisted.
 
Methods inherited from interface org.oddjob.arooa.ComponentRestorer
restore
 

Method Detail

setRoot

public void setRoot(java.lang.Object component)
The root component of the hierarchy being persisted.

Parameters:
component - The root component.

getRoot

public java.lang.Object getRoot()
Get the root component of the hierarchy being persisted.

Returns:
The root component.

initialise

public void initialise(ComponentRegistry componentRegistry)
Initialise this perister. An implementation can expect the root component to have been provided before this method is called.

Parameters:
componentRegistry - The component in which an implementation can expect to find ids for component in the hierarchy.

close

public void close()
Close the persister. Free any resources.