#1971 注释补全

parent 4aa6b652
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 数组属性 @Array
* 字段类型必须是BizArray<X>, X可以是String/Double/Boolean/Long/Integer/BigDecimal/OffsetDateTime。
* 数组属性会创建一张子表(Model),子表名为:BO表名_属性名
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Array{
String label() default "";
int length() default 0; //列长度
......
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 辅助属性 @AuxField
* 辅助属性可以是任意类型
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface AuxField {
String label() default "";
}
......@@ -12,6 +12,11 @@ import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
public @interface BizModel {
/**
* 用于 label 国际化
*/
String verboseNameCode();
String label() default "";
/**
......
......@@ -4,6 +4,8 @@ import java.lang.annotation.*;
/**
* 在BO类上的Query注解
* BizQuery表示满足特定条件的BO数据。
* 可作为BO查询时的查询条件、BO OperationHandler的执行约束、BO OperationEventHandler的执行约束、创建BO实例时的默认值。
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
......
......@@ -5,6 +5,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 列属性
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Column {
......
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 组件属性 @Composite
* 组件字段类型必须继承BizComposite。
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Composite {
String label() default "";
......
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 明细属性 @Item
* 字段类型必须为BizItem<X>, X为BO类型,未指定时在注解中指定
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Item {
String label() default "";
......
......@@ -7,8 +7,11 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* List级Operation声明注解
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ListOperationProvider {
public @interface ListOperationProvider {
Class<? extends BizObject> type();
}
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 多对多关联属性 @Many @SlaveMany
* 字段类型必须是BizMany<X>, X为BO类型,未指定时可在注解中指定。主多对多定义会创建一张子表(Model),子表名为:BO表名_TXT;包含的字段:
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Many {
String label() default "";
......
......@@ -7,6 +7,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Object级Operation声明注解
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ObjectOperationProvider {
......
......@@ -5,6 +5,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 可用于生成Operation文档
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Operation {
......
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Operation参数说明
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OperationArg {
String name() default "";
String label() default "";
......
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Operation可配置参数声明
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface OperationParameter {
String label() default "";
......
package logwire.core.bo.annotation;
import java.lang.annotation.*;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface OperationProvider {
}
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 多对多关联属性 @Many @SlaveMany
* 字段类型必须是BizMany<X>, X为BO类型,未指定时可在注解中指定。主多对多定义会创建一张子表(Model),子表名为:BO表名_TXT;包含的字段:
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface SlaveMany {
String label() default "";
......
package logwire.core.bo.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 大文本属性 @Text
* 字段类型必须为BizText。大文本属性会创建一张子表(Model),子表名为:BO表名_属性名,一个BO有多个大字段时,使用同一张表
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Text {
String label() default "";
}
......@@ -7,6 +7,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Type级Operation声明注解
*/
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface TypeOperationProvider {
......
......@@ -3,7 +3,7 @@ package logwire.core.bo.object;
import logwire.core.bo.annotation.BizModel;
import logwire.core.bo.annotation.Column;
@BizModel(label = "用户")
@BizModel(label = "用户",verboseNameCode = "user")
public abstract class User extends ModelObject {
@Column()
String userGid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment