Workspace 6.21.5
Public Member Functions | Protected Member Functions | List of all members
InvalidSqlBoundObjectGroup Class Reference

The InvalidSqlBoundObjectGroup class defines an invalid implementation of the SqlBoundObjectGroup. It is the default constructed value for DataObjects of type SqlBoundObjectGroup. More...

#include <DataAnalysis/DataStructures/sqlboundobjectgroup.h>

Inheritance diagram for InvalidSqlBoundObjectGroup:
[legend]

Public Member Functions

 InvalidSqlBoundObjectGroup ()
 
 InvalidSqlBoundObjectGroup (const InvalidSqlBoundObjectGroup &)=default
 
InvalidSqlBoundObjectGroupclone () const override
 
InvalidSqlBoundObjectGroupdeepCopy () const override
 
QSqlQuery getInsertQuery (const SqlDataModel &model, const QStringList &relations, const QString &foreignKeyName=QString(), const QVariant &foreignKeyValue=QVariant()) const override
 
QSqlQuery getUpdateQuery (const SqlDataModel &model, const QStringList &relations, const QString &foreignKeyName=QString(), const QVariant &foreignKeyValue=QVariant()) const override
 
- Public Member Functions inherited from SqlBoundObjectGroup
 ~SqlBoundObjectGroup () override
 
SqlBoundObjectGroupclone () const override=0
 
virtual SqlBoundObjectGroupdeepCopy () const =0
 
void detach (bool recursive=false)
 
QStringList getAutoIncrementFieldNames () const
 
QString getBoundTableName () const
 
QStringList getCompositePrimaryKeyFieldNames () const
 
QStringList getCompositePrimaryKeyFieldNamesAliased () const
 
QString getFieldName (const DataExecution::DataObject &object) const
 
QStringList getNonRelationFieldAliases () const
 
QStringList getNonRelationFieldNames () const
 
DataExecution::DataObjectgetPrimaryKeyField ()
 
const DataExecution::DataObjectgetPrimaryKeyField () const
 
QString getPrimaryKeyFieldName () const
 
QString getPrimaryKeyFieldNameAliased () const
 
SqlBindingRelationMap getRelationBindings (const QStringList &relationNames=QStringList(), bool recursive=false) const
 
QStringList getRelationFieldNames (bool recursive) const
 
QStringList getSqlValidCompositePrimaryKeyFieldNames () const
 
QStringList getSqlValidFieldList () const
 
bool hasCompositePrimaryKey () const
 
bool isPersistent () const
 
bool isPrimaryKeyField (const DataExecution::DataObject &obj) const
 
bool isRelationField (const QString &fieldName) const
 
void setPersistent (bool b)
 
- Public Member Functions inherited from ObjectGroup
 ~ObjectGroup () override
 
bool add (const QString &name, DataObject &obj)
 
bool canSerialize () const override
 
ObjectGroupclone () const override=0
 
bool empty () const
 
void ensureGroupHasData ()
 
void erase (int index)
 
DataObjectgetChild (const QString &name)
 
const DataObjectgetChild (const QString &name) const
 
DataObjectgetDataObject (int index)
 
const DataObjectgetDataObject (int index) const
 
int getIndex (const QString &name) const
 
const QString & getName (int index) const
 
virtual QString getPreferedWidget (const QString &name) const
 
bool hasData () const
 
bool haveName (const QString &name) const
 
bool insert (const QString &name, DataObject &obj, int index=-1)
 
bool load (const QJsonDocument &doc)
 
bool load (const SerializedItem &item) override
 
bool save (QJsonDocument &doc) const
 
bool save (SerializedItem &item) const override
 
unsigned size () const
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()=default
 
virtual Clonableclone () const =0
 
- Public Member Functions inherited from Serialize
virtual ~Serialize ()=default
 
virtual bool canSerialize () const =0
 
virtual bool load (const SerializedItem &item)=0
 
virtual bool save (SerializedItem &item) const =0
 

Protected Member Functions

const SqlBoundObjectClassDatagetClassData () const override
 
