public class SequenceOptions
extends java.lang.Object
| Constructor and Description |
|---|
SequenceOptions()
Creates new instance of sequence options.
|
SequenceOptions(Sequence oldSequence,
TypeInfo dataType)
Creates new instance of sequence options.
|
| Modifier and Type | Method and Description |
|---|---|
long[] |
getBounds() |
static long[] |
getBounds(TypeInfo dataType)
Get the bounds (min, max) of a data type.
|
java.lang.Long |
getCacheSize(SessionLocal session)
Gets cache size.
|
Sequence.Cycle |
getCycle()
Gets cycle option.
|
TypeInfo |
getDataType() |
java.lang.Long |
getIncrement(SessionLocal session)
Gets increment value.
|
java.lang.Long |
getMaxValue(Sequence sequence,
SessionLocal session)
Gets max value.
|
java.lang.Long |
getMinValue(Sequence sequence,
SessionLocal session)
Gets min value.
|
java.lang.Long |
getRestartValue(SessionLocal session,
long startValue)
Gets restart value.
|
java.lang.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 SequenceOptions()
public TypeInfo getDataType()
public void setDataType(TypeInfo dataType)
public java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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.