Interface DatabaseConnection


public interface DatabaseConnection
A handle to a Database Connection obtained from JIRA's connection pool.
Since:
v7.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Commits all changes made since the previous commit or rollback.
    Returns the JDBC connection wrapped by this object.
    void
    Undoes all changes made in the current transaction.
    void
    setAutoCommit(boolean autoCommit)
    Convenience method to set autocommit mode on the database connection without the annoying SQLException.
  • Method Details

    • getJdbcConnection

      Connection getJdbcConnection()
      Returns the JDBC connection wrapped by this object.
      Returns:
      the JDBC connection wrapped by this object.
    • setAutoCommit

      void setAutoCommit(boolean autoCommit)
      Convenience method to set autocommit mode on the database connection without the annoying SQLException.
      Parameters:
      autoCommit - true to enable auto-commit mode, false to disable it
      Throws:
      DataAccessException - a RuntimeException wrapping any underlying SQLException.
    • commit

      void commit()
      Commits all changes made since the previous commit or rollback. This method should be used only when auto-commit mode has been disabled.
      Throws:
      DataAccessException - a RuntimeException wrapping any underlying SQLException.
      See Also:
    • rollback

      void rollback()
      Undoes all changes made in the current transaction. This method should be used only when auto-commit mode has been disabled. You normally don't need to call this explicitly - instead throwing a RuntimeException will indicate to DatabaseAccessor that you want to rollback.
      Throws:
      DataAccessException - a RuntimeException wrapping any underlying SQLException.
      See Also: