/*\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
\r
NSqlQuery query = new NSqlQuery(db.getConnection());\r
check = query.prepare("Update LinkedNotebook set guid=:guid, shareName=:shareName, " +\r
- "username=:username, shardID=:shardID, shareKey=:shareKey, uri=:uri, updateSequenceNumber=:usn, isDirty=:isDirty "+\r
+ "username=:username, shardID=:shardID, uri=:uri, updateSequenceNumber=:usn, isDirty=:isDirty "+\r
"where guid=:keyGuid");\r
query.bindValue(":guid", tempNotebook.getGuid());\r
query.bindValue(":keyGuid", tempNotebook.getGuid());\r
return query.valueInteger(0);\r
} \r
return 0;\r
- } \r
+ } \r
+ \r
+ // get the "true" notebook guid and not the shared notebook guid\r
+ public String getLocalNotebookGuid(String guid) {\r
+ boolean check;\r
+ \r
+ NSqlQuery query = new NSqlQuery(db.getConnection());\r
+ \r
+ check = query.prepare("Select notebookGuid " \r
+ +"from LinkedNotebook where guid=:guid");\r
+ query.bindValue(":guid", guid);\r
+ check = query.exec();\r
+ if (!check)\r
+ logger.log(logger.EXTREME, "Notebook SQL retrieve has failed.");\r
+ while (query.next()) {\r
+ return query.valueString(0);\r
+ } \r
+ return null;\r
+ }\r
\r
// does a record exist?\r
public String findNotebookByShareName(String name) {\r