- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
@Override public Object invoke(Object target, Method method, Object[] args) throws Throwable { Object result = InvocationUtils.invokeQuietly(connection, method, args); if ("prepareStatement".equals(method.getName())) { PreparedStatement statement = (PreparedStatement) result; String sql = (String) args[0]; return buildStatementProxy(PreparedStatement.class, new ProfilingPreparedStatementHandler(statement, sql)); } if ("createStatement".equals(method.getName())) { Statement statement = (Statement) result; return buildStatementProxy(Statement.class, new ProfilingStatementHandler(statement)); } return result; }
@Override public Object invoke(Object target, Method method, Object[] args) throws Throwable { Object result = InvocationUtils.invokeQuietly(connection, method, args); if ("prepareStatement".equals(method.getName())) { PreparedStatement statement = (PreparedStatement) result; String sql = (String) args[0]; return buildStatementProxy(PreparedStatement.class, new ProfilingPreparedStatementHandler(statement, sql)); } if ("createStatement".equals(method.getName())) { Statement statement = (Statement) result; return buildStatementProxy(Statement.class, new ProfilingStatementHandler(statement)); } return result; }
@Override public Object invoke(Object target, Method method, Object[] args) throws Throwable { Object result = InvocationUtils.invokeQuietly(connection, method, args); if ("prepareStatement".equals(method.getName())) { PreparedStatement statement = (PreparedStatement) result; String sql = (String) args[0]; return buildStatementProxy(PreparedStatement.class, new ProfilingPreparedStatementHandler(statement, sql)); } if ("createStatement".equals(method.getName())) { Statement statement = (Statement) result; return buildStatementProxy(Statement.class, new ProfilingStatementHandler(statement)); } return result; }