Class ConnectionFacade


  • public class ConnectionFacade
    extends Object
    Helper class for handling ConnectionFactory
    Author:
    Fugerit
    • Method Detail

      • registerFactory

        public static void registerFactory​(String name,
                                           ConnectionFactory cf)
        Static connection factory registration.

        NOTE: use only if you are aware of class loader status

        Parameters:
        name - the name of the factory
        cf - the factory
      • getFactory

        public static ConnectionFactory getFactory​(String name)
        Static connection factory access

        NOTE: use only if you are aware of class loader status

        Parameters:
        name - the name of the factory
        Returns:
        the factory
      • closeLoose

        public static boolean closeLoose​(Connection conn,
                                         Statement stm,
                                         ResultSet rs)
        Helper for closing resources suppressing Exception
        Parameters:
        conn - connection to close
        stm - statement to close
        rs - result set to close
        Returns:
        true if everything was closed with no errors
      • closeLoose

        public static boolean closeLoose​(Connection conn,
                                         Statement stm)
        Helper for closing resources suppressing Exception
        Parameters:
        conn - connection to close
        stm - statement to close
        Returns:
        true if everything was closed with no errors
      • closeLoose

        public static boolean closeLoose​(ResultSet rs)
        Helper for closing resources suppressing Exception
        Parameters:
        rs - result set to close
        Returns:
        true if everything was closed with no errors
      • closeLoose

        public static boolean closeLoose​(Statement stm)
        Helper for closing resources suppressing Exception
        Parameters:
        stm - statement to close
        Returns:
        true if everything was closed with no errors
      • closeLoose

        public static boolean closeLoose​(Connection conn)
        Helper for closing resources suppressing Exception
        Parameters:
        conn - connection to close
        Returns:
        true if everything was closed with no errors