Record Class HuicheProperties

java.lang.Object
java.lang.Record
org.huiche.spring.boot.autoconfigure.HuicheProperties
Record Components:
enumBy - 枚举取值方式
nullToEmpty - 集合类型为null时是否返回空集合
useNational - 是否使用国家字符集,影响jdbc读写使用getNString还是getString等,一般建议不指定,默认会读取数据库设置
batchSize - 批量插入时每次执行条数
enableSerializationMapper - 是否启用序列化转换器
blockUnconditionalDelete - 阻止无条件删除,特殊情况可通过传入Condition.TRUE跳过
blockUnconditionalUpdate - 阻止无条件更新,特殊情况可通过传入Condition.TRUE跳过
resultInitialCapacity - 集合查询结果(List|Set等)初始容量,建议对齐业务最小每页数量,可避免扩容,默认20
resultInitialCapacityMax - 集合查询结果(List|Set等)初始容量最大值,建议对齐业务最大每页数量,可避免扩容,默认2000
slowSqlThreshold - 慢sql阈值,执行耗时>=此阈值,则输出log
enableSqlLog - 是否开启sql日志
plainSqlLog - 是否输出明文Sql日志(需先开启日志)

@ConfigurationProperties(prefix="huiche") public record HuicheProperties(EnumBy enumBy, Boolean nullToEmpty, Boolean useNational, Integer batchSize, boolean enableSerializationMapper, boolean blockUnconditionalDelete, boolean blockUnconditionalUpdate, int resultInitialCapacity, int resultInitialCapacityMax, Long slowSqlThreshold, boolean enableSqlLog, boolean plainSqlLog) extends Record
huiche配置属性
Author:
Maning
  • Constructor Details

    • HuicheProperties

      public HuicheProperties(EnumBy enumBy, Boolean nullToEmpty, Boolean useNational, Integer batchSize, boolean enableSerializationMapper, boolean blockUnconditionalDelete, boolean blockUnconditionalUpdate, int resultInitialCapacity, int resultInitialCapacityMax, Long slowSqlThreshold, boolean enableSqlLog, boolean plainSqlLog)
      Creates an instance of a HuicheProperties record class.
      Parameters:
      enumBy - the value for the enumBy record component
      nullToEmpty - the value for the nullToEmpty record component
      useNational - the value for the useNational record component
      batchSize - the value for the batchSize record component
      enableSerializationMapper - the value for the enableSerializationMapper record component
      blockUnconditionalDelete - the value for the blockUnconditionalDelete record component
      blockUnconditionalUpdate - the value for the blockUnconditionalUpdate record component
      resultInitialCapacity - the value for the resultInitialCapacity record component
      resultInitialCapacityMax - the value for the resultInitialCapacityMax record component
      slowSqlThreshold - the value for the slowSqlThreshold record component
      enableSqlLog - the value for the enableSqlLog record component
      plainSqlLog - the value for the plainSqlLog record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enumBy

      public EnumBy enumBy()
      Returns the value of the enumBy record component.
      Returns:
      the value of the enumBy record component
    • nullToEmpty

      public Boolean nullToEmpty()
      Returns the value of the nullToEmpty record component.
      Returns:
      the value of the nullToEmpty record component
    • useNational

      public Boolean useNational()
      Returns the value of the useNational record component.
      Returns:
      the value of the useNational record component
    • batchSize

      public Integer batchSize()
      Returns the value of the batchSize record component.
      Returns:
      the value of the batchSize record component
    • enableSerializationMapper

      public boolean enableSerializationMapper()
      Returns the value of the enableSerializationMapper record component.
      Returns:
      the value of the enableSerializationMapper record component
    • blockUnconditionalDelete

      public boolean blockUnconditionalDelete()
      Returns the value of the blockUnconditionalDelete record component.
      Returns:
      the value of the blockUnconditionalDelete record component
    • blockUnconditionalUpdate

      public boolean blockUnconditionalUpdate()
      Returns the value of the blockUnconditionalUpdate record component.
      Returns:
      the value of the blockUnconditionalUpdate record component
    • resultInitialCapacity

      public int resultInitialCapacity()
      Returns the value of the resultInitialCapacity record component.
      Returns:
      the value of the resultInitialCapacity record component
    • resultInitialCapacityMax

      public int resultInitialCapacityMax()
      Returns the value of the resultInitialCapacityMax record component.
      Returns:
      the value of the resultInitialCapacityMax record component
    • slowSqlThreshold

      public Long slowSqlThreshold()
      Returns the value of the slowSqlThreshold record component.
      Returns:
      the value of the slowSqlThreshold record component
    • enableSqlLog

      public boolean enableSqlLog()
      Returns the value of the enableSqlLog record component.
      Returns:
      the value of the enableSqlLog record component
    • plainSqlLog

      public boolean plainSqlLog()
      Returns the value of the plainSqlLog record component.
      Returns:
      the value of the plainSqlLog record component