@Override public void merge(AbstractEntity other) { if (other instanceof Permission) { Permission o = (Permission) other; this.setValue(o.getValue()); this.setInducedPermission(o.getInducedPermission()); } else { throw new WegasIncompatibleType( this.getClass().getSimpleName() + ".merge (" + other.getClass().getSimpleName() + ") is not possible"); } }
/** @param a */ @Override public void merge(AbstractEntity a) { if (a instanceof Iteration) { Iteration other = (Iteration) a; this.setBeginAt(other.getBeginAt()); this.setName(other.getName()); // ListUtils.updateList(tasks, other.getTasks()); // this.setPlannedWorkload(other.getPlannedWorkload()); // this.setReplannedWorkloads(replannedWorkloads); // this.setTotalWorkload(other.getTotalWorkload()); // this.setWorkloads(); } else { throw new WegasIncompatibleType( this.getClass().getSimpleName() + ".merge (" + a.getClass().getSimpleName() + ") is not possible"); } }
public OutdatedEntity(AbstractEntity entity) { this.type = entity.getClass().getSimpleName(); this.id = entity.getId(); }