OSDN Git Service

STAR→Add Star, UNSTAR→Remove Star
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / NoteTagsTable.java
index 232bd7d..b2ddb0c 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * This file is part of NeverNote \r
+ * This file is part of NixNote/NeighborNote \r
  * Copyright 2009 Randy Baumgarte\r
  * \r
  * This file may be licensed under the terms of of the\r
@@ -141,7 +141,7 @@ public class NoteTagsTable {
                return false;\r
        }\r
        // Save Note Tags\r
-       public void saveNoteTag(String noteGuid, String tagGuid) {\r
+       public void saveNoteTag(String noteGuid, String tagGuid, boolean isDirty) {\r
                boolean check;\r
                NSqlQuery query = new NSqlQuery(db.getConnection());\r
 \r
@@ -159,10 +159,12 @@ public class NoteTagsTable {
                        logger.log(logger.MEDIUM, "NoteTags Table insert failed.");             \r
                        logger.log(logger.MEDIUM, query.lastError());\r
                }\r
-               check = query.prepare("Update Note set isDirty=1 where guid=:guid");\r
+               check = query.prepare("Update Note set isDirty=:isDirty where guid=:guid");\r
                if (!check)\r
                        logger.log(logger.EXTREME, "RNoteTagsTable.saveNoteTag prepare has failed.");\r
+               query.bindValue(":isDirty", isDirty);\r
                query.bindValue(":guid", noteGuid);\r
+               query.exec();\r
                if (!check) {\r
                        logger.log(logger.MEDIUM, "RNoteTagsTable.saveNoteTag has failed to set note as dirty.");               \r
                        logger.log(logger.MEDIUM, query.lastError());\r