Merge branch 'master' into PROT-9-webservice
[proteocache.git] / datadb / compbio / beans / ExecutionTimeBean.java
diff --git a/datadb/compbio/beans/ExecutionTimeBean.java b/datadb/compbio/beans/ExecutionTimeBean.java
new file mode 100644 (file)
index 0000000..1b2f85e
--- /dev/null
@@ -0,0 +1,40 @@
+package compbio.beans;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+       /**
+        * bean for a report of execution time statistics.
+        * 
+        * @param dateTotal
+        *            Map<String, TotalExecutionTime> where String - a date, Total - total info for
+        *            jobs with period of execution time
+        * @param wholeTotal
+        *            total sum for each parameter from dateTotal
+        */
+       public class ExecutionTimeBean {
+               private Map<String, TotalExecutionTime> dateTotal;
+               private TotalExecutionTime wholeTotal;
+
+               public ExecutionTimeBean() {
+                       this.dateTotal = new LinkedHashMap<String, TotalExecutionTime>();
+               }
+
+               public void setDateTotal(String dat, TotalExecutionTime tot) {
+                       if (this.dateTotal == null)
+                               dateTotal = new LinkedHashMap<String, TotalExecutionTime>();
+                       dateTotal.put(dat, tot);
+               }
+
+               public Map<String, TotalExecutionTime> getDateTotal() {
+                       return dateTotal;
+               }
+
+               public void setWholeTotal(TotalExecutionTime tot) {
+                       this.wholeTotal = tot;
+               }
+
+               public TotalExecutionTime getWholeTotal() {
+                       return wholeTotal;
+               }
+}