モジュール org.nkjmlab.sorm4j
パッケージ org.nkjmlab.sorm4j

インタフェース OrmConnection

すべてのスーパーインタフェース:
AutoCloseable, Orm
既知のサブインタフェースのリスト:
H2OrmConnection, OrmTransaction
既知の実装クラスのリスト:
H2OrmConnectionImpl, org.nkjmlab.sorm4j.internal.OrmConnectionImpl

public interface OrmConnection extends Orm, AutoCloseable
作成者:
yuu_nkjm
  • メソッドの詳細

    • of

      static OrmConnection of(Connection connection)
      Create a OrmConnection wrapping the given JDBC Connection.

      You should always use try-with-resources block to ensure the database connection is released.

      パラメータ:
      connection -
      戻り値:
    • of

      static OrmConnection of(Connection connection, SormContext sormContext)
      Create a OrmConnection wrapping the given JDBC Connection and the given context.

      You should always use try-with-resources block to ensure the database connection is released.

      パラメータ:
      connection -
      sormContext -
      戻り値:
    • getJdbcConnection

      Connection getJdbcConnection()
      Gets JDBC Connection.
      戻り値:
    • close

      void close()
      Closes the Connection associated with this instance.
      定義:
      close インタフェース内 AutoCloseable
      関連項目:
    • commit

      void commit()
      Commits the Connection associated with this instance.
      関連項目:
    • rollback

      void rollback()
      Roll back the Connection associated with this instance.
      関連項目:
    • setAutoCommit

      void setAutoCommit(boolean autoCommit)
      Sets the auto commit behavior for the Connection associated with this instance.
      関連項目:
    • mapToTable

      <T> TableConnection<T> mapToTable(Class<T> type)
      Gets a TableConnection instance indicated the given parameter. The table name is guessed from the given type.
      型パラメータ:
      T -
      パラメータ:
      type -
      戻り値:
    • mapToTable

      <T> TableConnection<T> mapToTable(Class<T> type, String tableName)
      Gets a TableConnection instance indicated the given parameters.
      型パラメータ:
      T -
      パラメータ:
      type -
      tableName -
      戻り値: