Interface Transactional

  • All Known Implementing Classes:
    DatabaseService

    public interface Transactional
    The transactional access definition.
    • Method Detail

      • withTransaction

        <T> T withTransaction​(Function<QueryDefFactory,​T> block)
        Creates a transaction for the lifetime of a code block.
        Parameters:
        block - the code block
        Returns:
        the return value of the code block
      • withTransaction

        void withTransaction​(Consumer<QueryDefFactory> block)
        Creates a transaction for the lifetime of a code block.
        Parameters:
        block - the code block
      • getCloseableTransaction

        CloseableTransaction getCloseableTransaction()
        Creates a closeable transaction for undefined lifetime.
        Returns:
        the closeable transaction