Commit 0dc66910 authored by Thomas Huster's avatar Thomas Huster
Browse files

[17453] added generic types to SavingUpdateValueStrategy

parent 6853dbd2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ import org.eclipse.core.runtime.IStatus;
import ch.elexis.core.model.Identifiable;
import ch.elexis.core.services.IModelService;

public class SavingUpdateValueStrategy extends UpdateValueStrategy {
public class SavingUpdateValueStrategy<S, D> extends UpdateValueStrategy<S, D> {
	private boolean autoSave;
	private IModelService modelService;
	private IObservableValue<?> observable;
@@ -25,7 +25,7 @@ public class SavingUpdateValueStrategy extends UpdateValueStrategy {
	@SuppressWarnings("rawtypes")
	@Override
	protected IStatus doSet(IObservableValue observableValue, Object value){
		IStatus ret = super.doSet(observableValue, value);
		IStatus ret = super.doSet(observableValue, (D) value);
		if (autoSave) {
			if (observable.getValue() instanceof Identifiable) {
				modelService.save((Identifiable) observable.getValue());