/**
* @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
*/
public final Object getValueAt(int row, int col) {
Property p = (Property) getObject(row);
switch (col) {
case 0 :
String cat = p.getCategory();
return (cat == null ? "n/a" : cat);
case 1 :
BusinessGroup grp = p.getGrp();
return (grp == null ? "n/a" : grp.getKey().toString());
case 2 :
String resType = p.getResourceTypeName();
return (resType == null ? "n/a" : resType);
case 3 :
String name = p.getName();
return (name == null ? "n/a" : name);
case 4 :
Float floatvalue = p.getFloatValue();
Long longvalue = p.getLongValue();
String stringvalue = p.getStringValue();
String textvalue = p.getTextValue();
String val;
if (floatvalue != null)
val = floatvalue.toString();
else if (longvalue != null)
val = longvalue.toString();
else if (stringvalue != null)
val = stringvalue;
else if (textvalue != null)
val = textvalue;
else val = "n/a";
return val;
case 5 :
Date dateCD = p.getCreationDate();
return (dateCD == null ? new Date() : dateCD);
case 6 :
Date dateLM = p.getLastModified();
return (dateLM == null ? new Date() : dateLM);
default :
return "error";
}
}