42434445464748
} @Override public Widget getWidget(String id) { org.apache.rave.model.Widget widget = getFromService(id); return new Widget(widget); }
50515253545556
@Override public Widget updateWidget(String id, Widget widget) { org.apache.rave.model.Widget fromDb = getFromService(id); updateProperties(widget, fromDb); widgetService.updateWidget(fromDb); return new Widget(getFromService(id)); }
58596061626364
@Override public Widget createWidget(Widget widget) { WidgetImpl toDb = new WidgetImpl(); toDb.setId(widget.getId()); updateProperties(widget, toDb); return new Widget(widgetService.registerNewWidget(toDb)); }
707172737475767778
private List<Widget> convert(List<org.apache.rave.model.Widget> resultSet) { List<Widget> widgets = Lists.newArrayListWithExpectedSize(resultSet.size()); for(org.apache.rave.model.Widget widget: resultSet) { widgets.add(new Widget(widget)); } return widgets; }