org.modeshape.jcr.cache

## Class ReferentialIntegrityException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - 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 nodes, preventing their deletion.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReferentialIntegrityException(Set<NodeKey> removedNodes, Set<NodeKey> referrers)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMessage()`
    `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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, 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

    - #### getMessage

          public String getMessage()

      Overrides:
        `getMessage` in class `Throwable`

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