Skip to main content
summaryrefslogtreecommitdiffstats
blob: b5d6caeffa85fcd136f7274b883be69e862d7ab2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/*
 * Copyright (c) 2012 Robert Bosch Engineering and Business Solutions Ltd India. All rights reserved. This program and
 * the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies
 * this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.eclipse.osee.ats.reports.burndown.hours;

import java.util.Calendar;
import java.util.Date;

/**
 * Model class to store the data for a single date.
 * 
 * @author Praveen Joseph
 */
public class HourBurndownEntry {

   private final Date date;
   private double hoursWorked;
   private double hoursRemaining;
   private boolean actualData;
   private double idealHoursRemaining;
   private double burndownRate;

   /**
    * @param date : Sets the Current date
    */
   public HourBurndownEntry(final Date date) {
      this.date = date;
      Date currentTime = Calendar.getInstance().getTime();
      // The variable "actualData" is used to indicate if the data calculated is based on the actual work done on a given
      // date,
      // or if it is calculated based on assumptions (ie. If the date occurs sometime in the future).

      if (currentTime.after(date)) {
         this.actualData = true;
      } else {
         this.actualData = false;
      }
   }

   /**
    * @param actualData : sets the current date
    */
   public void setActualData(final boolean actualData) {
      this.actualData = actualData;
   }

   /**
    * @param hoursRemaining : sets the hours remaining
    */
   public void setHoursRemaining(final double hoursRemaining) {
      this.hoursRemaining = hoursRemaining;
   }

   /**
    * @param hoursWorked : sets the hours worked
    */
   public void setHoursWorked(final double hoursWorked) {
      this.hoursWorked = hoursWorked;
   }

   /**
    * @return the hours remaining
    */
   public double getHoursRemaining() {
      return this.hoursRemaining;
   }

   /**
    * @return todays date
    */
   public Date getDate() {
      return this.date;
   }

   /**
    * @return the hours worked
    */
   public double getHoursWorked() {
      return this.hoursWorked;
   }

   /**
    * @return actual data
    */
   public boolean isActualData() {
      return this.actualData;
   }

   /**
    * @return ideal Hours Remaining
    */
   public double getIdealHoursRemaining() {
      return this.idealHoursRemaining;
   }

   /**
    * @param idealHoursRemaining : sets the ideal Hours Remaining
    */
   public void setIdealHoursRemaining(final double idealHoursRemaining) {
      this.idealHoursRemaining = idealHoursRemaining;
   }

   /**
    * @return burndownRate
    */
   public double getBurndownRate() {
      return this.burndownRate;
   }

   /**
    * @param burndownRate : sets the burndownRate
    */
   public void setBurndownRate(final double burndownRate) {
      this.burndownRate = burndownRate;
   }

}

Back to the top