- Protected Member Functions inherited from SqlBoundObjectGroup
 SqlBoundObjectGroup (const SqlBoundObjectGroup &other)
 
 SqlBoundObjectGroup (SqlBoundObjectGroupData *data)
 
bool bindCompositePrimaryKey (const QList< const DataExecution::DataObject * > &objects)
 
bool bindField (const QString &fieldName, DataExecution::DataObject &object)
 
bool bindRelation (const SqlBindingRelation &relation)
 
virtual const SqlBoundObjectClassDatagetClassData () const =0
 
virtual QSqlQuery getInsertQuery (const SqlDataModel &model, const QStringList &relations, const QString &foreignKeyName=QString(), const QVariant &foreignKeyValue=QVariant()) const =0
 
virtual QSqlQuery getUpdateQuery (const SqlDataModel &model, const QStringList &relations, const QString &foreignKeyName=QString(), const QVariant &foreignKeyValue=QVariant()) const =0
 
SqlBoundObjectGroupoperator= (const SqlBoundObjectGroup &)
 
bool operator== (const SqlBoundObjectGroup &rhs) const
 
bool setPrimaryKeyField (const DataExecution::DataObject &obj, bool autoIncrement)
 
- Protected Member Functions inherited from ObjectGroup
 ObjectGroup ()
 
void clear ()
 
ObjectGroupoperator= (const ObjectGroup &rhs)
 
bool operator== (const ObjectGroup &rhs) const
 
void swap (ObjectGroup &rhs)
 

Detailed Description

There is no reason to use or extend the InvalidSqlBoundObjectGroup directly.

Constructor & Destructor Documentation

◆ InvalidSqlBoundObjectGroup() [1/2]

◆ InvalidSqlBoundObjectGroup() [2/2]

Member Function Documentation

◆ clone()

InvalidSqlBoundObjectGroup * clone ( ) const
overridevirtual
Returns
A shallow copy of our object: i.e. our data is shared between all objects of the same type. This is the default in order to allow easy distribution of the same object throughout an object hierarchy retrieved from a database.
See also
deepCopy

Implements SqlBoundObjectGroup.

◆ deepCopy()

InvalidSqlBoundObjectGroup * deepCopy ( ) const
overridevirtual
Returns
A deep copy of the object, with copies of of all underlying objects right down the entire object hierarchy. Use this when you want to copy an entire tree but deliberately do not want to modify any shared data.

Implements SqlBoundObjectGroup.

◆ getClassData()

const SqlBoundObjectClassData & getClassData ( ) const
overrideprotectedvirtual
Returns
The class data associated with this object, which includes information such as the bound table name etc.

Implements SqlBoundObjectGroup.

◆ getInsertQuery()

QSqlQuery getInsertQuery ( const SqlDataModel model,
const QStringList relations,
const QString &  foreignKeyName = QString(),
const QVariant &  foreignKeyValue = QVariant() 
) const
overridevirtual
Parameters
modelThe SqlDataModel responsible for the insertion operation.
relationsA list of relations to follow when generating the insert.
foreignKeyName(optional) The name of a foreign key field attached to the table that this object is bound to. Important for inserting objects with bi-directional relations.
foreignKeyValueThe value to store in the field named foreignKeyName when inserting this object.
Returns
A QSqlQuery that can be executed to insert this object into the database associated with model.

Returns the SQL query required to insert this particular object into a database. Callers should never need to invoke this method directly.

Implements SqlBoundObjectGroup.

◆ getUpdateQuery()

QSqlQuery getUpdateQuery ( const SqlDataModel model,
const QStringList relations,
const QString &  foreignKeyName = QString(),
const QVariant &  foreignKeyValue = QVariant() 
) const
overridevirtual
Parameters
modelThe SqlDataModel responsible for the update operation.
relationsA list of relations to follow when generating the update.
foreignKeyName(optional) The name of a foreign key field attached to the table that this object is bound to. Important for updating objects with bi-directional relations.
foreignKeyValueThe value to store in the field named foreignKeyName when updating this object.
Returns
A QSqlQuery that can be executed to update this object in the database associated with model.

Implements SqlBoundObjectGroup.