KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > classic > Validatable


1 //$Id: Validatable.java,v 1.1 2004/07/28 03:33:33 oneovthafew Exp $
2
package org.hibernate.classic;
3
4
5 /**
6  * Implemented by persistent classes with invariants that must
7  * be checked before inserting into or updating the database.
8  *
9  * @author Gavin King
10  */

11 public interface Validatable {
12     /**
13      * Validate the state of the object before persisting it.
14      * If a violation occurs, throw a <tt>ValidationFailure</tt>.
15      * This method must not change the state of the object by
16      * side-effect.
17      * @throws ValidationFailure if an invariant is violated
18      */

19     public void validate() throws ValidationFailure;
20 }
21
22
23
24
25
26
27
Popular Tags