Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/BaseDatabaseWrapper.cpp @ 5593:862b54b4cfe2 find-refactoring
implemented the default multi-stage find/expand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 04 May 2024 11:35:34 +0200 |
parents | bbe45a71f5cd |
children | 4640b7ae9a11 |
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 | |
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium | |
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
7 * | |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU General Public License as | |
10 * published by the Free Software Foundation, either version 3 of the | |
11 * License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 #include "BaseDatabaseWrapper.h" | |
24 | |
25 #include "../../../OrthancFramework/Sources/OrthancException.h" | |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
26 #include "Compatibility/GenericFind.h" |
5516 | 27 |
28 namespace Orthanc | |
29 { | |
30 int64_t BaseDatabaseWrapper::BaseTransaction::IncrementGlobalProperty(GlobalProperty property, | |
31 int64_t increment, | |
32 bool shared) | |
33 { | |
34 throw OrthancException(ErrorCode_NotImplemented); // Not supported | |
35 } | |
36 | |
37 | |
38 void BaseDatabaseWrapper::BaseTransaction::UpdateAndGetStatistics(int64_t& patientsCount, | |
39 int64_t& studiesCount, | |
40 int64_t& seriesCount, | |
41 int64_t& instancesCount, | |
42 int64_t& compressedSize, | |
43 int64_t& uncompressedSize) | |
44 { | |
45 throw OrthancException(ErrorCode_NotImplemented); // Not supported | |
46 } | |
5518 | 47 |
48 | |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
49 void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(FindResponse& response, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
50 const FindRequest& request, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
51 const std::vector<DatabaseConstraint>& normalized) |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
52 { |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
53 throw OrthancException(ErrorCode_NotImplemented); // Not supported |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
54 } |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
55 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
56 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
57 void BaseDatabaseWrapper::BaseTransaction::ExecuteFind(std::list<std::string>& identifiers, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
58 const FindRequest& request, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
59 const std::vector<DatabaseConstraint>& normalized) |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
60 { |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
61 Compatibility::GenericFind find(*this); |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
62 find.ExecuteFind(identifiers, request, normalized); |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
63 } |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
64 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
65 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
66 void BaseDatabaseWrapper::BaseTransaction::ExecuteExpand(FindResponse& response, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
67 const FindRequest& request, |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
68 const std::string& identifier) |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
69 { |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
70 Compatibility::GenericFind find(*this); |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
71 find.ExecuteExpand(response, request, identifier); |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
72 } |
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 |
5518 | 75 uint64_t BaseDatabaseWrapper::MeasureLatency() |
76 { | |
77 throw OrthancException(ErrorCode_NotImplemented); // only implemented in V4 | |
78 } | |
5516 | 79 } |