Code example for ResultSet

Methods: getDouble

0
 
	@Override 
	public Object getResult(ResultSet rs, String columnName)
			throws SQLException { 
		 
        double amount = rs.getDouble(columnName);
        return new MonetaryAmount(amount);
	} 
 
	@Override 
	public Object getResult(CallableStatement cs, int columnIndex)
			throws SQLException { 
		double amount = cs.getDouble(columnIndex);
        return new MonetaryAmount(amount);
	} 
	 
    public Object valueOf(String amount) {
    	return MonetaryAmount.valueOf(amount);
    } 
 
}