예제 #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
파일: Iteration.java 프로젝트: Heigvd/Wegas
  /** @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();
 }