001package io.ebean.annotation;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Retention;
005import java.lang.annotation.RetentionPolicy;
006import java.lang.annotation.Target;
007
008/**
009 * Used for mapping a Map<String,String> type property to Postgres HSTORE data type.
010 * <p>
011 * The Map property should have keys and values of type String.
012 * </p>
013 * <p>
014 * <h3>Example:</h3>
015 * <pre>{@code
016 *
017 *   @DbHstore
018 *   Map<String, String> tags;
019 *
020 * }</pre>
021 */
022@Retention(RetentionPolicy.RUNTIME)
023@Target(ElementType.FIELD)
024public @interface DbMap {
025
026  /**
027   * For VARCHAR storage specify the column length (defaults to 1000).
028   */
029  int length() default 0;
030}