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

net.paoding.rose.jade.annotation.SqlJpa Maven / Gradle / Ivy

package net.paoding.rose.jade.annotation;

import java.lang.annotation.*;

/**
 * 
 * 用jpa的方式解析sql.
 * 在方法上添加该注解,配置要查询的字段和表名称(优先级最高)
 * 或者在dao层的接口里面添加常量
 *      public final static String SELECT_COLUMN = "id,name....."
 *      public final static String TABLE_NAME = "tb_user"
 * 
* @author fusheng.zhang * @date 2022-02-17 15:26:24 */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface SqlJpa { /** * 要查询的字段,多个字段逗号拼接 * @return */ String columns() default "*"; /** * 要查询的表名称 * @return */ String tableName() default ""; /** * 对应的 entity 的class
* 如果默认,则通过返回值解析
* count 或者 extra * @return */ Class domainClass() default Void.class; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy