1 // $Id: ViolatedConstraintNameExtracter.java,v 1.1 2004/11/11 20:57:23 steveebersole Exp $ 2 package org.hibernate.exception; 3 4 import java.sql.SQLException; 5 6 /** 7 * Defines a contract for implementations that can extract the name of a violated 8 * constraint from a SQLException that is the result of that constraint violation. 9 * 10 * @author Steve Ebersole 11 */ 12 public interface ViolatedConstraintNameExtracter { 13 /** 14 * Extract the name of the violated constraint from the given SQLException. 15 * 16 * @param sqle The exception that was the result of the constraint violation. 17 * @return The extracted constraint name. 18 */ 19 public String extractConstraintName(SQLException sqle); 20 } 21