logger.log(logger.MEDIUM, query.lastError().toString());
}
}
// Load notebooks from the database
public List<LinkedNotebook> getAll() {
LinkedNotebook tempNotebook;
List<LinkedNotebook> index = new ArrayList<LinkedNotebook>();
boolean check;
NSqlQuery query = new NSqlQuery(db.getConnection());
check = query.exec("Select guid, shareName, username, shardID, shareKey, uri " +
" from LinkedNotebook");
if (!check)
logger.log(logger.EXTREME, "Notebook SQL retrieve has failed.");
while (query.next()) {
tempNotebook = new LinkedNotebook();
tempNotebook.setGuid(query.valueString(0));
tempNotebook.setShareName(query.valueString(1));
tempNotebook.setUsername(query.valueString(2));
tempNotebook.setShardId(query.valueString(3));
tempNotebook.setShareKey(query.valueString(4));
tempNotebook.setUri(query.valueString(5));
index.add(tempNotebook);
}
return index;
}