Exemplo n.º 1
0
 protected void bind(Object source, Object targetValue) {
   DataBinder binder = new DataBinder(source);
   binder.bind(
       new MutablePropertyValues(Collections.singletonMap(change.getPropertyName(), targetValue)));
   if (binder.getBindingResult().hasErrors()) {
     throw new StudyCalendarSystemException(
         "Unable to update property value", new BindException(binder.getBindingResult()));
   }
 }
Exemplo n.º 2
0
 public void revert(Changeable target) {
   bind(target, getAssignableValue(change.getOldValue()));
 }
Exemplo n.º 3
0
 public void apply(Changeable source) {
   bind(source, getAssignableValue(change.getNewValue()));
 }