"isDirty boolean, "+
"autoEncrypt boolean, "+
"local boolean, "+
"archived boolean)"))
logger.log(logger.HIGH, "Table "+dbName+" creation FAILED!!!");
Notebook newnote = new Notebook();
newnote.setDefaultNotebook(true);
newnote.setName("My Notebook");
newnote.setPublished(false);
newnote.setGuid("1");
// Setup an initial notebook
SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
query = new NSqlQuery(db.getConnection());
query.prepare("Insert Into "+dbName+" (guid, sequence, name, defaultNotebook, "
+"serviceCreated, serviceUpdated, published, "
+ "isDirty, autoEncrypt, "
+ "local, archived) Values("
+":guid, :sequence, :name, :defaultNotebook, "
+":serviceCreated, :serviceUpdated, :published, "
+":isDirty, :autoEncrypt, "
+":local, false)");
query.bindValue(":guid", newnote.getGuid());
query.bindValue(":sequence", newnote.getUpdateSequenceNum());
query.bindValue(":name", newnote.getName());
query.bindValue(":defaultNotebook", newnote.isDefaultNotebook());
StringBuilder serviceCreated = new StringBuilder(simple.format(newnote.getServiceCreated()));
StringBuilder serviceUpdated = new StringBuilder(simple.format(newnote.getServiceUpdated()));
if (serviceUpdated.toString() == null)
serviceUpdated = serviceCreated;
query.bindValue(":serviceCreated", serviceCreated.toString());
query.bindValue(":serviceUpdated", serviceCreated.toString());
query.bindValue(":published",newnote.isPublished());
query.bindValue(":isDirty", true);
query.bindValue(":autoEncrypt", false);
query.bindValue(":local", false);