static String crawlInfoQuery = "SELECT crawlid, crawlstarted, crawlfinished, inprogress, fsid FROM Crawls";
public List<CrawlSummary> getCrawlSummaries() {
return dbQueue.execute(new SQLiteJob<List<CrawlSummary>>() {
protected List<CrawlSummary> job(SQLiteConnection db) throws SQLiteException {
List<CrawlSummary> output = new ArrayList<CrawlSummary>();
SQLiteStatement stmt = db.prepare(crawlInfoQuery);
try {
while (stmt.step()) {
long cid = stmt.columnLong(0);
String started = stmt.columnString(1);
String finished = stmt.columnString(2);
String inprogress = stmt.columnString(3);
long fsid = stmt.columnLong(4);
output.add(new CrawlSummary(FSAnalyzer.this, cid, started, finished, "True".equals(inprogress), fsid));
}
} catch (SQLiteException se) {
se.printStackTrace();
} finally {
stmt.dispose();
}
return output;
}}).complete();
}