Module bus.mapper

Class SchemaSqlBuilder

java.lang.Object
org.miaixz.bus.mapper.builder.SchemaSqlBuilder
All Implemented Interfaces:
Comparable<org.miaixz.bus.core.Order>, org.miaixz.bus.core.Order, ORDER, SqlScriptWrapper

public abstract class SchemaSqlBuilder extends Object implements SqlScriptWrapper
注解方式的 SqlScriptWrapper,提供基于注解的 SQL 脚本包装功能
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • type

      protected final ElementType type
      注解应用的目标元素类型(类、方法、参数等)
    • target

      protected final Object target
      注解的目标对象(类、方法或参数)
    • annotations

      protected final Annotation[] annotations
      注解数组
  • Constructor Details

    • SchemaSqlBuilder

      public SchemaSqlBuilder(Object target, ElementType type, Annotation[] annotations)
      构造函数,初始化注解包装器
      Parameters:
      target - 目标对象
      type - 元素类型
      annotations - 注解数组
  • Method Details

    • getType

      public ElementType getType()
      获取注解的目标元素类型
      Returns:
      元素类型
    • getTarget

      public Object getTarget()
      获取注解的目标对象
      Returns:
      目标对象
    • getAnnotations

      public Annotation[] getAnnotations()
      获取注解数组
      Returns:
      注解数组
    • getParameterName

      public String getParameterName(Parameter parameter)
      获取参数名称
      Parameters:
      parameter - 参数对象
      Returns:
      参数名称
    • equals

      public boolean equals(Object o)
      判断两个对象是否相等
      Overrides:
      equals in class Object
      Parameters:
      o - 比较对象
      Returns:
      true 表示相等,false 表示不相等
    • hashCode

      public int hashCode()
      计算对象的哈希值
      Overrides:
      hashCode in class Object
      Returns:
      哈希值