com.arsdigita.domain
Class DeleteCheckObserver

java.lang.Object
  extended bycom.arsdigita.domain.AbstractDomainObjectObserver
      extended bycom.arsdigita.domain.DeleteCheckObserver
All Implemented Interfaces:
DomainObjectObserver

public class DeleteCheckObserver
extends AbstractDomainObjectObserver

DomainObjectObserver which checks that a delete will not fail before trying to perform it. If it will, it returns a DeleteException containing information about which objects and associations would cause the failure.

Author:
Matthew Booth

Field Summary
 
Fields inherited from class com.arsdigita.domain.AbstractDomainObjectObserver
versionId
 
Method Summary
 void beforeDelete(DomainObject obj)
          Check there are no associated objects which would cause a failure if this object were deleted.
static void observe(ObservableDomainObject obj)
           
 
Methods inherited from class com.arsdigita.domain.AbstractDomainObjectObserver
add, afterDelete, afterSave, beforeSave, clear, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

observe

public static final void observe(ObservableDomainObject obj)

beforeDelete

public void beforeDelete(DomainObject obj)
                  throws PersistenceException
Check there are no associated objects which would cause a failure if this object were deleted.

Specified by:
beforeDelete in interface DomainObjectObserver
Overrides:
beforeDelete in class AbstractDomainObjectObserver
Parameters:
obj - the domain object to be deleted
Throws:
PersistenceException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC