org.hibernate.DuplicateMappingException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate Show documentation
Show all versions of hibernate Show documentation
Relational Persistence for Java
package org.hibernate;
/**
* Raised whenever a duplicate for a certain type occurs.
* Duplicate class, table, property name etc.
*
* @author Max Rydahl Andersen
*
*/
public class DuplicateMappingException extends MappingException {
private final String name;
private final String type;
public DuplicateMappingException(String customMessage, String type, String name) {
super(customMessage);
this.type=type;
this.name=name;
}
public DuplicateMappingException(String type, String name) {
this("Duplicate " + type + " mapping " + name, type, name);
}
public String getType() {
return type;
}
public String getName() {
return name;
}
}