Double maxValue = t.getMaxValue();
Double minValue = t.getMinValue();
Boolean maxClosed = t.getMaxClosed();
Boolean minClosed = t.getMinClosed();
Double value = t.getThValue();
SbiThreshold sbit = t.getSbiThreshold();
Color color = new Color(255, 255, 0);
String col = t.getColour();
logger.debug("Threshold color is "+ col!=null ? col : "");
if (col != null) {
try{
color = Color.decode(col);
logger.debug("Color decoded");
}
catch (Exception e) {
color=Color.RED;
}
}
if(sbit.getThresholdType()!=null){
toReturn.setThresholdType(sbit.getThresholdType().getValueCd());
}
if(sbit.getCode()!=null){
toReturn.setThresholdCode(sbit.getCode());
}
toReturn.setId(id);
toReturn.setThresholdId(thresholdId);
toReturn.setLabel(label);