Class EntityExistsException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ExistingSampleNameException

    public class EntityExistsException
    extends java.lang.RuntimeException
    When an entity to be created in the database shares an identifier with an existing entity.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFieldName()
      Get the field name that caused the exception
      void setFieldName​(java.lang.String fieldName)
      Set the field name that was in duplicate and caused the exception
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

      • EntityExistsException

        public EntityExistsException​(java.lang.String message)
        Construct a new EntityExistsException with the specified message.
        Parameters:
        message - the message explaining the exception.
      • EntityExistsException

        public EntityExistsException​(java.lang.String message,
                                     java.lang.Throwable cause)
        Construct a new EntityExistsException with the specified message and cause.
        Parameters:
        message - the message explaining the exception.
        cause - the original cause of the exception.
      • EntityExistsException

        public EntityExistsException​(java.lang.String message,
                                     java.lang.String fieldName)
        Construct a new EntityExistsException with the specified message.
        Parameters:
        message - the message explaining the exception.
        fieldName - The name of the field causing the exception
    • Method Detail

      • getFieldName

        public java.lang.String getFieldName()
        Get the field name that caused the exception
        Returns:
        The name of the field that already exists in the database
      • setFieldName

        public void setFieldName​(java.lang.String fieldName)
        Set the field name that was in duplicate and caused the exception
        Parameters:
        fieldName - The field name causing the exception