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

com.github.aidensuen.mongo.annotation.Update 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 org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Update {

    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
     */
    @AliasFor("updateFields")
    String[] value() default {};


    /**
     * the same as value
     *
     * @return
     */
    @AliasFor("value")
    String[] updateFields() default {};


    /**
     * when it's true, null value will be upsert
     *
     * @return
     */
    boolean nullable() default false;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy