ImagingTools Core SDK
Public Member Functions | List of all members
imtmongo::IMongoDatabaseObjectDelegateabstract

#include <IMongoDatabaseObjectDelegate.h>

Inherits istd::IPolymorphic.

Inherited by imtmongo::CMongoDatabaseObjectDelegateCompBase [virtual].

Public Member Functions

virtual const iprm::IOptionsList * GetObjectTypeInfos () const =0
 
virtual QByteArray GetObjectTypeId (const QByteArray &objectId) const =0
 
virtual bsoncxx::document::view_or_value GetCountQuery (const iprm::IParamsSet *paramsPtr=nullptr) const =0
 
virtual bsoncxx::document::view_or_value GetSelectionQuery (const QByteArray &objectId=QByteArray(), int offset=0, int count=-1, const iprm::IParamsSet *paramsPtr=nullptr) const =0
 
virtual bsoncxx::document::view_or_value CreateNewObjectQuery (const QByteArray &typeId, const QByteArray &proposedObjectId, const QString &objectName, const QString &objectDescription, const istd::IChangeable *valuePtr) const =0
 
virtual bsoncxx::document::view_or_value CreateDeleteObjectQuery (const QByteArray &objectId) const =0
 
virtual bsoncxx::document::view_or_value CreateUpdateObjectQuery (const QByteArray &objectId, const istd::IChangeable &object, bool useExternDelegate=true) const =0
 
virtual bsoncxx::document::view_or_value CreateDataMetaInfoQuery (const imtbase::IObjectCollection &collection, const QByteArray &objectId, const idoc::IDocumentMetaInfo *dataMetaInfoPtr) const =0
 
virtual bsoncxx::document::view_or_value CreateCollectionItemMetaInfoQuery (const imtbase::IObjectCollection &collection, const QByteArray &objectId, const idoc::IDocumentMetaInfo *collectionItemMetaInfoPtr) const =0
 
virtual QByteArray GetObjectIdFromRecord (const bsoncxx::document::view &doc) const =0
 
virtual bool CreateObjectInfoFromRecord (const bsoncxx::document::view &doc, idoc::MetaInfoPtr &objectMetaInfoPtr, idoc::MetaInfoPtr &collectionItemMetaInfoPtr) const =0
 
virtual istd::IChangeable * CreateObjectFromRecord (const bsoncxx::document::view &doc) const =0
 
virtual QVariant GetElementInfoFromRecord (const bsoncxx::document::view &doc, const QString &infoId) const =0
 

Detailed Description

Common interface for a Mongo database object delegate.

Definition at line 20 of file IMongoDatabaseObjectDelegate.h.

Member Function Documentation

◆ CreateCollectionItemMetaInfoQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::CreateCollectionItemMetaInfoQuery ( const imtbase::IObjectCollection collection,
const QByteArray &  objectId,
const idoc::IDocumentMetaInfo *  collectionItemMetaInfoPtr 
) const
pure virtual

Create query for setting the collection-related meta-information for the given object in the database.

◆ CreateDataMetaInfoQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::CreateDataMetaInfoQuery ( const imtbase::IObjectCollection collection,
const QByteArray &  objectId,
const idoc::IDocumentMetaInfo *  dataMetaInfoPtr 
) const
pure virtual

Create query for setting the meta-information for the given object in the database.

◆ CreateDeleteObjectQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::CreateDeleteObjectQuery ( const QByteArray &  objectId) const
pure virtual

Create query for the deletion of the object from the database.

◆ CreateNewObjectQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::CreateNewObjectQuery ( const QByteArray &  typeId,
const QByteArray &  proposedObjectId,
const QString &  objectName,
const QString &  objectDescription,
const istd::IChangeable *  valuePtr 
) const
pure virtual

Create query for insertion of a new object into the database.

◆ CreateObjectFromRecord()

virtual istd::IChangeable * imtmongo::IMongoDatabaseObjectDelegate::CreateObjectFromRecord ( const bsoncxx::document::view &  doc) const
pure virtual

Create a data object for the given bson document.

◆ CreateObjectInfoFromRecord()

virtual bool imtmongo::IMongoDatabaseObjectDelegate::CreateObjectInfoFromRecord ( const bsoncxx::document::view &  doc,
idoc::MetaInfoPtr &  objectMetaInfoPtr,
idoc::MetaInfoPtr &  collectionItemMetaInfoPtr 
) const
pure virtual

Create object meta-informations based on the bson document.

◆ CreateUpdateObjectQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::CreateUpdateObjectQuery ( const QByteArray &  objectId,
const istd::IChangeable &  object,
bool  useExternDelegate = true 
) const
pure virtual

Create query for the update an existing object in the collection.

◆ GetCountQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::GetCountQuery ( const iprm::IParamsSet *  paramsPtr = nullptr) const
pure virtual

Get query for getting of count of objects in the collection, optionaly filtered by some criteria.

◆ GetElementInfoFromRecord()

virtual QVariant imtmongo::IMongoDatabaseObjectDelegate::GetElementInfoFromRecord ( const bsoncxx::document::view &  doc,
const QString &  infoId 
) const
pure virtual

Create object meta-information element based on the bson document.

◆ GetObjectIdFromRecord()

virtual QByteArray imtmongo::IMongoDatabaseObjectDelegate::GetObjectIdFromRecord ( const bsoncxx::document::view &  doc) const
pure virtual

Get ID of the object in the database from the bson document .

◆ GetObjectTypeId()

virtual QByteArray imtmongo::IMongoDatabaseObjectDelegate::GetObjectTypeId ( const QByteArray &  objectId) const
pure virtual

Get type-ID of the object.

◆ GetObjectTypeInfos()

virtual const iprm::IOptionsList * imtmongo::IMongoDatabaseObjectDelegate::GetObjectTypeInfos ( ) const
pure virtual

Get information about supported object types.

◆ GetSelectionQuery()

virtual bsoncxx::document::view_or_value imtmongo::IMongoDatabaseObjectDelegate::GetSelectionQuery ( const QByteArray &  objectId = QByteArray(),
int  offset = 0,
int  count = -1,
const iprm::IParamsSet *  paramsPtr = nullptr 
) const
pure virtual

Get selection query for the listing objects in the collection.

Parameters
objectIdIf non empty, the given object will be selected.
offsetif positive, first N rows given by offset will be skipped from the result.
countif positive, only N rows given by count will be returned in the result object.
paramsPtradditional query parameters (e.g. filtering, searching, sorting and so on).