Class SequencesImpl

java.lang.Object
io.jmix.data.impl.SequencesImpl
All Implemented Interfaces:
Sequences

@Component("data_Sequences") public class SequencesImpl extends Object implements Sequences
  • Field Details

    • storeAwareLocator

      @Autowired protected StoreAwareLocator storeAwareLocator
    • dbmsSpecifics

      @Autowired protected DbmsSpecifics dbmsSpecifics
    • lock

      protected ReadWriteLock lock
    • existingSequences

      protected Set<String> existingSequences
    • SEQ_PATTERN

      protected static final Pattern SEQ_PATTERN
    • NO_RESULT

      protected static final Object NO_RESULT
  • Constructor Details

    • SequencesImpl

      public SequencesImpl()
  • Method Details

    • createNextValue

      public long createNextValue(Sequence sequence)
      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 interface Sequences
      Parameters:
      sequence - sequence object
      Returns:
      next value
    • getCurrentValue

      public long getCurrentValue(Sequence sequence)
      Description copied from interface: Sequences
      Returns the current value of the sequence. For some implementations Sequences.createNextValue(Sequence) must be called at least once beforehand.
      Specified by:
      getCurrentValue in interface Sequences
      Parameters:
      sequence - object Sequence
      Returns:
      current value
    • setCurrentValue

      public void setCurrentValue(Sequence sequence, long value)
      Description copied from interface: Sequences
      Set current value for the sequence. Next Sequences.getCurrentValue(Sequence) invocation will return value Next Sequences.createNextValue(Sequence) invocation will return value + increment
      Specified by:
      setCurrentValue in interface Sequences
      Parameters:
      sequence - sequence object Sequence
      value - value
    • deleteSequence

      public void deleteSequence(Sequence sequence)
      Description copied from interface: Sequences
      Removes sequence with specified identifier
      Specified by:
      deleteSequence in interface Sequences
      Parameters:
      sequence - sequence object Sequence
    • reset

      public void reset()
      INTERNAL. Used by tests.
    • getResult

      protected long getResult(Sequence sequence, String sqlScript)
    • checkSequenceExists

      protected void checkSequenceExists(Sequence sequence)
    • executeScript

      protected Object executeScript(Sequence sequence, String sqlScript)
    • getSequenceSupport

      protected SequenceSupport getSequenceSupport(Sequence sequence)
    • getDataStore

      protected String getDataStore(Sequence sequence)
    • checkSequenceName

      protected void checkSequenceName(String sequenceName)