* @param rowIndex
* @param columnIndex
* @return verdi
*/
public Object getValueAt(int rowIndex, int columnIndex) {
VeggProductionV veggProductionV = (VeggProductionV) getRow(rowIndex);
DecimalFormat decimalFormat = new DecimalFormat();
decimalFormat.setDecimalSeparatorAlwaysShown(false);
decimalFormat.setParseIntegerOnly(true);
Map<String, String> statusMap = Util
.createStatusMap(veggProductionV.getOrderStatus());
switch (columnIndex) {
case 0:
return veggProductionV.getTransportDetails();
case 1:
return veggProductionV;
case 2:
return Util.formatDate(veggProductionV.getProductionDate(),
Util.SHORT_DATE_FORMAT);
case 3:
if (veggProductionV.getNumberOfItems() != null) {
return decimalFormat.format(veggProductionV
.getNumberOfItems());
}
return "";
case 4:
if (veggProductionV.getOrdln() != null) {
return veggProductionV.getOrdln().getDescription();
}
return Util.removeNoAttributes(veggProductionV
.getAttributeInfo());
case 5:
return statusMap.get(frontChecker.getArticleName());
// return getStatus(frontChecker, statusMap,
// veggProductionV,window);
case 6:
Date loadingDate = veggProductionV.getLoadingDate();
if (loadingDate != null) {
return Util.SHORT_DATE_FORMAT.format(loadingDate);
}
return null;
case 7:
if (veggProductionV.getProduced() != null) {
return Util.SHORT_DATE_FORMAT.format(veggProductionV
.getProduced());
}
return "---";
case 8:
if (veggProductionV.getProductAreaGroupName() != null) {
return veggProductionV.getProductAreaGroupName();
}
return "";
case 9:
return veggProductionV.getProductionUnitName();
case 10:
if (veggProductionV.getActionStarted() != null) {
return Util.SHORT_DATE_FORMAT.format(veggProductionV
.getActionStarted());
}
return "---";
default:
throw new IllegalStateException("Unknown column");