immutable.java
来自「Hibernate Annotations Sample」· Java 代码 · 共 23 行
JAVA
23 行
//$Id: Immutable.java 14801 2008-06-24 19:03:32Z hardy.ferentschik $package org.hibernate.annotations;import java.lang.annotation.*;/** * Mark an Entity or a Collection as immutable. No annotation means the element is mutable. * <p> * An immutable entity may not be updated by the application. Updates to an immutable * entity will be ignored, but no exception is thrown. @Immutable must be used on root entities only. * </p> * <p> * @Immutable placed on a collection makes the collection immutable, meaning additions and * deletions to and from the collection are not allowed. A <i>HibernateException</i> is thrown in this case. * </p> * * @author Emmanuel Bernard */@java.lang.annotation.Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})@Retention( RetentionPolicy.RUNTIME )public @interface Immutable {}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?