+
+ /**
+ * getting data from the db
+ */
+ public DateBean ReadFailedJobs(long day, String date, JobStatus status) {
+ // FailLog (jobtime, JobID, ExecTime, ip, FinalStatus)
+ String com = "SELECT JobID FROM FailLog WHERE jobtime = " + day + " and FinalStatus = '" + status.name() + "';";
+ ResultSet results = session.execute(com);
+ if (results.isExhausted())
+ return null;
+ List<Row> rows = results.all();
+ DateBean res = new DateBean(date);
+ for (Row r : rows) {
+ String jobid = r.getString("JobID");
+ String com1 = "SELECT Protein FROM ProteinLog WHERE JobID = '" + jobid + "';";
+ System.out.println("Command: " + com1);
+ ResultSet results2 = session.execute(com1);
+ List<Row> jrows = results2.all();
+ if (1 == jrows.size()) {
+ String protein = jrows.get(0).getString("Protein");
+ res.setJobidAndSeq(jobid, protein);
+ }
+ }
+ return res;
+ }
+