Subversion Repositories WebE

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 PointedEar 1
//$Id: Version.java 11282 2007-03-14 22:05:59Z epbernard $
2
//EJB3 Specification Copyright 2004-2006 Sun Microsystems, Inc.
3
package javax.persistence;
4
 
5
import java.lang.annotation.Retention;
6
import java.lang.annotation.Target;
7
 
8
import static java.lang.annotation.ElementType.*;
9
import static java.lang.annotation.RetentionPolicy.*;
10
 
11
/**
12
 * This annotation specifies the version field or property of an entity class that serves as its
13
 * optimistic lock value. The version is used to ensure integrity when performing the merge
14
 * operation and for optimistic concurrency control.
15
 *
16
 * Only a single Version property or field should be used per class; applications that use more
17
 * than one Version property or field will not be portable.
18
 *
19
 * The Version property should be mapped to the primary table for the entity class; applications
20
 * that map the Version property to a table other than the primary table will not be portable.
21
 *
22
 * The following types are supported for version properties: int, Integer, short, Short, long,
23
 * Long, Timestamp.
24
 *  
25
 * @author Emmanuel Bernard
26
 */
27
@Target({METHOD, FIELD}) @Retention(RUNTIME)
28
public @interface Version {}