java.lang.Object
org.miaixz.bus.mapper.builder.SchemaSqlScriptBuilder
- All Implemented Interfaces:
Comparable<org.miaixz.bus.core.Order>,org.miaixz.bus.core.Order,ORDER,SqlScriptWrapper
通过
SqlWrapper 注解支持对 SQL 的扩展- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.miaixz.bus.mapper.parsing.SqlScriptWrapper
SqlScriptWrapper.Holder -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TnewInstance(Class<T> instanceClass, Object target, ElementType type, Annotation[] annotations) 实例化SchemaSqlBuilder对象protected List<SchemaSqlBuilder> parseAnnotations(Object target, ElementType type, Annotation[] annotations) 解析对象上的SchemaSqlBuilder实例wrap(org.apache.ibatis.builder.annotation.ProviderContext context, TableMeta tableMeta, SqlScript sqlScript) 对 SQL 脚本进行包装,应用接口、方法和参数上的注解Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.miaixz.bus.core.Order
compareTo, order
-
Constructor Details
-
SchemaSqlScriptBuilder
public SchemaSqlScriptBuilder()
-
-
Method Details
-
wrap
public SqlScript wrap(org.apache.ibatis.builder.annotation.ProviderContext context, TableMeta tableMeta, SqlScript sqlScript) 对 SQL 脚本进行包装,应用接口、方法和参数上的注解- Specified by:
wrapin interfaceSqlScriptWrapper- Parameters:
context- 提供者上下文tableMeta- 实体表信息sqlScript- SQL 脚本- Returns:
- 包装后的 SQL 脚本
-
newInstance
public <T> T newInstance(Class<T> instanceClass, Object target, ElementType type, Annotation[] annotations) 实例化SchemaSqlBuilder对象- Type Parameters:
T- 泛型- Parameters:
instanceClass- 实例类target- 目标对象type- 元素类型annotations- 注解数组- Returns:
- 实例化的对象
-
parseAnnotations
protected List<SchemaSqlBuilder> parseAnnotations(Object target, ElementType type, Annotation[] annotations) 解析对象上的SchemaSqlBuilder实例- Parameters:
target- 目标对象(类、方法或参数)type- 元素类型(TYPE, METHOD, PARAMETER)annotations- 注解数组- Returns:
SchemaSqlBuilder实例列表
-