org.nakedobjects.plugins.hibernate.objectstore.persistence.algorithm
Class TwoPassPersistAlgorithm

java.lang.Object
  extended by org.nakedobjects.runtime.persistence.objectstore.algorithm.PersistAlgorithmAbstract
      extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.algorithm.TwoPassPersistAlgorithm
All Implemented Interfaces:
PersistAlgorithm

public class TwoPassPersistAlgorithm
extends PersistAlgorithmAbstract

Implements persistence-by-reachability, explicitly walks the graph and persisting first 1:1 associations and then 1:m associations.

This is an alternative to the SimplePersistAlgorithm that simply relies on Hibernate to do its thang using its cascade setting.


Constructor Summary
TwoPassPersistAlgorithm()
           
 
Method Summary
 void makePersistent(NakedObject object, ToPersistObjectSet toPersistObjectSet)
           
 java.lang.String name()
           
 java.lang.String toString()
           
 
Methods inherited from class org.nakedobjects.runtime.persistence.objectstore.algorithm.PersistAlgorithmAbstract
alreadyPersistedOrNotPersistable, alreadyPersistedOrNotPersistableOrServiceOrStandalone, assertObjectNotPersistentAndPersistable, init, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TwoPassPersistAlgorithm

public TwoPassPersistAlgorithm()
Method Detail

name

public java.lang.String name()

makePersistent

public void makePersistent(NakedObject object,
                           ToPersistObjectSet toPersistObjectSet)
Parameters:
persistedObjectAdder - - will actually be implemented by PersistenceSession

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.