Heart 1.3.842.34c2ab5
Heart is base back end library for your c++ Qt projects.
deleteobject.h
Go to the documentation of this file.
1#ifndef DELETEOBJECT_H
2#define DELETEOBJECT_H
3/*
4 * Copyright (C) 2018-2024 QuasarApp.
5 * Distributed under the lgplv3 software license, see the accompanying
6 * Everyone is permitted to copy and distribute verbatim copies
7 * of this license document, but changing it is not allowed.
8*/
9
10#include <dbobject.h>
11#include <itoken.h>
12
13
14namespace QH {
15namespace PKG {
16
27{
28
29public:
31
37 DeleteObject(const DbAddress& address, const QString& primaryKey);
38
39 DeleteObject(const Package& pkg);
40
41 DBObject *createDBObject() const override;
42 DBVariantMap variantMap() const override;
43 const AccessToken &getSignToken() const override;
44 void setSignToken(const AccessToken &token) override;
45
46 bool fromSqlRecord(const QSqlRecord &q) override;
47
48 bool isCached() const override;
49
50 QString table() const override;
51
56 const DbAddress &address() const;
57
62 void setAddress(const DbAddress &newAddress);
63
68 void setPrimaryKey(const QString &newPrimaryKey);
69
70protected:
71 QString primaryKey() const override;
72 QVariant primaryValue() const override;
73
74 QDataStream &fromStream(QDataStream &stream) override;
75 QDataStream &toStream(QDataStream &stream) const override;
76
77private:
78 QString _primaryKey = "id";
79 DbAddress _address;
80 AccessToken _token;
81
82};
83}
84}
85#endif // DELETEOBJECT_H
The AccessToken class contains information duration of the access. Token are byte array for validatio...
Definition accesstoken.h:25
The DbAddress class use to work with database addresses. Database Address it is structure with 2 valu...
Definition dbaddress.h:24
The IToken classes interface for the validation user packages and user dates.
Definition itoken.h:36
The DBObject class- main class for work with data base.
Definition dbobject.h:94
The DeleteObject class is request for update object with dbId;.
The Package struct. This is base structure for transporting data by network between QH nodes....
Definition package.h:23
#define HEARTSHARED_EXPORT
QMap< QString, DBVariant > DBVariantMap
DBVariantMap this is Map with key, and value with data type.
Definition dbobject.h:84
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13