Package org.fugerit.java.core.db.connect
Class ConnectionFacade
- java.lang.Object
-
- org.fugerit.java.core.db.connect.ConnectionFacade
-
public class ConnectionFacade extends Object
Helper class for handling ConnectionFactory- Author:
- Fugerit
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
closeLoose(Connection conn)
Helper for closing resources suppressing Exceptionstatic boolean
closeLoose(Connection conn, Statement stm)
Helper for closing resources suppressing Exceptionstatic boolean
closeLoose(Connection conn, Statement stm, ResultSet rs)
Helper for closing resources suppressing Exceptionstatic boolean
closeLoose(ResultSet rs)
Helper for closing resources suppressing Exceptionstatic boolean
closeLoose(Statement stm)
Helper for closing resources suppressing Exceptionstatic ConnectionFactory
getFactory(String name)
Static connection factory accessstatic void
registerFactory(String name, ConnectionFactory cf)
Static connection factory registration.
-
-
-
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 factorycf
- the factory
-
getFactory
public static ConnectionFactory getFactory(String name)
Static connection factory accessNOTE: 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 closestm
- statement to closers
- 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 closestm
- 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
-
-