com.basho.riak.client.convert
Annotation Type RiakIndex


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface RiakIndex

Annotation to declare a field as a RiakIndex.

You do not need to specify the index type prefix (_bin/_int). It will be inferred from the type of the annotated field. Only String/Integer/int fields may be annotated with RiakIndex.

NOTE: if there are *multiple* values for the same named index, only the 1st will find it's way into the domain object (atm)

For example:

 public class MyClass {
     \@RiakKey
     private String myKeyString;
     
     \@RiakIndex("email")
     private String emailAddress; // will be indexed in email_bin index
     
     \@RiakIndex("age")
     private int age; // will be index in age_int index
 }
 

Author:
russell
See Also:
JSONConverter, DefaultBucket

Optional Element Summary
 String name
           
 

name

public abstract String name
Returns:
the index name
Default:
""


Copyright © 2012. All Rights Reserved.