Class ConstraintViolationException

All Implemented Interfaces:
Serializable

public class ConstraintViolationException extends IllegalArgumentException
Thrown to indicate that an insert, an update or a delete is not valid with respect to a blocking constraint.
See Also:
  • Constructor Details

  • Method Details

    • getUserMessage

      public UserMessage getUserMessage()
      Returns the user message associated with this exception.
    • getNode

      public SchemaNode getNode()
      Returns the node associated with the constraint violated. The node can be null if this exception is raised during the following actions:
      • Attempt to delete a record referenced by a foreign key constraint,
      • Attempt to delete a dataset referenced by a foreign key constraint,
      • Attempt to close a dataspace or snapshot referenced by a foreign key constraint.
    • getFacet

      public SchemaFacet getFacet()
      Returns the facet associated with the constraint violated. Returns null if this exception is raised:
      • during the attempt to close a dataspace or snapshot referenced by a foreign key constraint.
      • during the attempt to create a record in the target table of an association that does not comply with the filter defined by the association.
    • getXPathExpression

      public String getXPathExpression()
      Returns an XPath expression specifying the entity with which this exception is associated. The XPath expression can be null if this exception is raised while attempting to close a dataspace or snapshot referenced by a foreign key constraint.
    • toString

      public String toString()
      Returns a string representation of the localized message defined by this exception.
      Overrides:
      toString in class Throwable