Package com.projity.association

Examples of com.projity.association.AssociationList


    return new TaskSnapshotBackup(snapshot.getCurrentSchedule(),detail);
  }
  public static void restore(TaskSnapshot snapshot,TaskSnapshotBackup backup){
    if (backup==null||snapshot==null) return;
    if (backup.getAssignmentDetails()!=null) snapshot.setCurrentSchedule(backup.getCurrentSchedule());
    AssociationList assignments=snapshot.getAssignments();
    Iterator i = assignments.iterator();
    Assignment assignment;
    Iterator j=backup.getAssignmentDetails().iterator();
    while (i.hasNext()) {
      assignment = (Assignment)i.next();
      assignment.restoreDetail(j.next());
View Full Code Here


  public void forSnapshotsAssignments(Closure c,int s){
    TaskSnapshot snapshot;
    if (s==-1) snapshot=(TaskSnapshot)getCurrentSnapshot();
    else snapshot=(TaskSnapshot)getSnapshot(new Integer(s));
        if (snapshot==null) return;
        AssociationList snapshotAssignments=snapshot.getHasAssignments().getAssignments();
        if (snapshotAssignments.size()>0){
            for (Iterator j=snapshotAssignments.iterator();j.hasNext();){
                Assignment assignment=(Assignment)j.next();
                c.execute(assignment);
            }
        }
  }
View Full Code Here

        project.addRepaired(this);
        ErrorLogger.logOnce("raw parent", "repaired bad raw duration" + this,null);
        duration = 0;
      }
    } else {
      AssociationList assignments =getAssignments();
      if (assignments.size() == 1) {
        duration = ((Assignment)assignments.getFirst()).getDurationMillis();
      } else {
        Iterator i = assignments.iterator();
        long end = 0;
        // get the latest ending assignment
        while (i.hasNext()) {
          end = Math.max(end,((Assignment)i.next()).getEnd());
        }
View Full Code Here

   */
  public boolean hasDuration() {
    if (isWbsParent()) {
      return getRawDuration() != 0;
    } else {
      AssociationList assignments =getAssignments();
      if (assignments.size() == 1)
        return ((Assignment)assignments.getFirst()).hasDuration();
      Iterator i = assignments.iterator();
      while (i.hasNext()) {
        if (((Assignment)i.next()).hasDuration())
          return true;
      }
    }
View Full Code Here

  public AssociationList getRealAssignments() {
    if (hasRealAssignments())
      return getAssignments();
    else
      return new AssociationList(); //empty list
  }
View Full Code Here

TOP

Related Classes of com.projity.association.AssociationList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.