annotate OrthancServer/IDatabaseWrapper.h @ 1286:b4acdb37e43b

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Feb 2015 16:51:19 +0100
parents ee43f0d611a8
children 6e7e5ed91c2d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Belgium
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 *
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * published by the Free Software Foundation, either version 3 of the
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * License, or (at your option) any later version.
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 *
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * In addition, as a special exception, the copyright holders of this
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * program give permission to link the code of its release with the
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * that use the same license as the "OpenSSL" library), and distribute
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * the linked executables. You must obey the GNU General Public License
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * in all respects for all of the code used other than "OpenSSL". If you
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * modify file(s) with this exception, you may extend this exception to
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * your version of the file(s), but you are not obligated to do so. If
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * you do not wish to do so, delete this exception statement from your
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * version. If you delete this exception statement from all source files
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * in the program, then also delete it here.
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 *
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 * This program is distributed in the hope that it will be useful, but
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * General Public License for more details.
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 *
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 * You should have received a copy of the GNU General Public License
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 **/
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 #pragma once
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 #include "../Core/DicomFormat/DicomMap.h"
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #include "../Core/SQLite/ITransaction.h"
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include "../Core/FileStorage/FileInfo.h"
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 #include "IServerIndexListener.h"
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include "ExportedResource.h"
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 #include <list>
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 #include <boost/noncopyable.hpp>
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 namespace Orthanc
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 class IDatabaseWrapper : public boost::noncopyable
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 public:
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 virtual ~IDatabaseWrapper()
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 {
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 }
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 virtual void AddAttachment(int64_t id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 const FileInfo& attachment) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 virtual void AttachChild(int64_t parent,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 int64_t child) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58
1286
b4acdb37e43b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1252
diff changeset
59 virtual void ClearChanges() = 0;
b4acdb37e43b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1252
diff changeset
60
b4acdb37e43b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1252
diff changeset
61 virtual void ClearExportedResources() = 0;
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 virtual int64_t CreateResource(const std::string& publicId,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 ResourceType type) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 virtual void DeleteAttachment(int64_t id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 FileContentType attachment) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 virtual void DeleteMetadata(int64_t id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 MetadataType type) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 virtual void DeleteResource(int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 virtual void FlushToDisk() = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 virtual void GetAllMetadata(std::map<MetadataType, std::string>& result,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 virtual void GetAllPublicIds(std::list<std::string>& target,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 ResourceType resourceType) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 virtual void GetChanges(std::list<ServerIndexChange>& target /*out*/,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 bool& done /*out*/,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 int64_t since,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 unsigned int maxResults) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 virtual void GetChildrenInternalId(std::list<int64_t>& result,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 virtual void GetChildrenPublicId(std::list<std::string>& result,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 virtual void GetExportedResources(std::list<ExportedResource>& target /*out*/,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 bool& done /*out*/,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 int64_t since,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 unsigned int maxResults) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 virtual void GetLastChange(std::list<ServerIndexChange>& target /*out*/) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 virtual void GetLastExportedResource(std::list<ExportedResource>& target /*out*/) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 virtual void GetMainDicomTags(DicomMap& map,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 virtual std::string GetPublicId(int64_t resourceId) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 virtual uint64_t GetResourceCount(ResourceType resourceType) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 virtual ResourceType GetResourceType(int64_t resourceId) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 virtual uint64_t GetTotalCompressedSize() = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 virtual uint64_t GetTotalUncompressedSize() = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 virtual bool IsExistingResource(int64_t internalId) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 virtual bool IsProtectedPatient(int64_t internalId) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 virtual void ListAvailableMetadata(std::list<MetadataType>& target,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 virtual void ListAvailableAttachments(std::list<FileContentType>& result,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 int64_t id) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 virtual void LogChange(int64_t internalId,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 const ServerIndexChange& change) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 virtual void LogExportedResource(const ExportedResource& resource) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 virtual bool LookupAttachment(FileInfo& attachment,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 int64_t id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 FileContentType contentType) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 virtual bool LookupGlobalProperty(std::string& target,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 GlobalProperty property) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 virtual void LookupIdentifier(std::list<int64_t>& result,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 const DicomTag& tag,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 const std::string& value) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 virtual void LookupIdentifier(std::list<int64_t>& result,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 const std::string& value) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 virtual bool LookupMetadata(std::string& target,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 int64_t id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 MetadataType type) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 virtual bool LookupParent(int64_t& parentId,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 int64_t resourceId) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 virtual bool LookupResource(const std::string& publicId,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 int64_t& id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 ResourceType& type) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 virtual bool SelectPatientToRecycle(int64_t& internalId) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 virtual bool SelectPatientToRecycle(int64_t& internalId,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 int64_t patientIdToAvoid) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 virtual void SetGlobalProperty(GlobalProperty property,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 const std::string& value) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
1286
b4acdb37e43b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1252
diff changeset
164 virtual void SetMainDicomTag(int64_t id,
b4acdb37e43b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1252
diff changeset
165 const DicomTag& tag,
b4acdb37e43b refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1252
diff changeset
166 const std::string& value) = 0;
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 virtual void SetMetadata(int64_t id,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 MetadataType type,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 const std::string& value) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 virtual void SetProtectedPatient(int64_t internalId,
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 bool isProtected) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 virtual SQLite::ITransaction* StartTransaction() = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 virtual void SetListener(IServerIndexListener& listener) = 0;
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 };
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 }