Mercurial > hg > orthanc
annotate OrthancServer/Sources/Database/BaseDatabaseWrapper.h @ 5854:65f8c6dfba50 find-refactoring
cleanup
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 04 Nov 2024 17:51:46 +0100 |
parents | 70a879a7b658 |
children |
rev | line source |
---|---|
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
1 /** |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
2 * Orthanc - A Lightweight, RESTful DICOM Store |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
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:
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 |
5498
c5a274851b23
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5466
diff
changeset
|
7 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
8 * |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
9 * This program is free software: you can redistribute it and/or |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
10 * modify it under the terms of the GNU General Public License as |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
11 * published by the Free Software Foundation, either version 3 of the |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
12 * License, or (at your option) any later version. |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
13 * |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
14 * This program is distributed in the hope that it will be useful, but |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
15 * WITHOUT ANY WARRANTY; without even the implied warranty of |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
17 * General Public License for more details. |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
18 * |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
19 * You should have received a copy of the GNU General Public License |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
20 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
21 **/ |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
22 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
23 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
24 #pragma once |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
25 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
26 #include "IDatabaseWrapper.h" |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
27 |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
28 namespace Orthanc |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
29 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
30 /** |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
31 * This class provides a default "not implemented" implementation |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
32 * for all recent methods (1.12.X) |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
33 **/ |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
34 class BaseDatabaseWrapper : public IDatabaseWrapper |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
35 { |
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
36 public: |
5847
70a879a7b658
introduction of IDatabaseWrapper::ICompatibilityTransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5837
diff
changeset
|
37 class BaseTransaction : |
70a879a7b658
introduction of IDatabaseWrapper::ICompatibilityTransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5837
diff
changeset
|
38 public IDatabaseWrapper::ITransaction, |
70a879a7b658
introduction of IDatabaseWrapper::ICompatibilityTransaction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5837
diff
changeset
|
39 public IDatabaseWrapper::ICompatibilityTransaction |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
40 { |
5516 | 41 public: |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
42 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:
diff
changeset
|
43 int64_t increment, |
5516 | 44 bool shared) ORTHANC_OVERRIDE; |
5466
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
45 |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
46 virtual void UpdateAndGetStatistics(int64_t& patientsCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
47 int64_t& studiesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
48 int64_t& seriesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
49 int64_t& instancesCount, |
dceed5e3d6a9
new DB plugin primitive: UpdateAndGetStatistics
Alain Mazy <am@osimis.io>
parents:
5455
diff
changeset
|
50 int64_t& compressedSize, |
5516 | 51 int64_t& uncompressedSize) ORTHANC_OVERRIDE; |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
52 |
5837 | 53 virtual void ExecuteCount(uint64_t& count, |
54 const FindRequest& request, | |
55 const Capabilities& capabilities) ORTHANC_OVERRIDE; | |
56 | |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
57 virtual void ExecuteFind(FindResponse& response, |
5677
dc96401dbe88
starting the refactoring of /tools/find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5641
diff
changeset
|
58 const FindRequest& request, |
dc96401dbe88
starting the refactoring of /tools/find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5641
diff
changeset
|
59 const Capabilities& capabilities) ORTHANC_OVERRIDE; |
5593
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 virtual void ExecuteFind(std::list<std::string>& identifiers, |
5720
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
62 const Capabilities& capabilities, |
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
63 const FindRequest& request) ORTHANC_OVERRIDE; |
5593
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 virtual void ExecuteExpand(FindResponse& response, |
5720
89d559e67b03
fix compatibility with old database plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5677
diff
changeset
|
66 const Capabilities& capabilities, |
5593
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) ORTHANC_OVERRIDE; |
5758 | 69 |
5757 | 70 virtual void GetChangesExtended(std::list<ServerIndexChange>& target /*out*/, |
71 bool& done /*out*/, | |
72 int64_t since, | |
73 int64_t to, | |
74 uint32_t limit, | |
5804
25df40a274fd
/changes: allowing filtering on multiple changes
Alain Mazy <am@orthanc.team>
parents:
5758
diff
changeset
|
75 const std::set<ChangeType>& filterType) ORTHANC_OVERRIDE; |
5455
176bc05f85f4
DB: new Capabilities class to manage future new methods from DB plugins + Added IncrementGlobalProperty
Alain Mazy <am@osimis.io>
parents:
diff
changeset
|
76 }; |
5518 | 77 |
78 virtual uint64_t MeasureLatency() ORTHANC_OVERRIDE; | |
5593
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
79 |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
80 virtual bool HasIntegratedFind() const ORTHANC_OVERRIDE |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
81 { |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
diff
changeset
|
82 return false; |
862b54b4cfe2
implemented the default multi-stage find/expand
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5518
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:
diff
changeset
|
84 }; |
5516 | 85 } |