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

top.openyuan.jpa.specification.annotation.Join Maven / Gradle / Ivy

package top.openyuan.jpa.specification.annotation;

import javax.persistence.criteria.JoinType;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 用于“连接”({@code JOIN})查询场景的注解.
 *
 * @author lzy on 2021-11-15
 * @since v1.0.0
 */
@Documented
@Target(FIELD)
@Retention(RUNTIME)
public @interface Join {

    /**
     * 注解的实体名称,默认为空或空字符串时将使用实体名称.
     *
     * @return 字符串值
     */
    String value() default "";

    /**
     * 连接类型 {@link JoinType},默认内连接 {@link JoinType#INNER}.
     *
     * @return {@link JoinType} 连接类型
     */
    JoinType joinType() default JoinType.INNER;

    /**
     * 连接的实体类的 {@code class}.
     *
     * @return {@code Class} 类型
     */
    Class targetClass();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy