1 package com.github.dexecutor.core.task; 2 3 import com.github.dexecutor.core.DependentTasksExecutor.ExecutionBehavior; 4 5 abstract class AbstractDelegatingTask <T extends Comparable<T>, R> extends Task<T, R> { 6 7 private static final long serialVersionUID = 1L; 8 9 private Task<T, R> task; 10 11 public AbstractDelegatingTask(final Task<T, R> task) { 12 this.task = task; 13 } 14 15 protected Task<T, R> getTargetTask() { 16 return this.task; 17 } 18 19 20 public void setId(final T id) { 21 this.task.setId(id); 22 } 23 24 public T getId() {; 25 return this.task.getId(); 26 } 27 28 public void setErrored() { 29 this.task.setErrored(); 30 } 31 32 public void setSkipped() { 33 this.task.setSkipped(); 34 } 35 36 public ExecutionStatus getStatus() { 37 return this.task.getStatus(); 38 } 39 40 public ExecutionBehavior getExecutionBehavior() { 41 return this.task.getExecutionBehavior(); 42 } 43 44 public void setExecutionBehavior(ExecutionBehavior executionBehavior) { 45 this.task.setExecutionBehavior(executionBehavior); 46 } 47 48 public boolean shouldConsiderExecutionError() { 49 return this.task.shouldConsiderExecutionError(); 50 } 51 52 void setConsiderExecutionError(boolean considerExecutionError) { 53 this.task.setConsiderExecutionError(considerExecutionError); 54 } 55 56 public boolean shouldExecute(final ExecutionResults<T, R> parentResults) { 57 return this.task.shouldExecute(parentResults); 58 } 59 }