Code example for ResultSet

Methods: getDouble

0
 
	@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);
        return new Percentage(d);
	} 
	 
    public Object valueOf(String s) {
    	return Percentage.valueOf(s);
    } 
}