com.github.aidensuen.mongo.annotation.UpdateProvider Maven / Gradle / Ivy
package com.github.aidensuen.mongo.annotation;
import com.github.aidensuen.mongo.command.OperationType;
import com.github.aidensuen.mongo.provider.EmptyProvider;
import java.lang.annotation.*;
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface UpdateProvider {
Class> type() default EmptyProvider.class;
String method() default "dynamicCommand";
OperationType operationType() default OperationType.UNKNOWN;
/**
* class that determines the collection to use
*
* @return
*/
Class> entityClass() default Object.class;
/**
* the properties in entity, default update all properties
*
* @return
*/
String[] value() default {};
/**
* the same as value, use ',' spilt, default update all properties
*
* @return
*/
String fields() default "";
/**
* when it's true, null value will be upsert
*
* @return
*/
boolean nullable() default false;
}