public String[] getAllString(final String param) { final int[] positions = query.getNamedParameterIndices(param); final String[] result = new String[positions.length]; try { for (int i = 0; i < positions.length; i++) { result[i] = statement.getString(positions[i]); } return result; } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public String getString(final String param) { final int[] positions = query.getNamedParameterIndices(param); try { if (positions.length == 1) { return statement.getString(positions[0]); } throw newGetParamError(param); } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public int[] getAllInteger(final String param) { final int[] positions = query.getNamedParameterIndices(param); final int[] result = new int[positions.length]; try { for (int i = 0; i < positions.length; i++) { result[i] = statement.getInt(positions[i]); } return result; } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public boolean[] getAllBoolean(final String param) { final int[] positions = query.getNamedParameterIndices(param); final boolean[] result = new boolean[positions.length]; try { for (int i = 0; i < positions.length; i++) { result[i] = statement.getBoolean(positions[i]); } return result; } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public long[] getAllLong(final String param) { final int[] positions = query.getNamedParameterIndices(param); final long[] result = new long[positions.length]; try { for (int i = 0; i < positions.length; i++) { result[i] = statement.getLong(positions[i]); } return result; } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public float[] getAllFloat(final String param) { final int[] positions = query.getNamedParameterIndices(param); final float[] result = new float[positions.length]; try { for (int i = 0; i < positions.length; i++) { result[i] = statement.getFloat(positions[i]); } return result; } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public Q setNull(final String param, final int value, final String typeName) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setNull(position, value, typeName); } } catch (SQLException sex) { throw new DbSqlException(this, "Failed to set null to parameter: " + param, sex); } return _this(); }
public Q setString(final String param, final String value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setString(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public Q setBlob(final String param, final Blob value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setBlob(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public Q setByte(final String param, final byte value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setByte(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public Q setLong(final String param, final long value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setLong(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public Q setFloat(final String param, final float value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setFloat(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public Q setBigDecimal(final String param, final BigDecimal value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setBigDecimal(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
private Q registerOutParameter(final String param, final int type) { initCallable(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { callableStatement.registerOutParameter(position, type); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public float getFloat(final String param) { final int[] positions = query.getNamedParameterIndices(param); try { if (positions.length == 1) { return statement.getFloat(positions[0]); } throw newGetParamError(param); } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public boolean getBoolean(final String param) { final int[] positions = query.getNamedParameterIndices(param); try { if (positions.length == 1) { return statement.getBoolean(positions[0]); } throw newGetParamError(param); } catch (SQLException sex) { throw newGetParamError(param, sex); } }
public long getLong(final String param) { final int[] positions = query.getNamedParameterIndices(param); try { if (positions.length == 1) { return statement.getLong(positions[0]); } throw newGetParamError(param); } catch (SQLException sex) { throw newGetParamError(param, sex); } }
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(); }
public Q setAsciiStream(final String param, final InputStream stream, final int length) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setAsciiStream(position, stream, length); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }
public Q setRef(final String param, final Ref value) { initPrepared(); final int[] positions = query.getNamedParameterIndices(param); try { for (final int position : positions) { preparedStatement.setRef(position, value); } } catch (SQLException sex) { throwSetParamError(param, sex); } return _this(); }