Package io.jmix.data.impl
Class SequencesImpl
java.lang.Object
io.jmix.data.impl.SequencesImpl
- All Implemented Interfaces:
Sequences
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DbmsSpecificsprotected ReadWriteLockprotected static final Objectprotected static final Patternprotected StoreAwareLocator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckSequenceExists(Sequence sequence) protected voidcheckSequenceName(String sequenceName) longcreateNextValue(Sequence sequence) Returns the next sequence value.voiddeleteSequence(Sequence sequence) Removes sequence with specified identifierprotected ObjectexecuteScript(Sequence sequence, String sqlScript) longgetCurrentValue(Sequence sequence) Returns the current value of the sequence.protected StringgetDataStore(Sequence sequence) protected longprotected SequenceSupportgetSequenceSupport(Sequence sequence) voidreset()INTERNAL.voidsetCurrentValue(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:SequencesReturns the next sequence value. For example:sequences.createNextValue(Sequence.withName("seq_name").setStartValue(10).setIncrement(1))- Specified by:
createNextValuein interfaceSequences- Parameters:
sequence- sequence object- Returns:
- next value
-
getCurrentValue
Description copied from interface:SequencesReturns the current value of the sequence. For some implementationsSequences.createNextValue(Sequence)must be called at least once beforehand.- Specified by:
getCurrentValuein interfaceSequences- Parameters:
sequence- objectSequence- Returns:
- current value
-
setCurrentValue
Description copied from interface:SequencesSet current value for the sequence. NextSequences.getCurrentValue(Sequence)invocation will returnvalueNextSequences.createNextValue(Sequence)invocation will returnvalue + increment- Specified by:
setCurrentValuein interfaceSequences- Parameters:
sequence- sequence objectSequencevalue- value
-
deleteSequence
Description copied from interface:SequencesRemoves sequence with specified identifier- Specified by:
deleteSequencein interfaceSequences- Parameters:
sequence- sequence objectSequence
-
reset
public void reset()INTERNAL. Used by tests. -
getResult
-
checkSequenceExists
-
executeScript
-
getSequenceSupport
-
getDataStore
-
checkSequenceName
-