validatable.java
来自「用Java实现的23个常用设计模式源代码」· Java 代码 · 共 26 行
JAVA
26 行
//$Id: Validatable.java,v 1.4 2003/04/25 03:40:30 oneovthafew Exp $package net.sf.hibernate;/** * Implemented by persistent classes with invariants that must * be checked before inserting into or updating the database. * * @author Gavin King */public interface Validatable { /** * Validate the state of the object before persisting it. * If a violation occurs, throw a <tt>ValidationFailure</tt>. * This method must not change the state of the object by * side-effect. * @throws ValidationFailure if an invariant is violated */ public void validate() throws ValidationFailure;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?