private Object cast(ResourceType.DataType type,String column,ResultSet row) throws SQLException {
  if (ResourceType.DataType.BOOLEAN == type) {
    return row.getBoolean(column);
  }
 else   if (ResourceType.DataType.STRING == type) {
    return row.getString(column);
  }
 else   if (ResourceType.DataType.LONG == type) {
    return row.getLong(column);
  }
 else   if (ResourceType.DataType.DOUBLE == type) {
    return row.getDouble(column);
  }
  return null;
}

private Object cast ( ResourceType . DataType type , String column , ResultSet row ) throws SQLException { if ( ResourceType . DataType . BOOLEAN == type ) { return row . getBoolean ( column ) ; } else if ( ResourceType . DataType . STRING == type ) { return row . getString ( column ) ; } else if ( ResourceType . DataType . LONG == type ) { return row . getLong ( column ) ; } else if ( ResourceType . DataType . DOUBLE == type ) { return row . getDouble ( column ) ; } return null ; }
call the correct getter on the row based on the datatype of the column being retrieved .
