/** * {@inheritDoc} */ @Override public void set(final PreparedStatement st, final int index, final URL value, final int dbSqlType) throws SQLException { st.setURL(index, value); }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { statement.setURL(parameterIndex, x); }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { rawStatement.setURL(parameterIndex, x); }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { rawStatement.setURL(parameterIndex, x); }
/** {@inheritDoc} */ @Override public void setURL(int parameterIndex, URL x) throws SQLException { delegate.setURL(parameterIndex, x); }
public void setURL(int parameterIndex, URL x) throws SQLException { pstmt.setURL(parameterIndex, x); }
@Override public final void setURL(final int parameterIndex, final URL x) throws SQLException { getTargetPreparedStatement().setURL(parameterIndex, x); }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { setParamByIndex(parameterIndex, x); targetStatement.setURL(parameterIndex, x); }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { SQLException e = null; try { delegate.setURL(parameterIndex, x); } catch (SQLException sqle) { e = sqle; throw e; } finally { eventListener.onAfterPreparedStatementSet(statementInformation, parameterIndex, x, e); } }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { checkOpen(); try { stmt.setURL(parameterIndex, x); } catch (Throwable t) { throw checkException(t); } }
@Override public Object call() throws Exception { stmt.setURL(1, new URL("http://test")); return null; } },
@Override public void preparedStatement_setURL(PreparedStatementProxy statement, int parameterIndex, java.net.URL x) throws SQLException { if (this.pos < filterSize) { nextFilter().preparedStatement_setURL(this, statement, parameterIndex, x); return; } statement.getRawObject().setURL(parameterIndex, x); }
public Q setURL(final int index, final URL value) { initPrepared(); try { preparedStatement.setURL(index, value); } catch (SQLException sex) { throwSetParamError(index, sex); } return _this(); }
public Q setURL(final String param, final URL value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setURL(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
/** * @throws Exception If failed. */ @Test public void testUrl() throws Exception { stmt = conn.prepareStatement("select * from TestObject where urlVal is not distinct from ?"); stmt.setURL(1, new URL("http://abc.com/")); ResultSet rs = stmt.executeQuery(); int cnt = 0; while (rs.next()) { if (cnt == 0) assert rs.getInt("id") == 1; cnt++; } assert cnt == 1; stmt.setNull(1, DATALINK); rs = stmt.executeQuery(); cnt = 0; while (rs.next()) { if (cnt == 0) assert rs.getInt("id") == 2; cnt++; } assert cnt == 1; }
/** * @throws Exception If failed. */ @Test public void testUrl() throws Exception { stmt = conn.prepareStatement("select * from TestObject where urlVal is not distinct from ?"); stmt.setURL(1, new URL("http://abc.com/")); ResultSet rs = stmt.executeQuery(); int cnt = 0; while (rs.next()) { if (cnt == 0) assert rs.getInt("id") == 1; cnt++; } assert cnt == 1; stmt.setNull(1, DATALINK); rs = stmt.executeQuery(); cnt = 0; while (rs.next()) { if (cnt == 0) assert rs.getInt("id") == 2; cnt++; } assert cnt == 1; }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { SQLException e = null; try { delegate.setURL(parameterIndex, x); } catch (SQLException sqle) { e = sqle; throw e; } finally { eventListener.onAfterPreparedStatementSet(statementInformation, parameterIndex, x, e); } }
@Override public void setURL(int parameterIndex, URL x) throws SQLException { params.add(new URLParamContext(parameterIndex, new Object[] { x })); getPreparedStatement().setURL(parameterIndex, x); }
@Override public void preparedStatement_setURL(PreparedStatementProxy statement, int parameterIndex, java.net.URL x) throws SQLException { if (this.pos < filterSize) { nextFilter().preparedStatement_setURL(this, statement, parameterIndex, x); return; } statement.getRawObject().setURL(parameterIndex, x); }
@Test public void testPreparedStatementOnAfterPreparedStatementSetURL() throws SQLException, MalformedURLException { final URL url = new URL("http://google.com"); wrappedPreparedStatement.setURL(0, url); verify(mockedJdbcListener).onAfterPreparedStatementSet(eq(preparedStatementInformation), eq(0), eq(url), ArgumentMatchers.<SQLException>isNull()); }