Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
iobjectprovider.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018-2025 QuasarApp.
3
* Distributed under the lgplv3 software license, see the accompanying
4
* Everyone is permitted to copy and distribute verbatim copies
5
* of this license document, but changing it is not allowed.
6
*/
7
8
#include "
iobjectprovider.h
"
9
10
namespace
QH
{
11
using namespace
PKG
;
12
13
QSharedPointer<DBObject>
iObjectProvider::getObjectRaw
(
14
const
DBObject
&templateVal) {
15
16
if
(!
dynamic_cast<
const
DBObject
*
>
(&templateVal)) {
17
return
nullptr
;
18
}
19
20
QList<QSharedPointer<PKG::DBObject>> list;
21
if
(!
getAllObjects
(templateVal, list)) {
22
return
nullptr
;
23
}
24
25
if
(!list.size())
26
return
nullptr
;
27
28
if
(list.size() > 1) {
29
qWarning() <<
"getObject method returned more than one object,"
30
" the first object was selected as the result,"
31
" all the rest were lost."
;
32
}
33
34
return
list.first();
35
}
36
37
}
QH::PKG::DBObject
The DBObject class- main class for work with data base.
Definition
dbobject.h:94
QH::iObjectProvider::getObjectRaw
QSharedPointer< PKG::DBObject > getObjectRaw(const PKG::DBObject &templateVal)
getObjectRaw This method return object without test object type.
Definition
iobjectprovider.cpp:13
QH::iObjectProvider::getAllObjects
virtual bool getAllObjects(const PKG::DBObject &templateObject, QList< QSharedPointer< PKG::DBObject > > &result)=0
getAllObjects This method execute a select method of the templateObject and return list of all select...
iobjectprovider.h
QH::PKG
The PKG namesapce - this namespace contains all default packages of the Heart library....
Definition
heart.h:211
QH
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition
heart.cpp:13
src
public
iobjectprovider.cpp
Generated by
1.18.0