Class StatementUtil


  • public class StatementUtil
    extends java.lang.Object
    Utility for Statement.
    Since:
    3.4.0
    Author:
    Kazuki Shimizu
    • Method Summary

      Modifier and Type Method Description
      static void applyTransactionTimeout​(java.sql.Statement statement, java.lang.Integer queryTimeout, java.lang.Integer transactionTimeout)
      Apply a transaction timeout.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • applyTransactionTimeout

        public static void applyTransactionTimeout​(java.sql.Statement statement,
                                                   java.lang.Integer queryTimeout,
                                                   java.lang.Integer transactionTimeout)
                                            throws java.sql.SQLException
        Apply a transaction timeout.

        Update a query timeout to apply a transaction timeout.

        Parameters:
        statement - a target statement
        queryTimeout - a query timeout
        transactionTimeout - a transaction timeout
        Throws:
        java.sql.SQLException - if a database access error occurs, this method is called on a closed Statement