KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > annotations > Entity


1 //$Id: Entity.java,v 1.2 2005/02/28 21:42:17 epbernard Exp $
2
package org.hibernate.annotations;
3
4 import static java.lang.annotation.ElementType.TYPE JavaDoc;
5
6 import static java.lang.annotation.RetentionPolicy.RUNTIME JavaDoc;
7
8 import java.lang.annotation.Target JavaDoc;
9 import java.lang.annotation.Retention JavaDoc;
10
11 /**
12  * Extends {@link javax.persistence.Entity} with Hibernate features
13  * @author Emmanuel Bernard
14  */

15 @Target JavaDoc(TYPE) @Retention JavaDoc(RUNTIME)
16 public @interface Entity {
17     /** Is this entity mutable (read only) or not */
18     boolean mutable() default true;
19     /** Needed column only in SQL on insert */
20     boolean dynamicInsert() default false;
21     /** Needed column only in SQL on update */
22     boolean dynamicUpdate() default false;
23     /** Do a select to retrieve the entity before any potential update */
24     boolean selectBeforeUpdate() default false;
25     /** polymorphism strategy for this entity */
26     PolymorphismType polymorphism() default PolymorphismType.IMPLICIT;
27     /** persister of this entity, default is hibernate internal one */
28     String JavaDoc persister() default "";
29     /** optimistic locking strategy */
30     OptimisticLockType optimisticLock() default OptimisticLockType.VERSION;
31 }
32
Popular Tags