import com.datastax.driver.core.Session;
import com.datastax.driver.core.exceptions.QueryExecutionException;
import com.datastax.driver.core.exceptions.QueryValidationException;
+
import compbio.cassandra.CassandraNativeConnector;
public class CassandraReader {
earlestDate = CassandraNativeConnector.getEarliestDateInDB();
return earlestDate;
}
+
+ /**
+ * prepares an example of either job id or IP for the DB
+ *
+ * @param exampletype
+ * defines which example you need (an existing job from the DB -
+ * jobid, an IP - "ip")
+ * @return a string representation of the requested example, if the example
+ * type is not known empty string is returned
+ */
+ public String getExample(String exampletype) {
+ if (exampletype.equals("jobid")) {
+ return "jp_NzBOJKo";
+ } else if (exampletype.equals("ip")) {
+ return "127.0.0.1";
+ }
+ return "";
+ }
}