diff OrthancServer/DatabaseWrapper.h @ 1286:b4acdb37e43b

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Feb 2015 16:51:19 +0100
parents ee43f0d611a8
children 6e7e5ed91c2d
line wrap: on
line diff
--- a/OrthancServer/DatabaseWrapper.h	Tue Feb 03 15:00:42 2015 +0100
+++ b/OrthancServer/DatabaseWrapper.h	Tue Feb 03 16:51:19 2015 +0100
@@ -68,6 +68,8 @@
                                       SQLite::Statement& s,
                                       unsigned int maxResults);
 
+    void ClearTable(const std::string& tableName);
+
   public:
     DatabaseWrapper(const std::string& path);
 
@@ -127,8 +129,9 @@
                                   int64_t id,
                                   FileContentType contentType);
 
-    virtual void SetMainDicomTags(int64_t id,
-                                  const DicomMap& tags);
+    virtual void SetMainDicomTag(int64_t id,
+                                 const DicomTag& tag,
+                                 const std::string& value);
 
     virtual void GetMainDicomTags(DicomMap& map,
                                   int64_t id);
@@ -187,7 +190,15 @@
       db_.FlushToDisk();
     }
 
-    virtual void ClearTable(const std::string& tableName);
+    virtual void ClearChanges()
+    {
+      ClearTable("Changes");
+    }
+
+    virtual void ClearExportedResources()
+    {
+      ClearTable("ExportedResources");
+    }
 
     virtual bool IsExistingResource(int64_t internalId);
 
@@ -213,13 +224,13 @@
       return db_.GetErrorMessage();
     }
 
-    virtual void GetChildren(std::list<std::string>& childrenPublicIds,
-                             int64_t id);
+    void GetChildren(std::list<std::string>& childrenPublicIds,
+                     int64_t id);
 
-    virtual int64_t GetTableRecordCount(const std::string& table);
+    int64_t GetTableRecordCount(const std::string& table);
     
-    virtual bool GetParentPublicId(std::string& result,
-                                   int64_t id);
+    bool GetParentPublicId(std::string& result,
+                           int64_t id);
 
   };
 }