Enum Class IdType

java.lang.Object
java.lang.Enum<IdType>
cn.vonce.sql.enumerate.IdType
所有已实现的接口:
Serializable, Comparable<IdType>, java.lang.constant.Constable

public enum IdType extends Enum<IdType>
NORMAL:自定义的id AUTO:使用数据库的自增id UUID:Universally Unique Identifier,即通用唯一识别码(长度32位无序) ULID:全称是Universally Unique Lexicographically Sortable Identifier,直译过来就是通用唯一按字典排序的标识符(长度26位有序) SNOWFLAKE_ID_18:长度18位的唯一有序雪花id(64bits JavaScript会丢失精度,只能当作String类型处理) SNOWFLAKE_ID_16:长度16位的唯一有序雪花id(53bits JavaScript能正常处理)
版本:
1.0
作者:
Jovi
  • 枚举常量详细资料

    • NORMAL

      public static final IdType NORMAL
    • AUTO

      public static final IdType AUTO
    • UUID

      public static final IdType UUID
    • ULID

      public static final IdType ULID
    • SNOWFLAKE_ID_16

      public static final IdType SNOWFLAKE_ID_16
    • SNOWFLAKE_ID_18

      public static final IdType SNOWFLAKE_ID_18
  • 方法详细资料

    • values

      public static IdType[] 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 IdType 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 - 如果参数为空值