|
ImagingTools Core SDK
|
SQL-specific extension of IObjectCollection for database-backed object collections. More...
#include <ISqlDatabaseObjectCollection.h>
Public Member Functions | |
| virtual QByteArray | GetDatabaseId () const =0 |
| Gets the unique identifier of the database hosting this collection. | |
| virtual bool | AreInternalTransactionsEnabled () const =0 |
| Checks if internal transactions are enabled for this collection. | |
| virtual bool | SetInternalTransactionsEnabled (bool isEnabled)=0 |
| Enables or disables internal transaction wrapping. | |
Public Member Functions inherited from imtbase::IObjectCollection | |
| virtual const IRevisionController * | GetRevisionController () const =0 |
| virtual const ICollectionDataController * | GetDataController () const =0 |
| virtual int | GetOperationFlags (const Id &elementId=Id()) const =0 |
| virtual Id | InsertNewObject (const QByteArray &typeId, const QString &name, const QString &description, const istd::IChangeable *defaultValuePtr=nullptr, const Id &proposedElementId=Id(), const idoc::IDocumentMetaInfo *dataMetaInfoPtr=nullptr, const idoc::IDocumentMetaInfo *elementMetaInfoPtr=nullptr, const IOperationContext *operationContextPtr=nullptr)=0 |
| virtual bool | RemoveElements (const Ids &elementIds, const IOperationContext *operationContextPtr=nullptr)=0 |
| virtual bool | RemoveElementSet (const iprm::IParamsSet *selectionParamsPtr=nullptr, const IOperationContext *operationContextPtr=nullptr)=0 |
| virtual bool | RestoreObjects (const Ids &objectIds, const IOperationContext *operationContextPtr=nullptr)=0 |
| virtual bool | RestoreObjectSet (const iprm::IParamsSet *selectionParamsPtr=nullptr, const IOperationContext *operationContextPtr=nullptr)=0 |
| virtual const istd::IChangeable * | GetObjectPtr (const Id &objectId) const =0 |
| template<typename Interface > | |
| const Interface * | GetObjectPtr (const Id &objectId) const |
| virtual bool | GetObjectData (const Id &objectId, DataPtr &dataPtr, const iprm::IParamsSet *dataConfigurationPtr=nullptr) const =0 |
| virtual bool | SetObjectData (const Id &objectId, const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS, const IOperationContext *operationContextPtr=nullptr)=0 |
| virtual istd::TUniqueInterfacePtr< IObjectCollection > | CreateSubCollection (int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr) const =0 |
| virtual imtbase::IObjectCollectionIterator * | CreateObjectCollectionIterator (const QByteArray &objectId=QByteArray(), int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr) const =0 |
| virtual void | ResetObjectIds () |
Public Member Functions inherited from imtbase::IObjectCollectionInfo | |
| virtual const iprm::IOptionsList * | GetObjectTypesInfo () const =0 |
| virtual Id | GetObjectTypeId (const Id &objectId) const =0 |
| virtual idoc::MetaInfoPtr | GetDataMetaInfo (const Id &objectId) const =0 |
Public Member Functions inherited from imtbase::ICollectionInfo | |
| virtual int | GetElementsCount (const iprm::IParamsSet *selectionParamsPtr=nullptr, ilog::IMessageConsumer *logPtr=nullptr) const =0 |
| virtual Ids | GetElementIds (int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr, ilog::IMessageConsumer *logPtr=nullptr) const =0 |
| virtual bool | GetSubsetInfo (ICollectionInfo &subsetInfo, int offset=0, int count=-1, const iprm::IParamsSet *selectionParamsPtr=nullptr, ilog::IMessageConsumer *logPtr=nullptr) const =0 |
| virtual QVariant | GetElementInfo (const Id &elementId, int infoType, ilog::IMessageConsumer *logPtr=nullptr) const =0 |
| virtual idoc::MetaInfoPtr | GetElementMetaInfo (const Id &elementId, ilog::IMessageConsumer *logPtr=nullptr) const =0 |
| virtual bool | SetElementName (const Id &elementId, const QString &name, ilog::IMessageConsumer *logPtr=nullptr)=0 |
| virtual bool | SetElementDescription (const Id &elementId, const QString &description, ilog::IMessageConsumer *logPtr=nullptr)=0 |
| virtual bool | SetElementEnabled (const Id &elementId, bool isEnabled=true, ilog::IMessageConsumer *logPtr=nullptr)=0 |
Additional Inherited Members | |
Public Types inherited from imtbase::IObjectCollection | |
| enum | OperationalFlags { OF_SUPPORT_RENAME = 1 , OF_SUPPORT_INSERT = 2 , OF_SUPPORT_DELETE = 4 , OF_SUPPORT_EDIT = 8 , OF_SUPPORT_USING = 16 , OF_SUPPORT_PAGINATION = 32 , OF_ALL = OF_SUPPORT_RENAME | OF_SUPPORT_INSERT | OF_SUPPORT_DELETE | OF_SUPPORT_EDIT | OF_SUPPORT_USING | OF_SUPPORT_PAGINATION } |
Public Types inherited from imtbase::ICollectionInfo | |
| enum | ChangeFlags { CF_ADDED = 10000 , CF_ELEMENT_RENAMED , CF_ELEMENT_DESCRIPTION_CHANGED , CF_ELEMENT_STATE , CF_REMOVED , CF_RESTORED , CF_LAST } |
| enum | ElementInfoType { EIT_NAME , EIT_DESCRIPTION , EIT_ENABLED , EIT_USER = 1000 } |
| enum | MetaInfoType { MIT_INSERTION_USER = idoc::IDocumentMetaInfo::MIT_USER + 10000 , MIT_INSERTION_TIME , MIT_LAST_OPERATION_USER , MIT_LAST_OPERATION_TIME , MIT_PREVIEW_THUMBNAIL , MIT_REVISION = idoc::IDocumentMetaInfo::MIT_USER + 20000 } |
SQL-specific extension of IObjectCollection for database-backed object collections.
ISqlDatabaseObjectCollection extends the base IObjectCollection interface with SQL-specific functionality, particularly transaction management control. This interface is used by collections that store objects in SQL databases (PostgreSQL, SQLite, etc.).
Key features:
The collection supports two transaction modes:
Internal Transactions Enabled (default):
Internal Transactions Disabled:
Definition at line 59 of file ISqlDatabaseObjectCollection.h.
|
pure virtual |
Checks if internal transactions are enabled for this collection.
Returns whether the collection automatically wraps each operation (insert, update, delete) in its own transaction.
|
pure virtual |
Gets the unique identifier of the database hosting this collection.
Returns a unique identifier for the database connection used by this collection. Useful for:
|
pure virtual |
Enables or disables internal transaction wrapping.
Controls whether each collection operation runs in its own transaction.
When to disable internal transactions:
When to enable internal transactions:
| isEnabled | true to enable internal transactions, false to disable |