Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/IDatabaseWrapper.h @ 5673:ebcbb448bea8 find-refactoring
improved memory
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 06 Jul 2024 14:31:22 +0200 |
parents | 3f13db27b399 |
children | dc96401dbe88 |
rev | line source |
---|---|
1247 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1286
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
5640
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5485
48b8dae6dc77
upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5249
diff
changeset
|
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1247 | 8 * |
9 * This program is free software: you can redistribute it and/or | |
10 * modify it under the terms of the GNU General Public License as | |
11 * published by the Free Software Foundation, either version 3 of the | |
12 * License, or (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, but | |
15 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 * General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #pragma once | |
25 | |
4045 | 26 #include "../../../OrthancFramework/Sources/DicomFormat/DicomMap.h" |
27 #include "../../../OrthancFramework/Sources/FileStorage/FileInfo.h" | |
28 #include "../../../OrthancFramework/Sources/FileStorage/IStorageArea.h" | |
3093
2e1808b6146a
reorganization of folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3091
diff
changeset
|
29 #include "../ExportedResource.h" |
5248
a7d95f951f8a
replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5221
diff
changeset
|
30 #include "../Search/ISqlLookupFormatter.h" |
4571
9224e107d613
simplifying IDatabaseListener::SignalChange() as IDatabaseListener::SignalResourceDeleted()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4570
diff
changeset
|
31 #include "../ServerIndexChange.h" |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
32 #include "FindRequest.h" |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
33 #include "FindResponse.h" |
3094
61da3c9b4121
cont reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3093
diff
changeset
|
34 #include "IDatabaseListener.h" |
1247 | 35 |
36 #include <list> | |
37 #include <boost/noncopyable.hpp> | |
4514
5b929e6b3c36
removal of "dicom-as-json" attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
38 #include <set> |
1247 | 39 |
40 namespace Orthanc | |
41 { | |
3100
f6de9d25b20d
removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3094
diff
changeset
|
42 class DatabaseConstraint; |
3083
683d572424b6
IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3082
diff
changeset
|
43 class ResourcesContent; |
683d572424b6
IDatabaseWrapper::SetResourcesContent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3082
diff
changeset
|
44 |
1247 | 45 class IDatabaseWrapper : public boost::noncopyable |
46 { | |
47 public: | |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
48 class Capabilities |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
49 { |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
50 private: |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
51 bool hasFlushToDisk_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
52 bool hasRevisionsSupport_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
53 bool hasLabelsSupport_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
54 bool hasAtomicIncrementGlobalProperty_; |
5466
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
55 bool hasUpdateAndGetStatistics_; |
5493
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
56 bool hasMeasureLatency_; |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
57 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
58 public: |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
59 Capabilities() : |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
60 hasFlushToDisk_(false), |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
61 hasRevisionsSupport_(false), |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
62 hasLabelsSupport_(false), |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
63 hasAtomicIncrementGlobalProperty_(false), |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
64 hasUpdateAndGetStatistics_(false), |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
65 hasMeasureLatency_(false) |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
66 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
67 } |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
68 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
69 void SetFlushToDisk(bool value) |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
70 { |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
71 hasFlushToDisk_ = value; |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
72 } |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
73 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
74 bool HasFlushToDisk() const |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
75 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
76 return hasFlushToDisk_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
77 } |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
78 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
79 void SetRevisionsSupport(bool value) |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
80 { |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
81 hasRevisionsSupport_ = value; |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
82 } |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
83 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
84 bool HasRevisionsSupport() const |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
85 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
86 return hasRevisionsSupport_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
87 } |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
88 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
89 void SetLabelsSupport(bool value) |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
90 { |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
91 hasLabelsSupport_ = value; |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
92 } |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
93 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
94 bool HasLabelsSupport() const |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
95 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
96 return hasLabelsSupport_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
97 } |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
98 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
99 void SetAtomicIncrementGlobalProperty(bool value) |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
100 { |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
101 hasAtomicIncrementGlobalProperty_ = value; |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
102 } |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
103 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
104 bool HasAtomicIncrementGlobalProperty() const |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
105 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
106 return hasAtomicIncrementGlobalProperty_; |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
107 } |
5466
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
108 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
109 void SetUpdateAndGetStatistics(bool value) |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
110 { |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
111 hasUpdateAndGetStatistics_ = value; |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
112 } |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
113 |
5466
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
114 bool HasUpdateAndGetStatistics() const |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
115 { |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
116 return hasUpdateAndGetStatistics_; |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
117 } |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
118 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
119 void SetMeasureLatency(bool value) |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
120 { |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
121 hasMeasureLatency_ = value; |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
122 } |
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
123 |
5493
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
124 bool HasMeasureLatency() const |
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
125 { |
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
126 return hasMeasureLatency_; |
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
127 } |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
128 }; |
5493
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
129 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
130 |
5191 | 131 struct CreateInstanceResult : public boost::noncopyable |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
132 { |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
133 bool isNewPatient_; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
134 bool isNewStudy_; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
135 bool isNewSeries_; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
136 int64_t patientId_; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
137 int64_t studyId_; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
138 int64_t seriesId_; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
139 }; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
140 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
141 |
3019
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
142 class ITransaction : public boost::noncopyable |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
143 { |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
144 public: |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
145 virtual ~ITransaction() |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
146 { |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
147 } |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
148 |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
149 virtual void Rollback() = 0; |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
150 |
4586
1d96fe7e054e
taking StatelessDatabaseOperations out of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4571
diff
changeset
|
151 // The "fileSizeDelta" is used for older database plugins that |
1d96fe7e054e
taking StatelessDatabaseOperations out of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4571
diff
changeset
|
152 // have no fast way to compute the size of all the stored |
1d96fe7e054e
taking StatelessDatabaseOperations out of ServerIndex
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4571
diff
changeset
|
153 // attachments (cf. "fastGetTotalSize_") |
3019
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
154 virtual void Commit(int64_t fileSizeDelta) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
155 |
4627
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4623
diff
changeset
|
156 // A call to "AddAttachment()" guarantees that this attachment |
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4623
diff
changeset
|
157 // is not already existing. This is different from |
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4623
diff
changeset
|
158 // "SetMetadata()" that might have to replace an older value. |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
159 virtual void AddAttachment(int64_t id, |
4627
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4623
diff
changeset
|
160 const FileInfo& attachment, |
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4623
diff
changeset
|
161 int64_t revision) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
162 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
163 virtual void ClearChanges() = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
164 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
165 virtual void ClearExportedResources() = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
166 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
167 virtual void DeleteAttachment(int64_t id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
168 FileContentType attachment) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
169 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
170 virtual void DeleteMetadata(int64_t id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
171 MetadataType type) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
172 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
173 virtual void DeleteResource(int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
174 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
175 virtual void GetAllMetadata(std::map<MetadataType, std::string>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
176 int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
177 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
178 virtual void GetAllPublicIds(std::list<std::string>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
179 ResourceType resourceType) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
180 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
181 virtual void GetAllPublicIds(std::list<std::string>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
182 ResourceType resourceType, |
5213
055428d92772
clarifying types of since/limit in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5193
diff
changeset
|
183 int64_t since, |
055428d92772
clarifying types of since/limit in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5193
diff
changeset
|
184 uint32_t limit) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
185 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
186 virtual void GetChanges(std::list<ServerIndexChange>& target /*out*/, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
187 bool& done /*out*/, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
188 int64_t since, |
5213
055428d92772
clarifying types of since/limit in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5193
diff
changeset
|
189 uint32_t limit) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
190 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
191 virtual void GetChildrenInternalId(std::list<int64_t>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
192 int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
193 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
194 virtual void GetChildrenPublicId(std::list<std::string>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
195 int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
196 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
197 virtual void GetExportedResources(std::list<ExportedResource>& target /*out*/, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
198 bool& done /*out*/, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
199 int64_t since, |
5213
055428d92772
clarifying types of since/limit in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5193
diff
changeset
|
200 uint32_t limit) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
201 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
202 virtual void GetLastChange(std::list<ServerIndexChange>& target /*out*/) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
203 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
204 virtual void GetLastExportedResource(std::list<ExportedResource>& target /*out*/) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
205 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
206 virtual void GetMainDicomTags(DicomMap& map, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
207 int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
208 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
209 virtual std::string GetPublicId(int64_t resourceId) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
210 |
4595
cc64385593ef
added OrthancPluginRegisterDatabaseBackendV3() to plugin sdk
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4591
diff
changeset
|
211 virtual uint64_t GetResourcesCount(ResourceType resourceType) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
212 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
213 virtual ResourceType GetResourceType(int64_t resourceId) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
214 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
215 virtual uint64_t GetTotalCompressedSize() = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
216 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
217 virtual uint64_t GetTotalUncompressedSize() = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
218 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
219 virtual bool IsProtectedPatient(int64_t internalId) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
220 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
221 virtual void ListAvailableAttachments(std::set<FileContentType>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
222 int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
223 |
5216
450ac804d3af
simplifying IDatabaseWrapper::LogChange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5213
diff
changeset
|
224 virtual void LogChange(ChangeType changeType, |
450ac804d3af
simplifying IDatabaseWrapper::LogChange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5213
diff
changeset
|
225 ResourceType resourceType, |
450ac804d3af
simplifying IDatabaseWrapper::LogChange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5213
diff
changeset
|
226 int64_t internalId, |
450ac804d3af
simplifying IDatabaseWrapper::LogChange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5213
diff
changeset
|
227 const std::string& publicId, /* only for compatibility with V1 and V2 plugins */ |
450ac804d3af
simplifying IDatabaseWrapper::LogChange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5213
diff
changeset
|
228 const std::string& date) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
229 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
230 virtual void LogExportedResource(const ExportedResource& resource) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
231 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
232 virtual bool LookupAttachment(FileInfo& attachment, |
4627
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4623
diff
changeset
|
233 int64_t& revision, |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
234 int64_t id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
235 FileContentType contentType) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
236 |
4607
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
237 /** |
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
238 * If "shared" is "true", the property is shared by all the |
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
239 * Orthanc servers that access the same database. If "shared" is |
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
240 * "false", the property is private to the server (cf. the |
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
241 * "DatabaseServerIdentifier" configuration option). |
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
242 **/ |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
243 virtual bool LookupGlobalProperty(std::string& target, |
4607
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
244 GlobalProperty property, |
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
245 bool shared) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
246 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
247 virtual bool LookupMetadata(std::string& target, |
4623
95ffe3b6ef7c
handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4607
diff
changeset
|
248 int64_t& revision, |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
249 int64_t id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
250 MetadataType type) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
251 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
252 virtual bool LookupParent(int64_t& parentId, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
253 int64_t resourceId) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
254 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
255 virtual bool LookupResource(int64_t& id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
256 ResourceType& type, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
257 const std::string& publicId) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
258 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
259 virtual bool SelectPatientToRecycle(int64_t& internalId) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
260 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
261 virtual bool SelectPatientToRecycle(int64_t& internalId, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
262 int64_t patientIdToAvoid) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
263 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
264 virtual void SetGlobalProperty(GlobalProperty property, |
4607
f75c63aa9de0
differentiating between shared and private global properties
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4595
diff
changeset
|
265 bool shared, |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
266 const std::string& value) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
267 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
268 virtual void ClearMainDicomTags(int64_t id) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
269 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
270 virtual void SetMetadata(int64_t id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
271 MetadataType type, |
4623
95ffe3b6ef7c
handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4607
diff
changeset
|
272 const std::string& value, |
95ffe3b6ef7c
handling of revisions for metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4607
diff
changeset
|
273 int64_t revision) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
274 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
275 virtual void SetProtectedPatient(int64_t internalId, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
276 bool isProtected) = 0; |
3019
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
277 |
8336204d95dc
refactoring computation of disk size for recycling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2697
diff
changeset
|
278 |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
279 /** |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
280 * Primitives introduced in Orthanc 1.5.2 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
281 **/ |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
282 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
283 virtual bool IsDiskSizeAbove(uint64_t threshold) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
284 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
285 virtual void ApplyLookupResources(std::list<std::string>& resourcesId, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
286 std::list<std::string>* instancesId, // Can be NULL if not needed |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
287 const std::vector<DatabaseConstraint>& lookup, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
288 ResourceType queryLevel, |
5248
a7d95f951f8a
replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5221
diff
changeset
|
289 const std::set<std::string>& labels, |
a7d95f951f8a
replaced "WithLabels" and "WithoutLabels", by "Labels" and "LabelsConstraint"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5221
diff
changeset
|
290 LabelsConstraint labelsConstraint, |
5213
055428d92772
clarifying types of since/limit in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5193
diff
changeset
|
291 uint32_t limit) = 0; |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
292 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
293 // Returns "true" iff. the instance is new and has been inserted |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
294 // into the database. If "false" is returned, the content of |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
295 // "result" is undefined, but "instanceId" must be properly |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
296 // set. This method must also tag the parent patient as the most |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
297 // recent in the patient recycling order if it is not protected |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
298 // (so as to fix issue #58). |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
299 virtual bool CreateInstance(CreateInstanceResult& result, /* out */ |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
300 int64_t& instanceId, /* out */ |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
301 const std::string& patient, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
302 const std::string& study, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
303 const std::string& series, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
304 const std::string& instance) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
305 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
306 // It is guaranteed that the resources to be modified have no main |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
307 // DICOM tags, and no DICOM identifiers associated with |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
308 // them. However, some metadata might be already existing, and |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
309 // have to be overwritten. |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
310 virtual void SetResourcesContent(const ResourcesContent& content) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
311 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
312 virtual void GetChildrenMetadata(std::list<std::string>& target, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
313 int64_t resourceId, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
314 MetadataType metadata) = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
315 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
316 virtual int64_t GetLastChangeIndex() = 0; |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
317 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
318 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
319 /** |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
320 * Primitives introduced in Orthanc 1.5.4 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
321 **/ |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
322 |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
323 virtual bool LookupResourceAndParent(int64_t& id, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
324 ResourceType& type, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
325 std::string& parentPublicId, |
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
326 const std::string& publicId) = 0; |
5220
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
327 |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
328 |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
329 /** |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
330 * Primitives introduced in Orthanc 1.12.0 |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
331 **/ |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
332 |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
333 virtual void AddLabel(int64_t resource, |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
334 const std::string& label) = 0; |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
335 |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
336 virtual void RemoveLabel(int64_t resource, |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
337 const std::string& label) = 0; |
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
338 |
5249
f22c8fac764b
added "/tools/labels" to list all the labels that are associated with any resource
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5248
diff
changeset
|
339 // List the labels of one single resource |
5221
d0f7c742d397
started implementation of labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5220
diff
changeset
|
340 virtual void ListLabels(std::set<std::string>& target, |
d0f7c742d397
started implementation of labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5220
diff
changeset
|
341 int64_t resource) = 0; |
5249
f22c8fac764b
added "/tools/labels" to list all the labels that are associated with any resource
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5248
diff
changeset
|
342 |
f22c8fac764b
added "/tools/labels" to list all the labels that are associated with any resource
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5248
diff
changeset
|
343 // List all the labels that are present in any resource |
f22c8fac764b
added "/tools/labels" to list all the labels that are associated with any resource
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5248
diff
changeset
|
344 virtual void ListAllLabels(std::set<std::string>& target) = 0; |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
345 |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
346 virtual int64_t IncrementGlobalProperty(GlobalProperty property, |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
347 int64_t increment, |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
5249
diff
changeset
|
348 bool shared) = 0; |
5466
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
349 |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
350 virtual void UpdateAndGetStatistics(int64_t& patientsCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
351 int64_t& studiesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
352 int64_t& seriesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
353 int64_t& instancesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
354 int64_t& compressedSize, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
355 int64_t& uncompressedSize) = 0; |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
356 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
357 /** |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
358 * Primitives introduced in Orthanc 1.12.4 |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
359 **/ |
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
360 |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
361 // This is only implemented if "HasIntegratedFind()" is "true" |
5554
12d8a1a266e9
introduction of FindRequest and FindResponse
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5519
diff
changeset
|
362 virtual void ExecuteFind(FindResponse& response, |
5614
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5593
diff
changeset
|
363 const FindRequest& request) = 0; |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
364 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
365 // This is only implemented if "HasIntegratedFind()" is "false" |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
366 virtual void ExecuteFind(std::list<std::string>& identifiers, |
5614
4640b7ae9a11
moving normalization of constraints into FindRequest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5593
diff
changeset
|
367 const FindRequest& request) = 0; |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
368 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
369 /** |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
370 * This is only implemented if "HasIntegratedFind()" is |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
371 * "false". In this flavor, the resource of interest might have |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
372 * been deleted, as the expansion is not done in the same |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
373 * transaction as the "ExecuteFind()". In such cases, the |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
374 * wrapper should not throw an exception, but simply ignore the |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
375 * request to expand the resource (i.e., "response" must not be |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
376 * modified). |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
377 **/ |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
378 virtual void ExecuteExpand(FindResponse& response, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
379 const FindRequest& request, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
380 const std::string& identifier) = 0; |
3080
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3075
diff
changeset
|
381 }; |
1a75595d8e44
started refactoring of ServerIndex::Store()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3075
diff
changeset
|
382 |
4591
ff8170d17d90
moving all accesses to databases from IDatabaseWrapper to ITransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4589
diff
changeset
|
383 |
1247 | 384 virtual ~IDatabaseWrapper() |
385 { | |
386 } | |
387 | |
1672
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
388 virtual void Open() = 0; |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
389 |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
390 virtual void Close() = 0; |
4c5a85c3ff43
sample database plugin now working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1668
diff
changeset
|
391 |
1247 | 392 virtual void FlushToDisk() = 0; |
393 | |
4589
bec74e29f86b
attaching the listener to transactions in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4586
diff
changeset
|
394 virtual ITransaction* StartTransaction(TransactionType type, |
bec74e29f86b
attaching the listener to transactions in IDatabaseWrapper
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4586
diff
changeset
|
395 IDatabaseListener& listener) = 0; |
1615
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
396 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
397 virtual unsigned int GetDatabaseVersion() = 0; |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
398 |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
399 virtual void Upgrade(unsigned int targetVersion, |
c40fe92a68e7
Primitives to upgrade the database version in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1509
diff
changeset
|
400 IStorageArea& storageArea) = 0; |
4628
5fabef29c4ff
added new primitive "hasRevisionsSupport" in database SDK, added "CheckRevisions" to URI "/system"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4627
diff
changeset
|
401 |
5517
0d433132b249
refactoring IDatabaseWrapper::Capabilities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5497
diff
changeset
|
402 virtual const Capabilities GetDatabaseCapabilities() const = 0; |
5220
df39c7583a49
preparing virtual methods for labels
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5216
diff
changeset
|
403 |
5493
b3ebe249ed5b
At startup, when using a database plugin, display the latency to access the DB
Alain Mazy <am@osimis.io>
parents:
5466
diff
changeset
|
404 virtual uint64_t MeasureLatency() = 0; |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
405 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
406 // Returns "true" iff. the database engine supports the |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
407 // simultaneous find and expansion of resources. |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5568
diff
changeset
|
408 virtual bool HasIntegratedFind() const = 0; |
1247 | 409 }; |
410 } |