diff Plugins/Engine/OrthancPluginDatabase.cpp @ 1728:4941494b5dd8 db-changes

rename LookupIdentifier as LookupIdentifierExact
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Oct 2015 15:03:52 +0200
parents 1ae29c5e52fb
children 54d78925cbb6
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPluginDatabase.cpp	Tue Oct 20 14:50:10 2015 +0200
+++ b/Plugins/Engine/OrthancPluginDatabase.cpp	Tue Oct 20 15:03:52 2015 +0200
@@ -594,10 +594,10 @@
   }
 
 
-  void OrthancPluginDatabase::LookupIdentifier(std::list<int64_t>& target,
-                                               ResourceType level,
-                                               const DicomTag& tag,
-                                               const std::string& value)
+  void OrthancPluginDatabase::LookupIdentifierExact(std::list<int64_t>& target,
+                                                    ResourceType level,
+                                                    const DicomTag& tag,
+                                                    const std::string& value)
   {
     ResetAnswers();
 
@@ -606,17 +606,18 @@
     tmp.element = tag.GetElement();
     tmp.value = value.c_str();
 
-    if (extensions_.lookupIdentifier3 != NULL)
+    if (extensions_.lookupIdentifierExact != NULL)
     {
-      CheckSuccess(extensions_.lookupIdentifier3(GetContext(), payload_, Plugins::Convert(level), &tmp));
+      CheckSuccess(extensions_.lookupIdentifierExact(GetContext(), payload_, Plugins::Convert(level), &tmp));
       ForwardAnswers(target);
     }
     else
     {
-      // Emulate "lookupIdentifier3" if unavailable
+      // Emulate "lookupIdentifierExact" if unavailable
 
       if (backend_.lookupIdentifier == NULL)
       {
+        LOG(ERROR) << "The plugin does not have the extension \"lookupIdentifierExact\"";
         throw OrthancException(ErrorCode_DatabasePlugin);
       }