com.flipkart.hbaseobjectmapper.HBColumnMultiVersion Maven / Gradle / Ivy
Show all versions of hbase-object-mapper Show documentation
package com.flipkart.hbaseobjectmapper;
import com.flipkart.hbaseobjectmapper.codec.Codec;
import java.io.Serializable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.reflect.Type;
import java.util.Map;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Maps an entity field of type NavigableMap<Long, T>
to an HBase column whose data type is represented as data type T
.
*
* As the name explains, this annotation is the multi-version variant of {@link HBColumn}.
*
* Please note: T
must be {@link Serializable}
*/
@Target(FIELD)
@Retention(RUNTIME)
public @interface HBColumnMultiVersion {
/**
* Name of HBase column family
*
* @return Name of HBase column family
*/
String family();
/**
* Name of HBase column
*
* @return Name of HBase column
*/
String column();
/**
* [optional] flags to be passed to codec's {@link Codec#serialize(Serializable, Map) serialize} and {@link Codec#deserialize(byte[], Type, Map) deserialize} methods
*
* Note: These flags will be passed as a Map<String, String>
(param name and param value)
*
* @return Flags
*/
Flag[] codecFlags() default {};
}