ImagingTools Core SDK
CUserGroupDatabaseDelegateComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ImtCore includes
6#include <imtdb/CSqlDatabaseDocumentDelegateComp.h>
7
8
9namespace imtauthdb
10{
11
12
13class CUserGroupDatabaseDelegateComp: public imtdb::CSqlDatabaseDocumentDelegateComp
14{
15public:
16 typedef imtdb::CSqlDatabaseDocumentDelegateComp BaseClass;
17
18 I_BEGIN_COMPONENT(CUserGroupDatabaseDelegateComp)
19 I_ASSIGN(m_userDatabaseDelegateCompPtr, "UserDatabaseSqlDelegate", "User database sql delegate", true, "UserDatabaseSqlDelegate");
20 I_ASSIGN(m_userCollectionCompPtr, "UserCollection", "Users collection", true, "UserCollection");
21 I_END_COMPONENT
22
23 // reimplemented (imtdb::ISqlDatabaseObjectDelegate)
24 virtual NewObjectQuery CreateNewObjectQuery(
25 const QByteArray& typeId,
26 const QByteArray& proposedObjectId,
27 const QString& objectName,
28 const QString& objectDescription,
29 const istd::IChangeable* valuePtr,
30 const imtbase::IOperationContext* operationContextPtr = nullptr) const override;
31 virtual QByteArray CreateUpdateObjectQuery(
32 const imtbase::IObjectCollection& collection,
33 const QByteArray& objectId,
34 const istd::IChangeable& object,
35 const imtbase::IOperationContext* operationContextPtr = nullptr,
36 bool useExternDelegate = true) const override;
37 virtual QString CreateAdditionalFiltersQuery(const iprm::IParamsSet& filterParams) const override;
38
39private:
40 I_REF(imtdb::ISqlDatabaseObjectDelegate, m_userDatabaseDelegateCompPtr);
41 I_REF(imtbase::IObjectCollection, m_userCollectionCompPtr);
42};
43
44
45} // namespace imtauthdb
46
47
Authentication Database Persistence Layer Module.