com.basho.riak.client.api.annotations.package-info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riak-client Show documentation
Show all versions of riak-client Show documentation
HttpClient-based client for Riak
The newest version!
/**
* Annotations to use for ORM.
*
* Introduction
* The Riak Java client provides a full set of annotations to facilitate simply
* storing/retrieving your own domain object. All annotations can be applied to
* a field or a getter/setter pair of methods.
*
* In addition, the {@link com.basho.riak.client.api.convert.Converter}
* interface allows for serialization/deserialization for the data portion.
*
*
* By annotating your own domain object, you can simply pass an instance of it
* to {@link com.basho.riak.client.api.commands.kv.StoreValue}.
*
*
* When fetching data from Riak, the reverse is also true. The {@link com.basho.riak.client.api.commands.kv.FetchValue.Response}
* handles injecting your domain object with any of the annotated values.
*
*
* Raw types as well as Generic types are supported. The latter is done via Jackson's
* {@code TypeReferece} class.
*
* OverView
* To store an object in Riak there's a minimum of four pieces of information
* required; a bucket type, a bucket name, a key, and a vector clock. For an
* annotated domain object, only three of these are required as in the absence of
* a bucket type, the default "default" type is supplied.
*
*
* public class AnnotatedPojo
* {
* {@literal @}RiakBucketType
* public String bucketType;
*
* {@literal @}RiakBucketName
* public String bucketName;
*
* {@literal @}RiakKey
* public String key;
*
* {@literal @}RiakVClock
* VClock clock;
*
* public String value;
* }
*
*
*
*/
package com.basho.riak.client.api.annotations;
© 2015 - 2025 Weber Informatics LLC | Privacy Policy