Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: Entity.java 11282 2007-03-14 22:05:59Z epbernard $ |
2 | package org.hibernate.annotations; |
||
3 | |||
4 | import static java.lang.annotation.ElementType.TYPE; |
||
5 | import java.lang.annotation.Retention; |
||
6 | import static java.lang.annotation.RetentionPolicy.RUNTIME; |
||
7 | import java.lang.annotation.Target; |
||
8 | |||
9 | /** |
||
10 | * Extends {@link javax.persistence.Entity} with Hibernate features |
||
11 | * |
||
12 | * @author Emmanuel Bernard |
||
13 | */ |
||
14 | @Target(TYPE) |
||
15 | @Retention(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 persister() default ""; |
||
29 | /** optimistic locking strategy */ |
||
30 | OptimisticLockType optimisticLock() default OptimisticLockType.VERSION; |
||
31 | } |