public class SequenceOptions extends Object
| 构造器和说明 |
|---|
SequenceOptions()
Creates new instance of sequence options.
|
SequenceOptions(Sequence oldSequence,
TypeInfo dataType)
Creates new instance of sequence options.
|
| 限定符和类型 | 方法和说明 |
|---|---|
long[] |
getBounds() |
static long[] |
getBounds(TypeInfo dataType)
Get the bounds (min, max) of a data type.
|
Long |
getCacheSize(SessionLocal session)
Gets cache size.
|
Sequence.Cycle |
getCycle()
Gets cycle option.
|
TypeInfo |
getDataType() |
Long |
getIncrement(SessionLocal session)
Gets increment value.
|
Long |
getMaxValue(Sequence sequence,
SessionLocal session)
Gets max value.
|
Long |
getMinValue(Sequence sequence,
SessionLocal session)
Gets min value.
|
Long |
getRestartValue(SessionLocal session,
long startValue)
Gets restart value.
|
Long |
getStartValue(SessionLocal session)
Gets start value.
|
void |
setCacheSize(Expression cacheSize)
Sets cache size.
|
void |
setCycle(Sequence.Cycle cycle)
Sets cycle option.
|
void |
setDataType(TypeInfo dataType) |
void |
setIncrement(Expression increment)
Sets increment value expression.
|
void |
setMaxValue(Expression maxValue)
Sets max value expression.
|
void |
setMinValue(Expression minValue)
Sets min value expression.
|
void |
setRestartValue(Expression restart)
Sets restart value expression, or
ValueExpression.DEFAULT. |
void |
setStartValue(Expression start)
Sets start value expression.
|
public TypeInfo getDataType()
public void setDataType(TypeInfo dataType)
public Long getStartValue(SessionLocal session)
session - The session to calculate the value.null if value is not defined.public void setStartValue(Expression start)
start - START WITH value expression.public Long getRestartValue(SessionLocal session, long startValue)
session - the session to calculate the valuestartValue - the start value to use if restart without value is specifiednull if value is not defined.public void setRestartValue(Expression restart)
ValueExpression.DEFAULT.restart - RESTART WITH value expression, or
ValueExpression.DEFAULT for simple RESTARTpublic Long getIncrement(SessionLocal session)
session - The session to calculate the value.null if value is not defined.public void setIncrement(Expression increment)
increment - INCREMENT BY value expression.public Long getMaxValue(Sequence sequence, SessionLocal session)
sequence - the sequence to get default max value.session - The session to calculate the value.public void setMaxValue(Expression maxValue)
maxValue - MAXVALUE expression.public Long getMinValue(Sequence sequence, SessionLocal session)
sequence - the sequence to get default min value.session - The session to calculate the value.public void setMinValue(Expression minValue)
minValue - MINVALUE expression.public long[] getBounds()
public static long[] getBounds(TypeInfo dataType)
dataType - the data typepublic Sequence.Cycle getCycle()
null if is not defined.public void setCycle(Sequence.Cycle cycle)
cycle - option value.public Long getCacheSize(SessionLocal session)
session - The session to calculate the value.null if value is not defined.public void setCacheSize(Expression cacheSize)
cacheSize - cache size.Copyright © 2022. All rights reserved.