com.github.aidensuen.mongo.annotation.MapKey Maven / Gradle / Ivy
package com.github.aidensuen.mongo.annotation;
import java.lang.annotation.*;
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface MapKey {
/**
* the key names in document, use ',' separator
*
* example
*
* value = "name,age"
*
* @return
*/
String value();
/**
* the separator will enable when value's length of keys gt 1
*
* example
*
* value = "name,age", separator="-" the map key will be like name-age
*
* @return
*/
String separator() default "";
}