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();
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 + ";");
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();