KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > validator > InvalidStateException


1 //$Id: InvalidStateException.java,v 1.1 2005/05/27 08:58:53 epbernard Exp $
2
package org.hibernate.validator;
3
4 /**
5  * Thrown when the bean has violated one or several of its constraints
6  * You can get the violation details in getInvalidValues()
7  *
8  * @author Gavin King
9  */

10 public class InvalidStateException extends RuntimeException JavaDoc {
11     
12     private final InvalidValue[] invalidValues;
13     
14     public InvalidStateException(InvalidValue[] invalidValues) {
15         super( "validation failed for: " + invalidValues[0].getBeanClass().getName() );
16         this.invalidValues = invalidValues;
17     }
18     
19     public InvalidValue[] getInvalidValues() {
20         return invalidValues;
21     }
22
23 }
24
Popular Tags