Constructor and Description |
---|
MultipleSequence() |
MultipleSequence(MultipleSequenceDao sequenceDao,
String sequenceName,
long minValue,
long maxValue,
int innerStep)
在db里如果存在记录的情况下,调用的构造函数,此时不需要再初始化
|
Modifier and Type | Method and Description |
---|---|
int |
getInnerStep() |
long |
getMaxValue() |
long |
getMinValue() |
MultipleSequenceDao |
getSequenceDao() |
String |
getSequenceName() |
void |
init()
初始化各个数据源的sequence,如果不存在记录就插入一条到db
|
long |
nextValue()
获取sequence值
|
void |
setInnerStep(int innerStep) |
void |
setMaxValue(long maxValue) |
void |
setMinValue(long minValue) |
void |
setSequenceDao(MultipleSequenceDao sequenceDao) |
void |
setSequenceName(String name) |
public MultipleSequence()
public MultipleSequence(MultipleSequenceDao sequenceDao, String sequenceName, long minValue, long maxValue, int innerStep)
sequenceDao
- sequenceName
- 序列名称innerStep
- 内步长minValue
- 最小值maxValue
- 最大值public void init() throws SequenceException
SequenceException
public long nextValue() throws SequenceException
nextValue
in interface Sequence
SequenceException
public MultipleSequenceDao getSequenceDao()
public void setSequenceDao(MultipleSequenceDao sequenceDao)
public String getSequenceName()
public void setSequenceName(String name)
public int getInnerStep()
public void setInnerStep(int innerStep)
public long getMinValue()
public void setMinValue(long minValue)
public long getMaxValue()
public void setMaxValue(long maxValue)
Copyright © 2006–2018 TinyGroup. All rights reserved.