示例#1
0
 @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");
   }
 }
示例#2
0
  /** @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");
    }
  }
示例#3
0
 public OutdatedEntity(AbstractEntity entity) {
   this.type = entity.getClass().getSimpleName();
   this.id = entity.getId();
 }