ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.cache
Class ReferentialIntegrityException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.modeshape.jcr.cache.ReferentialIntegrityException
All Implemented Interfaces:
Serializable

public class ReferentialIntegrityException
extends RuntimeException

An exception signalling that a set of nodes could not be deleted because there are other nodes that contain JCR REFERENCE properties pointing to these ndoes, preventing their deletion.

See Also:
Serialized Form

Constructor Summary
ReferentialIntegrityException(Set<NodeKey> removedNodes, Set<NodeKey> referrers)
           
 
Method Summary
 Set<NodeKey> getReferrers()
          Get the set of node keys that contain REFERENCE properties to nodes being deleted, and therefore prevent the removal.
 Set<NodeKey> getRemovedNodes()
          Get the set of keys to the nodes that were removed.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReferentialIntegrityException

public ReferentialIntegrityException(Set<NodeKey> removedNodes,
                                     Set<NodeKey> referrers)
Parameters:
removedNodes - the nodes that are being removed; may not be null or empty
referrers - the set of node keys that refer to nodes being removed; may not be null or empty
Method Detail

getReferrers

public Set<NodeKey> getReferrers()
Get the set of node keys that contain REFERENCE properties to nodes being deleted, and therefore prevent the removal.

Returns:
the immutable set of node keys to the referring nodes; never null and never empty

getRemovedNodes

public Set<NodeKey> getRemovedNodes()
Get the set of keys to the nodes that were removed.

Returns:
the immutable set of keys to the removed nodes; never null and never empty

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.