All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.aidensuen.mongo.annotation.UpdateProvider Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy