query.bindValue(":attributeSource", n.getAttributes().getSource());\r
query.bindValue(":attributeSourceUrl", n.getAttributes().getSourceURL());\r
query.bindValue(":attributeSourceApplication", n.getAttributes().getSourceApplication());\r
+ } else {\r
+ created = new StringBuilder(simple.format(n.getCreated())); \r
+ query.bindValue(":attributeSubjectDate", created.toString());\r
+ query.bindValue(":attributeLatitude", 0.0);\r
+ query.bindValue(":attributeLongitude", 0.0);\r
+ query.bindValue(":attributeAltitude", 0.0);\r
+ query.bindValue(":attributeAuthor", "");\r
+ query.bindValue(":attributeSource", "");\r
+ query.bindValue(":attributeSourceUrl", "");\r
+ query.bindValue(":attributeSourceApplication", "");\r
}\r
query.bindValue(":indexNeeded", true);\r
query.bindValue(":isExpunged", false);\r
na.setContentClass(query.valueString(16));\r
\r
if (loadTags) {\r
- n.setTagGuids(noteTagsTable.getNoteTags(n.getGuid()));\r
+ List<String> tagGuids = noteTagsTable.getNoteTags(n.getGuid());\r
List<String> tagNames = new ArrayList<String>();\r
TagTable tagTable = db.getTagTable();\r
- for (int i=0; i<n.getTagGuids().size(); i++) {\r
- String currentGuid = n.getTagGuids().get(i);\r
+ for (int i=0; i<tagGuids.size(); i++) {\r
+ String currentGuid = tagGuids.get(i);\r
Tag tag = tagTable.getTag(currentGuid);\r
if (tag.getName() != null)\r
tagNames.add(tag.getName());\r
else\r
tagNames.add("");\r
}\r
+\r
n.setTagNames(tagNames);\r
+ n.setTagGuids(tagGuids); \r
}\r
\r
if (loadContent) {\r