FileDocCategorySizeDatePackage
DuplicateMappingException.javaAPI DocHibernate 3.2.5669Wed Jul 26 06:32:20 BST 2006org.hibernate

DuplicateMappingException.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;
	}
}