Package io.jmix.data.impl
Class SequencesImpl
java.lang.Object
io.jmix.data.impl.SequencesImpl
- All Implemented Interfaces:
- Sequences
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected DbmsSpecificsprotected ReadWriteLockprotected static final Objectprotected static final Patternprotected StoreAwareLocator
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
SequencesImplpublic SequencesImpl()
 
- 
- 
Method Details- 
createNextValueDescription copied from interface:SequencesReturns the next sequence value. For example:sequences.createNextValue(Sequence.withName("seq_name").setStartValue(10).setIncrement(1))- Specified by:
- createNextValuein interface- Sequences
- Parameters:
- sequence- sequence object
- Returns:
- next value
 
- 
getCurrentValueDescription 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 interface- Sequences
- Parameters:
- sequence- object- Sequence
- Returns:
- current value
 
- 
setCurrentValueDescription copied from interface:SequencesSet current value for the sequence. NextSequences.getCurrentValue(Sequence)invocation will returnvalueNextSequences.createNextValue(Sequence)invocation will returnvalue + increment- Specified by:
- setCurrentValuein interface- Sequences
- Parameters:
- sequence- sequence object- Sequence
- value- value
 
- 
deleteSequenceDescription copied from interface:SequencesRemoves sequence with specified identifier- Specified by:
- deleteSequencein interface- Sequences
- Parameters:
- sequence- sequence object- Sequence
 
- 
resetpublic void reset()INTERNAL. Used by tests.
- 
getResult
- 
checkSequenceExists
- 
executeScript
- 
getSequenceSupport
- 
getDataStore
- 
checkSequenceName
 
-