Introduce new table for programs and necessary infrastructure for the table
[proteocache.git] / datadb / compbio / cassandra / CassandraReaderOld.java
index e08b39c..ff37145 100644 (file)
@@ -314,8 +314,13 @@ public class CassandraReaderOld {
                        return null;
                Row row1 = results1.one();
                JobBean res = new JobBean(row.getString("Protein"), row.getString("JobID"), row.getString("DataBegin"), row.getString("DataEnd"),
-                               row.getString("ip"), row1.getMap("Predictions", String.class, String.class), row.getString("ProgramName"),
-                               row.getString("ProgramVersion"));
+                               row.getString("ip"), row1.getMap("Predictions", String.class, String.class));
+               String program = row.getString("ProgramName");
+               String version = row.getString("ProgramVersion");
+               if (null != program && null != version) {
+                       res.setProgramName(program);
+                       res.setProgramVersion(version);
+               }
                System.out.println("Query time is " + (queryTime - startTime) + " msec");
                final long endTime = System.currentTimeMillis();
                System.out.println(" rows analysed, execution time is " + (endTime - startTime) + " msec");