Interface Transaction

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DefaultTransactionManager.DefaultTransaction

public interface Transaction extends Closeable
事务
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    提交当前事务
    获取当前事务的数据库连接
    void
    回滚当前事务

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • getConnection

      Connection getConnection()
      获取当前事务的数据库连接
      Returns:
      数据库连接
    • commit

      void commit()
      提交当前事务
    • rollback

      void rollback()
      回滚当前事务