code: public PreparedStatement getPreparedStatementForSql(Connection con, String query) throws SQLException {
  
          // unfortunately, this wrapper is essential, because some JDBC driver
          // implementations don't accept the delegated objects of DBCP's connection pool.
          return con.prepareStatement(query);
      }
docs: Returns a PreparedStatement for a JDBC connection specified by the SQL query.<p>
  
  @param con the JDBC connection
  @param query the SQL query
  @return PreparedStatement a new PreparedStatement containing the pre-compiled SQL statement
  @throws SQLException if a database access error occurs