OSDN Git Service

- Corrected various null pointer errors. - Corrected problem indexing large PDF docum...
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / sql / NoteResourceTable.java
index c418243..6acc357 100644 (file)
@@ -523,7 +523,7 @@ public class NoteResourceTable  {
                NSqlQuery query = new NSqlQuery(db.getConnection());\r
                query.exec("Update NoteResources set indexneeded=true");\r
        }\r
-       // Count unindexed notes\r
+       // Count attachments\r
        public int getResourceCount() {\r
         NSqlQuery query = new NSqlQuery(db.getConnection());\r
                query.exec("select count(*) from noteresources");\r
@@ -531,7 +531,16 @@ public class NoteResourceTable  {
                int returnValue = new Integer(query.valueString(0));\r
                return returnValue;\r
        }\r
-\r
+       //\r
+       // Count unindexed notes\r
+       public int getUnindexedCount() {\r
+        NSqlQuery query = new NSqlQuery(db.getConnection());\r
+               query.exec("select count(*) from noteresources where indexneeded=true");\r
+               query.next(); \r
+               int returnValue = new Integer(query.valueString(0));\r
+               return returnValue;\r
+       }\r
+       \r
        //********************************************\r
        //** Utility Functions\r
        //********************************************\r