!130 optimize javadoc

Merge pull request !130 from 王帅/main
This commit is contained in:
Michael Yang 2023-07-13 00:36:33 +00:00 committed by Gitee
commit ce1096c837
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 89 additions and 41 deletions

View File

@ -28,17 +28,17 @@ import java.lang.annotation.*;
public @interface Condition {
/**
* 列名
* 列名
*/
String column();
String column();
/**
* 逻辑值> , >= , = , IS NULL, IS NOT NULL
* 逻辑值> , >= , = , IS NULL, IS NOT NULL
*/
String logic() default " = ";
/**
*
*
*/
String[] value() default {};

View File

@ -32,17 +32,29 @@ public @interface RelationManyToMany {
*
* @return 属性名称
*/
String selfField() default "";
String selfField() default "";
/**
* 目标实体类对应的表的 schema一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表的 schema 模式
*
* <p>
* 如果目标实体类没有使用 {@code @Table(schema = "...")} 指定 schema
* 需要在这里指定对应表的 schema 一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return schema 名称
*/
String targetSchema() default "";
/**
* 目标实体类对应的表一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表名
*
* <p>
* 如果目标实体类没有使用 {@code @Table(value = "...")} 指定表名时
* 需要在这里指定对应表的表名一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return 表名
*/
@ -52,48 +64,47 @@ public @interface RelationManyToMany {
* 目标实体类的关联属性
*
* @return 属性名称
*/
String targetField() default "";
*/
String targetField() default "";
/**
* 中间表名称
*
* @return 中间表名称
*/
String joinTable();
*/
String joinTable();
/**
* 中间表与当前表的关联字段
*
* @return 字段名称列名
*/
String joinSelfColumn();
*/
String joinSelfColumn();
/**
* 目标表的关联字段名称
*
* @return 字段名称和表
*/
String joinTargetColumn();
*/
String joinTargetColumn();
/**
* 查询时追加的额外条件
* 查询时追加的额外条件
*/
Condition[] extraConditions() default {};
Condition[] extraConditions() default {};
/**
* 查询排序
*
* @return 排序方式
*/
String orderBy() default "";
*/
String orderBy() default "";
/**
* 默认使用哪个数据源若系统找不到该指定的数据源时默认使用第一个数据源
*
* @return 数据源
*/
String dataSource() default "";
*/
String dataSource() default "";
}

View File

@ -35,14 +35,26 @@ public @interface RelationManyToOne {
String selfField();
/**
* 目标实体类对应的表的 schema一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表的 schema 模式
*
* <p>
* 如果目标实体类没有使用 {@code @Table(schema = "...")} 指定 schema
* 需要在这里指定对应表的 schema 一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return schema 名称
*/
String targetSchema() default "";
/**
* 目标实体类对应的表一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表名
*
* <p>
* 如果目标实体类没有使用 {@code @Table(value = "...")} 指定表名时
* 需要在这里指定对应表的表名一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return 表名
*/
@ -52,7 +64,7 @@ public @interface RelationManyToOne {
* 目标实体类的关联属性
*
* @return 属性名称
*/
*/
String targetField() default "";
/**
@ -80,7 +92,7 @@ public @interface RelationManyToOne {
* 默认使用哪个数据源若系统找不到该指定的数据源时默认使用第一个数据源
*
* @return 数据源
*/
String dataSource() default "";
*/
String dataSource() default "";
}

View File

@ -32,17 +32,29 @@ public @interface RelationOneToMany {
*
* @return 属性名称
*/
String selfField() default "";
String selfField() default "";
/**
* 目标实体类对应的表的 schema一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表的 schema 模式
*
* <p>
* 如果目标实体类没有使用 {@code @Table(schema = "...")} 指定 schema
* 需要在这里指定对应表的 schema 一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return schema 名称
*/
String targetSchema() default "";
/**
* 目标实体类对应的表一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表名
*
* <p>
* 如果目标实体类没有使用 {@code @Table(value = "...")} 指定表名时
* 需要在这里指定对应表的表名一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return 表名
*/
@ -52,8 +64,8 @@ public @interface RelationOneToMany {
* 目标实体类的关联属性
*
* @return 属性名称
*/
String targetField();
*/
String targetField();
/**
* 中间表名称一对一的关系是通过通过中间表维护时需要添加此项配置
@ -77,7 +89,7 @@ public @interface RelationOneToMany {
String joinTargetColumn() default "";
/**
* 查询时追加的额外条件
* 查询时追加的额外条件
*/
Condition[] extraConditions() default {};
@ -85,21 +97,21 @@ public @interface RelationOneToMany {
* 查询排序
*
* @return 排序方式
*/
String orderBy() default "";
*/
String orderBy() default "";
/**
* 现在查询的数据量
*
* @return 数据量
*/
int limit() default 0;
*/
int limit() default 0;
/**
* 默认使用哪个数据源若系统找不到该指定的数据源时默认使用第一个数据源
*
* @return 数据源
*/
String dataSource() default "";
*/
String dataSource() default "";
}

View File

@ -35,14 +35,26 @@ public @interface RelationOneToOne {
String selfField() default "";
/**
* 目标实体类对应的表的 schema一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表的 schema 模式
*
* <p>
* 如果目标实体类没有使用 {@code @Table(schema = "...")} 指定 schema
* 需要在这里指定对应表的 schema 一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return schema 名称
*/
String targetSchema() default "";
/**
* 目标实体类对应的表一般情况下关联数据不是 entity而是 vodto 等需要配置此项
* <p>
* 目标实体类对应的表名
*
* <p>
* 如果目标实体类没有使用 {@code @Table(value = "...")} 指定表名时
* 需要在这里指定对应表的表名一般关联数据不是 entity 对象而是 vodto
* 等需要配置此项
*
* @return 表名
*/

View File

@ -22,6 +22,7 @@ import java.lang.annotation.Target;
/**
* 数据库表信息注解
*
* @author Michael Yang
*/
@Retention(RetentionPolicy.RUNTIME)