Class EntityExistsException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ca.corefacility.bioinformatics.irida.exceptions.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
-
-
Constructor Summary
Constructors Constructor Description EntityExistsException(java.lang.String message)
Construct a newEntityExistsException
with the specified message.EntityExistsException(java.lang.String message, java.lang.String fieldName)
Construct a newEntityExistsException
with the specified message.EntityExistsException(java.lang.String message, java.lang.Throwable cause)
Construct a newEntityExistsException
with the specified message and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFieldName()
Get the field name that caused the exceptionvoid
setFieldName(java.lang.String fieldName)
Set the field name that was in duplicate and caused the exception
-
-
-
Constructor Detail
-
EntityExistsException
public EntityExistsException(java.lang.String message)
Construct a newEntityExistsException
with the specified message.- Parameters:
message
- the message explaining the exception.
-
EntityExistsException
public EntityExistsException(java.lang.String message, java.lang.Throwable cause)
Construct a newEntityExistsException
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 newEntityExistsException
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
-
-