Apply formatting
[proteocache.git] / datadb / compbio / cassandra / readers / DailyStatisticsReader.java
index 718a404..4646537 100644 (file)
@@ -18,16 +18,17 @@ public class DailyStatisticsReader extends CassandraReader {
        public DailyStatisticsReader() {
                super();
        }
-       
+
        /**
         * query: total number of jobs for the period from date1 till date2
         * 
         * @param dateStart
-        *           the first date in the period
+        *            the first date in the period
         * @param dateEnd
-        *           the last date in the period
+        *            the last date in the period
         * 
-        * @return TotalJobsStatisticBean to the controller DailyStatisticsController
+        * @return TotalJobsStatisticBean to the controller
+        *         DailyStatisticsController
         **/
        public TotalJobsStatisticBean query(long dateStart, long dateEnd) {
                Calendar start = Calendar.getInstance();
@@ -59,20 +60,20 @@ public class DailyStatisticsReader extends CassandraReader {
                query.setWholeTotal(wholeTotal);
                return query;
        }
-       
+
        /**
         * query: jobs and sequence at a date
         * 
         * @param day
-        *           the date in long format
+        *            the date in long format
         * @param date
-        *           the date in String format
+        *            the date in String format
         * 
         * @param status
-        *           final job status
+        *            final job status
         * @return DateBean to the controller DailyStatisticsController
         **/
-       public DateBean readJobByDay(long day, String date, JobStatus status) { 
+       public DateBean readJobByDay(long day, String date, JobStatus status) {
                DateBean res = new DateBean(date);
                if (status == JobStatus.OK) {
                        ResultSet results = CassandraQuery("SELECT JobID, Protein FROM ProteinData WHERE jobtime = " + day + ";");
@@ -82,9 +83,9 @@ public class DailyStatisticsReader extends CassandraReader {
                        for (Row r : rows) {
                                res.setJobidAndSeq(r.getString("JobID"), r.getString("Protein"));
                        }
-               }
-               else {
-                       ResultSet results = CassandraQuery("SELECT JobID FROM FailLog WHERE jobtime = " + day + " and FinalStatus = '" + status.name() + "';");
+               } else {
+                       ResultSet results = CassandraQuery("SELECT JobID FROM FailLog WHERE jobtime = " + day + " and FinalStatus = '" + status.name()
+                                       + "';");
                        if (results == null || results.isExhausted())
                                return null;
                        List<Row> rows = results.all();