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

#include <DataAnalysis/DataStructures/sqlboundobjectgroupdata.h>

Inherits QSharedData.

Public Member Functions

 SqlBoundObjectGroupData (const SqlBoundObjectGroupData &other)
 
 SqlBoundObjectGroupData (SqlBoundObjectClassData &classData)
 
 ~SqlBoundObjectGroupData ()
 
QStringList getAutoIncrementFieldNames () const
 
QString getBoundTableName () const
 
DataExecution::DataObjectgetCompositePrimaryKeyField ()
 
const DataExecution::DataObjectgetCompositePrimaryKeyField () const
 
QStringList getCompositePrimaryKeyFieldNames () const
 
QStringList getNonRelationFieldAliases () const
 
QStringList getNonRelationFieldNames () const
 
DataExecution::DataObjectgetPrimaryKeyField ()
 
const DataExecution::DataObjectgetPrimaryKeyField () const
 
QString getPrimaryKeyFieldName () const
 
QStringList getRelationFieldNames (bool recursive) const
 
const SqlBindingRelationMapgetRelations () const
 
QStringList getSqlValidFieldList () const
 
bool hasCompositePrimaryKey () const
 
SqlBoundObjectGroupDataoperator= (const SqlBoundObjectGroupData &rhs)=delete
 

Protected Member Functions

bool bindCompositePrimaryKey (const QStringList &fieldNames, const QList< const DataExecution::DataObject * > &objects)
 
void bindMember (const QString &name, DataExecution::DataObject &obj)
 
bool bindPrimaryKey (const QString &name, const DataExecution::DataObject &obj, bool autoIncrement)
 

Protected Attributes

SqlBoundObjectClassDataclassData_
 
CompositePrimaryKeyDatacompositeKeyData_
 
DataExecution::ObjectArray members_
 
bool persistent_
 
DataExecution::DataObjectprimaryKeyObj_
 
bool processing_
 
SqlBindingRelationMap relations_
 

Constructor & Destructor Documentation

◆ SqlBoundObjectGroupData() [1/2]

Parameters
classDataThe class information associated to this data's class..

◆ SqlBoundObjectGroupData() [2/2]

Parameters
otherThe other object group data to copy from.

◆ ~SqlBoundObjectGroupData()

Member Function Documentation

◆ bindCompositePrimaryKey()

bool bindCompositePrimaryKey ( const QStringList fieldNames,
const QList< const DataExecution::DataObject * > &  objects 
)
protected
Parameters
fieldNamesThe names of the fields that comprise the composite key.
objectsThe data objects that comprise the composite key. Each item corresponds to a QString in the fieldNames QStringList.
Returns
True if the composite key was able to be bound, false otherwise.

◆ bindMember()

void bindMember ( const QString &  name,
DataExecution::DataObject obj 
)
protected
Parameters
nameThe name of the member to bind
objThe data object that is being bound to the specific name

◆ bindPrimaryKey()

bool bindPrimaryKey ( const QString &  name,
const DataExecution::DataObject obj,
bool  autoIncrement 
)
protected
Parameters
nameThe name of the field that is going to be bound as the primary key.
objThe data object associated with the primary key field name.
autoIncrementWhether or not this primary key is auto-incremented on insert.
Returns
True if the primary key was able to be bound successfully, false otherwise.

◆ getAutoIncrementFieldNames()

QStringList getAutoIncrementFieldNames ( ) const
Returns
The auto increment field names.

◆ getBoundTableName()

QString getBoundTableName ( ) const
Returns
The table name associated with this object type.

◆ getCompositePrimaryKeyField() [1/2]

DataExecution::DataObject * getCompositePrimaryKeyField ( )
Returns
The data object associated with the primary key field, for use in the case that the object has a composite primary key.

◆ getCompositePrimaryKeyField() [2/2]

const DataExecution::DataObject * getCompositePrimaryKeyField ( ) const
Returns
The data object associated with the primary key field, for use in the case that the object has a composite primary key.

◆ getCompositePrimaryKeyFieldNames()

QStringList getCompositePrimaryKeyFieldNames ( ) const
Returns
The composite key field names.

◆ getNonRelationFieldAliases()

QStringList getNonRelationFieldAliases ( ) const
Returns
SQL-valid aliases for the field names, guaranteed to be unique among tables.

◆ getNonRelationFieldNames()

QStringList getNonRelationFieldNames ( ) const
Returns
The field names that are not relations.

◆ getPrimaryKeyField() [1/2]

DataExecution::DataObject * getPrimaryKeyField ( )
Returns
The data object associated with the primary key field name.

◆ getPrimaryKeyField() [2/2]

const DataExecution::DataObject * getPrimaryKeyField ( ) const
Returns
The data object associated with the primary key field name.

◆ getPrimaryKeyFieldName()

QString getPrimaryKeyFieldName ( ) const
Returns
The primary key field name.

◆ getRelationFieldNames()

QStringList getRelationFieldNames ( bool  recursive) const
Returns
The field names that are relations.

◆ getRelations()

const SqlBindingRelationMap & getRelations ( ) const
Returns
The map of object relations.

◆ getSqlValidFieldList()

QStringList getSqlValidFieldList ( ) const
Returns
SQL-valid list of fields for use in a SELECT query.

◆ hasCompositePrimaryKey()

bool hasCompositePrimaryKey ( ) const
Returns
True if this data contains a composite key, otherwise it returns false, indicating that a regular primary key field is used.

◆ operator=()

SqlBoundObjectGroupData & operator= ( const SqlBoundObjectGroupData rhs)
delete

Member Data Documentation

◆ classData_

SqlBoundObjectClassData& classData_
protected

◆ compositeKeyData_

CompositePrimaryKeyData* compositeKeyData_
protected

◆ members_

DataExecution::ObjectArray members_
protected

◆ persistent_

bool persistent_
protected

◆ primaryKeyObj_

DataExecution::DataObject* primaryKeyObj_
protected

◆ processing_

bool processing_
mutableprotected

◆ relations_

SqlBindingRelationMap relations_
protected