Package io.jmix.data.impl
Class SequencesImpl
java.lang.Object
io.jmix.data.impl.SequencesImpl
- All Implemented Interfaces:
Sequences
-
Field Summary
Modifier and TypeFieldDescriptionprotected DbmsSpecifics
protected ReadWriteLock
protected static final Object
protected static final Pattern
protected StoreAwareLocator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkSequenceExists
(Sequence sequence) protected void
checkSequenceName
(String sequenceName) long
createNextValue
(Sequence sequence) Returns the next sequence value.void
deleteSequence
(Sequence sequence) Removes sequence with specified identifierprotected Object
executeScript
(Sequence sequence, String sqlScript) long
getCurrentValue
(Sequence sequence) Returns the current value of the sequence.protected String
getDataStore
(Sequence sequence) protected long
protected SequenceSupport
getSequenceSupport
(Sequence sequence) void
reset()
INTERNAL.void
setCurrentValue
(Sequence sequence, long value) Set current value for the sequence.
-
Field Details
-
storeAwareLocator
-
dbmsSpecifics
-
lock
-
existingSequences
-
SEQ_PATTERN
-
NO_RESULT
-
-
Constructor Details
-
SequencesImpl
public SequencesImpl()
-
-
Method Details
-
createNextValue
Description copied from interface:Sequences
Returns the next sequence value. For example:sequences.createNextValue(Sequence.withName("seq_name").setStartValue(10).setIncrement(1))
- Specified by:
createNextValue
in interfaceSequences
- Parameters:
sequence
- sequence object- Returns:
- next value
-
getCurrentValue
Description copied from interface:Sequences
Returns the current value of the sequence. For some implementationsSequences.createNextValue(Sequence)
must be called at least once beforehand.- Specified by:
getCurrentValue
in interfaceSequences
- Parameters:
sequence
- objectSequence
- Returns:
- current value
-
setCurrentValue
Description copied from interface:Sequences
Set current value for the sequence. NextSequences.getCurrentValue(Sequence)
invocation will returnvalue
NextSequences.createNextValue(Sequence)
invocation will returnvalue + increment
- Specified by:
setCurrentValue
in interfaceSequences
- Parameters:
sequence
- sequence objectSequence
value
- value
-
deleteSequence
Description copied from interface:Sequences
Removes sequence with specified identifier- Specified by:
deleteSequence
in interfaceSequences
- Parameters:
sequence
- sequence objectSequence
-
reset
public void reset()INTERNAL. Used by tests. -
getResult
-
checkSequenceExists
-
executeScript
-
getSequenceSupport
-
getDataStore
-
checkSequenceName
-