X-Git-Url: http://git.sourceforge.jp/view?p=neighbornote%2FNeighborNote.git;a=blobdiff_plain;f=src%2Fcx%2Ffbn%2Fnevernote%2Fsql%2FNoteTable.java;h=598a64838d680744a5d5799f1408865c6fcf4831;hp=bd2ab8ea5081b9ee8ba725c228d6948d40f441a0;hb=7aa959afc1a14853f194e3129f74302431ea86fb;hpb=ff01a206b38a3fbcdd117aa36a67b1737774559c;ds=inline diff --git a/src/cx/fbn/nevernote/sql/NoteTable.java b/src/cx/fbn/nevernote/sql/NoteTable.java index bd2ab8e..598a648 100644 --- a/src/cx/fbn/nevernote/sql/NoteTable.java +++ b/src/cx/fbn/nevernote/sql/NoteTable.java @@ -760,6 +760,34 @@ public class NoteTable { return notes; } // Get a list of notes that need to be updated + public List getDirtyLinkedNotes() { + String guid; + Note tempNote; + List notes = new ArrayList(); + List index = new ArrayList(); + + boolean check; + NSqlQuery query = new NSqlQuery(db.getConnection()); + + check = query.exec("Select guid from Note where isDirty = true and isExpunged = false and notebookGuid in (select guid from notebook where linked = true)"); + if (!check) + logger.log(logger.EXTREME, "Note SQL retrieve has failed: " +query.lastError().toString()); + + // Get a list of the notes + while (query.next()) { + guid = new String(); + guid = query.valueString(0); + index.add(guid); + } + + // Start getting notes + for (int i=0; i getDirtyLinked(String notebookGuid) { String guid; Note tempNote;