KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Sort.java,v 1.1 2005/05/16 14:57:03 epbernard Exp $
2
package org.hibernate.annotations;
3
4 import java.lang.annotation.Retention JavaDoc;
5 import java.lang.annotation.Target JavaDoc;
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  * Collection sort
12  * (Java level sorting)
13  * @author Emmanuel Bernard
14  */

15 @Target JavaDoc({METHOD, FIELD}) @Retention JavaDoc(RUNTIME)
16 public @interface Sort {
17     /**
18      * sort type
19      */

20     SortType type() default SortType.UNSORTED;
21     /**
22      * Sort comparator implementation
23      */

24     //TODO find a way to use Class<Comparator>
25
Class JavaDoc comparator() default void.class;
26 }
27
Popular Tags