Ableverse™
TOB 6.0

av.tob
Annotation Type Index


@Target(value=FIELD)
@Retention(value=CLASS)
public @interface Index

Added to final static String fields to specify indices. The constant value should be a string of comma separated persistent field names or tie names. The index name reported to underlying SwapEngine will be this constant field's name.

Each persistent field name or tie name can have + or - as the first character to specify ASCENDING/DESCENDING order. Without + or - implies SwapEngine default order.

If the index specification can NOT fulfill the above constraint, but you still want to use this annotation, set strictCheck() to false and TOB will stop complaining about it.

Author:
Compl

Optional Element Summary
 String[] engineSpecifics
          This should has the same dimension with enginesWorkAround().
 String[] enginesWorkAround
          This should has the same dimension with engineSpecifics().
 boolean strictCheck
          Indicate whether this index only uses persistent field names as referenced columns.
 boolean unique
          If this index is unique.
 

unique

public abstract boolean unique
If this index is unique.

Returns:
whether unique
Default:
false

enginesWorkAround

public abstract String[] enginesWorkAround
This should has the same dimension with engineSpecifics(). When specified, for each engine of name in this list, use the corrsponding specification at the same position of engineSpecifics() as the index creation specification instead of that generated by TOB.

Returns:
list of engine names need manual index creation specification
Default:
{}

engineSpecifics

public abstract String[] engineSpecifics
This should has the same dimension with enginesWorkAround().

Returns:
list of index creation specifications
See Also:
enginesWorkAround()
Default:
{}

strictCheck

public abstract boolean strictCheck
Indicate whether this index only uses persistent field names as referenced columns. This is by default true to help compile time checking.

If this index uses complex expressions or references table columns other than automatically mapped persistent fields, TOB will produce compile time errors as long as strictCheck is true. Declare it to be false will supress these errors.

Returns:
whether all columns referenced by this index are mapped persistent fields
Default:
true

Ableverse™
TOB 6.0

Copyright© 2006 Ableverse Platform. All rights reserved.