//
// Depot library - a Java relational persistence library
// http://code.google.com/p/depot/source/browse/trunk/LICENSE

package com.samskivert.depot.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines an index on an entity table.
 */
@Target(value=ElementType.FIELD)
@Retention(value=RetentionPolicy.RUNTIME)
public @interface Index
{
    /**
     * Defines the name of the index.<p>
     *
     * If this annotation is on a field, an index is created for all fields annotated with this
     * name in the order of the fields in the class.<p>
     *
     * If this is defined, a static method must be defined on the record that provides the index
     * configuration. The method must match one of the following two signatures:
     * <pre>
     * public static ColumnExp<?>[] indexName ()
     * public static List&lt;Tuple&lt;SQLExpression, OrderBy.Order>> indexName ()
     * </pre>
     * The first form will result in a simple multicolum index being created
     * with the supplied columns. The second will create a function index using the supplied
     * SQLExpressions.
     */
    String name () default "";

    /** Does this index enforce a uniqueness constraint? */
    boolean unique () default false;
}

@@ -514,19 +514,16 @@
 e index.
-%3Cp%3E
 %0A     *%0A
@@ -521,32 +521,35 @@
 .%0A     *%0A     * 
+%3Cp%3E
 If this annotati
@@ -674,16 +674,17 @@
  class.%3C
+/
 p%3E%0A     
@@ -692,24 +692,27 @@
 %0A     * 
+%3Cp%3E
 If this 
 is defin
@@ -707,18 +707,57 @@
 his 
-is defined
+annotation is on a %7B@code PersistentRecord%7D class
 , a 
@@ -777,16 +777,23 @@
  must be
+%0A     *
  defined
@@ -797,21 +797,21 @@
 ned 
-o
+i
 n th
-e record
+at class
  tha
@@ -830,23 +830,16 @@
 he index
-%0A     *
  configu
@@ -870,24 +870,31 @@
 match one of
+%0A     *
  the followi
@@ -1146,23 +1146,16 @@
  created
-%0A     *
  with th
@@ -1164,16 +1164,23 @@
 supplied
+%0A     *
  columns
@@ -1239,23 +1239,23 @@
 supplied
-%0A     *
+ %7B@code
  SQLExpr
@@ -1260,18 +1260,23 @@
 pression
+%7D
 s.
+%3C/p%3E
 %0A     */

Improve the documentation here.