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


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

Annotation to declare a map field as containing user meta data for a Riak object.

If you set the key value (to anything other than the empty string) then you can use the annotation to map a single key of user meta data to a field.

For example:

 public class MyClass {
     \@RiakKey
     private String myKeyString;
     
     \@RiakUsermeta
     private Map usermetaData;
     // - OR -
     \@RiakUsermeta("usermeta-data-key1") // NOTE: use lower case, as the HTTP API will lower case keys
     private String usermetaDataItem1;
 }
 

Author:
russell
See Also:
JSONConverter, DefaultBucket

Optional Element Summary
 String key
          Use a lower case key.
 

key

public abstract String key
Use a lower case key. The riak HTTP API *will* lower case key names.

Returns:
the key for the user meta item
Default:
""


Copyright © 2012. All Rights Reserved.