KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.hibernate.annotations;
2
3 import java.lang.annotation.Retention JavaDoc;
4 import java.lang.annotation.Target JavaDoc;
5
6 import static java.lang.annotation.ElementType.METHOD JavaDoc;
7 import static java.lang.annotation.ElementType.FIELD JavaDoc;
8 import static java.lang.annotation.RetentionPolicy.RUNTIME JavaDoc;
9
10 /**
11  * Describe an index column of a List
12  *
13  * @author Matthew Inger
14  */

15 @Target JavaDoc({METHOD, FIELD}) @Retention JavaDoc(RUNTIME)
16 public @interface IndexColumn {
17     /** column name */
18     String JavaDoc name();
19     /** index in DB start from base */
20     int base() default 0;
21     /** is the index nullable */
22     boolean nullable() default true;
23     /** column definition, default to an appropriate integer */
24     String JavaDoc columnDefinition() default "";
25 }
26
Popular Tags