Code example for PreparedStatement

Methods: setDouble

0
	@Override 
	public void setParameter(PreparedStatement ps, int i, Object parameter,
			JdbcType jdbcType) throws SQLException {
		 
		double d = ((Percentage)parameter).asDouble();
		ps.setDouble(i, d);
	} 
 
	@Override 
	public Object getResult(ResultSet rs, String columnName)
			throws SQLException { 
		 
		double d = rs.getDouble(columnName);
        return new Percentage(d);
	} 
 
	@Override 
	public Object getResult(CallableStatement cs, int columnIndex)
			throws SQLException { 
		 
		double d = cs.getDouble(columnIndex);