KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: InvalidValue.java,v 1.1 2005/05/27 08:58:53 epbernard Exp $
2
package org.hibernate.validator;
3
4 /**
5  * A single violation of a class level or method level constraint.
6  *
7  * @author Gavin King
8  */

9 public class InvalidValue {
10     private final String JavaDoc message;
11     private final Object JavaDoc value;
12     private final String JavaDoc propertyName;
13     private final Class JavaDoc beanClass;
14     private final Object JavaDoc bean;
15     
16     public InvalidValue(String JavaDoc message, Class JavaDoc beanClass, String JavaDoc propertyName, Object JavaDoc value, Object JavaDoc bean) {
17         this.message = message;
18         this.value = value;
19         this.beanClass = beanClass;
20         this.propertyName = propertyName;
21         this.bean = bean;
22     }
23     
24     public Class JavaDoc getBeanClass() {
25         return beanClass;
26     }
27     
28     public String JavaDoc getMessage() {
29         return message;
30     }
31
32     public String JavaDoc getPropertyName() {
33         return propertyName;
34     }
35
36     public Object JavaDoc getValue() {
37         return value;
38     }
39
40     public Object JavaDoc getBean() {
41         return bean;
42     }
43
44     public String JavaDoc toString() {
45         return propertyName + ' ' + message;
46     }
47     
48 }
49
Popular Tags