Enum Class RunMode

java.lang.Object
java.lang.Enum<RunMode>
com.tangzc.mpe.autotable.constants.RunMode
所有已实现的接口:
Serializable, Comparable<RunMode>, Constable

public enum RunMode extends Enum<RunMode>
运行模式
作者:
don
  • 嵌套类概要

    从类继承的嵌套类/接口 java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • 枚举常量概要

    枚举常量
    枚举常量
    说明
    系统启动时,会先将所有的表删除掉,然后根据model中配置的结构重新建表,该操作会破坏原有数据
    系统不做任何处理
    系统启动时,会自动判断哪些表是新建的,哪些字段要新增修改,哪些索引/约束要新增删除等,该操作不会删除字段(更改字段名称的情况下,会认为是新增字段) 如果需要从数据库强制删除实体上不存在的字段,请参考配置 AutoTableProperties 中的配置项 autoDropColumn 设置为 true
    系统启动时,会检查数据库中的表与java实体类是否匹配。
  • 方法概要

    修饰符和类型
    方法
    说明
    static RunMode
    Returns the enum constant of this class with the specified name.
    static RunMode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    从类继承的方法 java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 枚举常量详细资料

    • none

      public static final RunMode none
      系统不做任何处理
    • validate

      public static final RunMode validate
      系统启动时,会检查数据库中的表与java实体类是否匹配。如果不匹配,则启动失败
    • create

      public static final RunMode create
      系统启动时,会先将所有的表删除掉,然后根据model中配置的结构重新建表,该操作会破坏原有数据
    • update

      public static final RunMode update
      系统启动时,会自动判断哪些表是新建的,哪些字段要新增修改,哪些索引/约束要新增删除等,该操作不会删除字段(更改字段名称的情况下,会认为是新增字段) 如果需要从数据库强制删除实体上不存在的字段,请参考配置 AutoTableProperties 中的配置项 autoDropColumn 设置为 true
  • 方法详细资料

    • values

      public static RunMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RunMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值