Class Closer


  • public class Closer
    extends java.lang.Object
    closes JDBC objects
    • Constructor Summary

      Constructors 
      Constructor Description
      Closer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void closeAllSQLObjects​(java.lang.Object... closables)
      closes objects of following types: Statement ResultSet Connection ignores thrown exceptions.
      • Methods inherited from class java.lang.Object

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

      • Closer

        public Closer()
    • Method Detail

      • closeAllSQLObjects

        public static void closeAllSQLObjects​(java.lang.Object... closables)
        closes objects of following types: Statement ResultSet Connection ignores thrown exceptions. If a close operation is aborted by exception whilst iterating given objects, the queue just keeps being processed with next object.
        Parameters:
        closables - to close, if array is provided its items are allowed to be null
        Throws:
        java.lang.IllegalArgumentException - if object of unsupported class provided