Package org.hibernate
Class DuplicateMappingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- jakarta.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.MappingException
-
- org.hibernate.DuplicateMappingException
-
- All Implemented Interfaces:
Serializable
public class DuplicateMappingException extends MappingException
Raised whenever a duplicate for a certain type occurs, such as a duplicate class, table, or property name.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DuplicateMappingException.Type
Enumeration of the types of things that can be duplicated.
-
Constructor Summary
Constructors Constructor Description DuplicateMappingException(String customMessage, DuplicateMappingException.Type type, String name)
Creates aDuplicateMappingException
using the given customMessage, type and name.DuplicateMappingException(DuplicateMappingException.Type type, String name)
Creates aDuplicateMappingException
using the given type and name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getType()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
DuplicateMappingException
public DuplicateMappingException(DuplicateMappingException.Type type, String name)
Creates aDuplicateMappingException
using the given type and name.- Parameters:
type
- The type of the duplicated thing.name
- The name of the duplicated thing.
-
DuplicateMappingException
public DuplicateMappingException(String customMessage, DuplicateMappingException.Type type, String name)
Creates aDuplicateMappingException
using the given customMessage, type and name.- Parameters:
customMessage
- A custom exception message explaining the exception conditiontype
- The type of the duplicated thing.name
- The name of the duplicated thing.
-
-