Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/BaseDatabaseWrapper.cpp @ 5847:70a879a7b658 find-refactoring
introduction of IDatabaseWrapper::ICompatibilityTransaction
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Oct 2024 13:46:29 +0000 |
parents | 82fc95cc168c |
children |
rev | line source |
---|---|
5516 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5640
f7adfb22e20e
updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
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:
5518
diff
changeset
|
6 * Copyright (C) 2024-2024 Orthanc Team SRL, Belgium |
5516 | 7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
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 #include "BaseDatabaseWrapper.h" | |
25 | |
26 #include "../../../OrthancFramework/Sources/OrthancException.h" | |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
27 #include "Compatibility/GenericFind.h" |
5516 | 28 |
29 namespace Orthanc | |
30 { | |
31 int64_t BaseDatabaseWrapper::BaseTransaction::IncrementGlobalProperty(GlobalProperty property, | |
32 int64_t increment, | |
33 bool shared) | |
34 { | |
35 throw OrthancException(ErrorCode_NotImplemented); // Not supported | |
36 } | |
37 | |
38 | |
39 void BaseDatabaseWrapper::BaseTransaction::UpdateAndGetStatistics(int64_t& patientsCount, | |
40 int64_t& studiesCount, | |
41 int64_t& seriesCount, | |
42 int64_t& instancesCount, | |
43 int64_t& compressedSize, | |
44 int64_t& uncompressedSize) | |
45 { | |
46 throw OrthancException(ErrorCode_NotImplemented); // Not supported | |
47 } | |
5518 | 48 |
5757 | 49 void BaseDatabaseWrapper::BaseTransaction::GetChangesExtended(std::list<ServerIndexChange>& target /*out*/, |
50 bool& done /*out*/, | |
51 int64_t since, | |
52 int64_t to, | |
53 uint32_t limit, | |
5804
25df40a274fd
/changes: allowing filtering on multiple changes
Alain Mazy <am@orthanc.team>
parents:
5758
diff
changeset
|
54 const std::set<ChangeType>& filterType) |
5553
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5518
diff
changeset
|
55 { |
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5518
diff
changeset
|
56 throw OrthancException(ErrorCode_NotImplemented); // Not supported |
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5518
diff
changeset
|
57 } |
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5518
diff
changeset
|
58 |
28cc06e4859a
Added ExtendedApiV1: /changes
Alain Mazy <am@orthanc.team>
parents:
5518
diff
changeset
|
59 |
5518 | 60 |
5837 | 61 void BaseDatabaseWrapper::BaseTransaction::ExecuteCount(uint64_t& count, |
62 const FindRequest& request, | |
63 const Capabilities& capabilities) | |
64 { | |
65 throw OrthancException(ErrorCode_NotImplemented); // Not supported | |
66 } | |
67 | |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
68 void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(FindResponse& response, |
5677
dc96401dbe88
starting the refactoring of /tools/find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5641
diff
changeset
|
69 const FindRequest& request, |
dc96401dbe88
starting the refactoring of /tools/find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5641
diff
changeset
|
70 const Capabilities& capabilities) |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
71 { |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
72 throw OrthancException(ErrorCode_NotImplemented); // Not supported |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
73 } |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
74 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
75 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
76 void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(std::list<std::string>& identifiers, |
5720
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
77 const Capabilities& capabilities, |
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
78 const FindRequest& request) |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
79 { |
5847
70a879a7b658
introduction of IDatabaseWrapper::ICompatibilityTransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5837
diff
changeset
|
80 Compatibility::GenericFind find(*this, *this); |
5720
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
81 find.ExecuteFind(identifiers, capabilities, request); |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
82 } |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
83 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
84 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
85 void BaseDatabaseWrapper::BaseTransaction::ExecuteExpand(FindResponse& response, |
5720
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
86 const Capabilities& capabilities, |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
87 const FindRequest& request, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
88 const std::string& identifier) |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
89 { |
5847
70a879a7b658
introduction of IDatabaseWrapper::ICompatibilityTransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5837
diff
changeset
|
90 Compatibility::GenericFind find(*this, *this); |
5720
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
91 find.ExecuteExpand(response, capabilities, request, identifier); |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
92 } |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
93 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
94 |
5518 | 95 uint64_t BaseDatabaseWrapper::MeasureLatency() |
96 { | |
97 throw OrthancException(ErrorCode_NotImplemented); // only implemented in V4 | |
98 } | |
5516 | 99 } |