net.sourceforge.pbeans.annotations
Annotation Type PropertyIndex


@Retention(value=RUNTIME)
public @interface PropertyIndex

This annotation can be part of an array with which PersistentClass.indexes() is set.


Required Element Summary
 java.lang.String[] propertyNames
           
 boolean unique
           
 
Optional Element Summary
 int keyLength
          Number of characters used in index for string fields.
 

Element Detail

unique

public abstract boolean unique

propertyNames

public abstract java.lang.String[] propertyNames

keyLength

public abstract int keyLength
Number of characters used in index for string fields. This value is optional and whether it is actually used depends on the underlying database implementation. Sometimes it's necessary to set it if indexes can't be created due to key length.

Default:
0