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

org.zodiac.mybatisplus.binding.query.BindQuery Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.mybatisplus.binding.query;

import javax.lang.model.type.NullType;

import org.zodiac.core.data.annotation.Comparison;
import org.zodiac.core.data.annotation.Strategy;

import java.lang.annotation.*;

/**
 * 绑定管理器。
 *
 */
@Target(ElementType.FIELD)
@Repeatable(BindQuery.List.class)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface BindQuery {

    /**
     * 查询条件。
     * 
     * @return 比较方式
     */
    Comparison comparison() default Comparison.EQ;

    /**
     * 数据库字段,默认为空,自动根据驼峰转下划线。
     * 
     * @return 字段
     */
    String field() default "";

    /**
     * 绑定的Entity类。
     * 
     * @return 类型
     */
    Class entity() default NullType.class;

    /**
     * JOIN连接条件,支持动态的跨表JOIN查询。
     * 
     * @return 条件
     */
    String condition() default "";

    /**
     * 是否忽略该字段。
     * 
     * @return true 是, false 否
     */
    boolean ignore() default false;

    /**
     * 查询处理策略:默认忽略空字符串。
     * 
     * @return 策略
     */
    Strategy strategy() default Strategy.IGNORE_EMPTY;

    /**
     * 在同一个字段上支持多个{@link BindQuery},之间会用采用OR的方式连接。
     *
     */
    @Target(ElementType.FIELD)
    @Retention(RetentionPolicy.RUNTIME)
    @Documented
    @interface List {

        BindQuery[] value();

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy