X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=datadb%2Fcompbio%2Fcassandra%2Freaders%2FDailyStatisticsReader.java;h=46465374fa7d2cc163e27acc61acb9384a770635;hb=006363dc999cef4e9c49dd6a38ea0d78cbb62472;hp=718a404097619a8527dd4d2a825f2c66f6750ae6;hpb=6823d2f36ff55b7ab11d674e3fe4d04dc57d6bbf;p=proteocache.git diff --git a/datadb/compbio/cassandra/readers/DailyStatisticsReader.java b/datadb/compbio/cassandra/readers/DailyStatisticsReader.java index 718a404..4646537 100644 --- a/datadb/compbio/cassandra/readers/DailyStatisticsReader.java +++ b/datadb/compbio/cassandra/readers/DailyStatisticsReader.java @@ -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 rows = results.all();