1 /**
2  * UGENE - Integrated Bioinformatics Tools.
3  * Copyright (C) 2008-2021 UniPro <ugene@unipro.ru>
4  * http://ugene.net
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  */
21 
22 #include "U2Dbi.h"
23 
24 #include <U2Core/U2SafePoints.h>
25 #include <U2Core/Version.h>
26 
27 namespace U2 {
28 
29 const QString U2DbiOptions::APP_MIN_COMPATIBLE_VERSION(QString("Minimum version of ") + U2_PRODUCT_KEY + " compatible with the schema");
30 
31 const int U2DbiOptions::U2_DBI_NO_LIMIT = -1;
32 
33 const QString U2DbiOptions::U2_DBI_OPTION_URL("url");
34 
35 const QString U2DbiOptions::U2_DBI_OPTION_CREATE("create");
36 
37 const QString U2DbiOptions::U2_DBI_OPTION_PASSWORD("password");
38 
39 const QString U2DbiOptions::U2_DBI_VALUE_ON("1");
40 
41 const QString U2DbiOptions::U2_DBI_LOCKING_MODE("locking_mode");
42 
43 //////////////////////////////////////////////////////////////////////////
44 // U2DbiFactory
45 
U2DbiFactory()46 U2DbiFactory::U2DbiFactory() {
47 }
48 
~U2DbiFactory()49 U2DbiFactory::~U2DbiFactory() {
50 }
51 
52 //////////////////////////////////////////////////////////////////////////
53 // U2Dbi
54 
~U2Dbi()55 U2Dbi::~U2Dbi() {
56 }
57 
getDbiRef() const58 U2DbiRef U2Dbi::getDbiRef() const {
59     return U2DbiRef(getFactoryId(), getDbiId());
60 }
61 
isInitialized(U2OpStatus &)62 bool U2Dbi::isInitialized(U2OpStatus &) {
63     return false;
64 }
65 
populateDefaultSchema(U2OpStatus &)66 void U2Dbi::populateDefaultSchema(U2OpStatus &) {
67 }
68 
getObjectRelationsDbi()69 U2ObjectRelationsDbi *U2Dbi::getObjectRelationsDbi() {
70     return nullptr;
71 }
72 
startOperationsBlock(U2OpStatus &)73 void U2Dbi::startOperationsBlock(U2OpStatus &) {
74 }
75 
stopOperationBlock(U2OpStatus &)76 void U2Dbi::stopOperationBlock(U2OpStatus &) {
77 }
78 
getDbMutex() const79 QMutex *U2Dbi::getDbMutex() const {
80     return nullptr;
81 }
82 
setVersionProperties(const Version & minVersion,U2OpStatus & os)83 void U2Dbi::setVersionProperties(const Version &minVersion, U2OpStatus &os) {
84     setProperty(U2DbiOptions::APP_MIN_COMPATIBLE_VERSION, minVersion.text, os);
85 }
86 
87 //////////////////////////////////////////////////////////////////////////
88 // U2ChildDbi
89 
U2ChildDbi(U2Dbi * _rootDbi)90 U2ChildDbi::U2ChildDbi(U2Dbi *_rootDbi)
91     : rootDbi(_rootDbi) {
92 }
93 
~U2ChildDbi()94 U2ChildDbi::~U2ChildDbi() {
95 }
96 
getRootDbi() const97 U2Dbi *U2ChildDbi::getRootDbi() const {
98     return rootDbi;
99 }
100 
101 }  // namespace U2
102