类 AutoId


public class AutoId extends BasicObject
自增id
date: 2019年4月22日
版本:
0.1
作者:
jingma
  • 构造器详细资料

    • AutoId

      public AutoId()
      Creates a new instance of AutoId.
    • AutoId

      public AutoId(int id, int max)
      此为内存编号,重启后会重新编号 Creates a new instance of AutoId.
      参数:
      id - 初始值
      max - 最大值
    • AutoId

      public AutoId(String bhlb)
      编号类别场景从数据库中获取,为持久化编号方式 Creates a new instance of AutoId.
      参数:
      bhlb - 编号类别
  • 方法详细资料

    • getId

      public int getId()
      返回:
      id
    • setId

      public void setId(int id)
      参数:
      id - the id to set
    • getMax

      public int getMax()
      返回:
      max
    • setMax

      public void setMax(int max)
      参数:
      max - the max to set
    • getBhlb

      public String getBhlb()
      返回:
      bhlb
    • setBhlb

      public void setBhlb(String bhlb)
      参数:
      bhlb - the bhlb to set
    • next

      public long next()
      下一个值
    • next

      public String next(int length)
      下一个值
      参数:
      length - 补全位数
      返回:
      用0补全的字符串