Annotation Type Index


  • @Retention(SOURCE)
    @Target(FIELD)
    public @interface Index
    Can be used to: - specifies that the property should be indexed - define multi-column index through Entity.indexes()
    See Also:
    Entity.indexes()
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String name
      Optional name of the index.
      boolean unique
      Whether the unique constraint should be created with base on this index
      java.lang.String value
      Comma-separated list of properties that should be indexed, e.g.
    • Element Detail

      • value

        java.lang.String value
        Comma-separated list of properties that should be indexed, e.g. "propertyA, propertyB, propertyC" To specify order, add ASC or DESC after column name, e.g.: "propertyA DESC, propertyB ASC" This should be only set if this annotation is used in Entity.indexes()
        Default:
        ""
      • name

        java.lang.String name
        Optional name of the index. If omitted, then generated automatically by greenDAO with base on property/properties column name(s)
        Default:
        ""
      • unique

        boolean unique
        Whether the unique constraint should be created with base on this index
        Default:
        false