Class ConnectionProxyFactory
- java.lang.Object
-
- org.castor.cpa.persistence.sql.connection.ConnectionProxyFactory
-
public final class ConnectionProxyFactory extends java.lang.Object
Factory class for proxies for JDBC Connection, PreparedStatement and CallableStatement classes. The proxies allow to gather information for the purpose of SQL statement logging.- Since:
- 1.0.4
- Version:
- $Revision: 5951 $ $Date$
- Author:
- Ralf Joachim
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.sql.CallableStatement
newCallableStatementProxy(java.sql.CallableStatement statement, java.lang.String sql)
Factory method for creating a CallableStamentProxy.static java.sql.Connection
newConnectionProxy(java.sql.Connection connection, java.lang.String calledBy)
Factory method for creating a ConnectionProxy.protected static java.sql.PreparedStatement
newPreparedStatementProxy(java.sql.PreparedStatement statement, java.lang.String sql)
Factory method for creating a PreparedStamentProxy.
-
-
-
Method Detail
-
newConnectionProxy
public static java.sql.Connection newConnectionProxy(java.sql.Connection connection, java.lang.String calledBy)
Factory method for creating a ConnectionProxy.- Parameters:
connection
- The JDBC connection to proxy.calledBy
- Name of the class using creating and this proxy class.- Returns:
- The JDBC connection proxy.
-
newPreparedStatementProxy
protected static java.sql.PreparedStatement newPreparedStatementProxy(java.sql.PreparedStatement statement, java.lang.String sql)
Factory method for creating a PreparedStamentProxy.- Parameters:
statement
- Prepared statement to be proxied.sql
- SQL string.- Returns:
- Prepared statement proxy.
-
newCallableStatementProxy
protected static java.sql.CallableStatement newCallableStatementProxy(java.sql.CallableStatement statement, java.lang.String sql)
Factory method for creating a CallableStamentProxy.- Parameters:
statement
- Callable statement to be proxied.sql
- SQL string.- Returns:
- Callable statement proxy.
-
-