Subversion Repositories WebE

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 PointedEar 1
//$Id: Table.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 primary table for the annotated entity. Additional
13
 * tables may be specified using SecondaryTable  or SecondaryTables annotation.
14
 *
15
 * If no Table annotation is specified for an entity class, the default values apply.
16
 *
17
 * @author Emmanuel Bernard
18
 */
19
@Target({TYPE}) @Retention(RUNTIME)
20
public @interface Table {
21
        /**
22
         * The name of the table.
23
         *
24
         * Defaults to the entity name.
25
         */
26
        String name() default "";
27
        /**
28
         * The catalog of the table.
29
         *
30
         * Defaults to the default catalog.
31
         */
32
        String catalog() default "";
33
        /**
34
         * The schema of the table.
35
         *
36
         * Defaults to the default schema for user.
37
         */
38
        String schema() default "";
39
        /**
40
         * Unique constraints that are to be placed on the table. These are only used if table
41
         * generation is in effect. These constraints apply in addition to any constraints
42
         * specified by the Column and JoinColumn annotations and constraints entailed by
43
         * primary key mappings.
44
         *
45
         * Defaults to no additional constraints.
46
         */
47
        UniqueConstraint[] uniqueConstraints() default {};
48
}