@Override protected void setValue(Object element, Object value) { CatRateLinkEntity linkEntity = (CatRateLinkEntity) element; String valueStr = (String) value; try { linkEntity.setDefValue(Integer.valueOf(valueStr)); DbHelper.merge(linkEntity); viewer.update(element, null); } catch (Exception e) { Util.dbError(shell, e); } }
@Override protected void setValue(Object element, Object value) { if ((Integer) value > -1) { RateRbEntity rateEntity = rates.get((Integer) value); CatRateLinkEntity entity = (CatRateLinkEntity) element; try { entity.setRate(rateEntity); DbHelper.merge(entity); viewer.update(element, null); } catch (Exception e) { Util.dbError(shell, e); } } }