QxOrm  1.4.9
C++ Object Relational Mapping library

qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 tables in database) More...

#include <IxSqlRelation.h>

Inheritance diagram for qx::IxSqlRelation:
qx::QxPropertyBag qx::QxSqlRelation< DataType, Owner > qx::QxSqlRelation_ManyToMany< DataType, Owner > qx::QxSqlRelation_ManyToOne< DataType, Owner > qx::QxSqlRelation_OneToMany< DataType, Owner > qx::QxSqlRelation_OneToOne< DataType, Owner >

List of all members.

Public Types

enum  relation_type {
  no_relation, one_to_one, one_to_many, many_to_one,

Public Member Functions

 IxSqlRelation (IxDataMember *p)
virtual ~IxSqlRelation ()=0
QxCollection< QString,
IxDataMember * > * 
getLstDataMember () const
IxSqlRelationXgetLstRelation () const
void setSqlJoinType (qx::dao::sql_join::join_type e)
qx::dao::sql_join::join_type getSqlJoinType () const
relation_type getRelationType () const
IxClassgetClass () const
IxClassgetClassOwner () const
IxDataMembergetDataMember () const
IxDataMemberXgetDataMemberX () const
IxDataMembergetDataId () const
IxDataMembergetDataIdOwner () const
QString getKey () const
QString getForeignKey () const
QString getForeignKeyOwner () const
QString getForeignKeyDataType () const
QString getExtraTable () const
long getDataCount () const
long getRelationCount () const
IxDataMembergetDataByKey (const QString &sKey) const
IxDataMembernextData (long &lIndex) const
IxSqlRelationnextRelation (long &lIndex) const
QString table () const
QString tableAlias (QxSqlRelationParams &params) const
QString tableAliasOwner (QxSqlRelationParams &params) const
QString getSqlJoin (qx::dao::sql_join::join_type e=qx::dao::sql_join::no_join) const
bool traceSqlQuery () const
virtual void init ()
virtual QString getDescription () const =0
virtual QString createExtraTable () const =0
virtual bool getCartesianProduct () const =0
virtual QVariant getIdFromQuery (bool bEager, QxSqlRelationParams &params, int iOffset, int iNameIndex) const =0
virtual void updateOffset (bool bEager, QxSqlRelationParams &params) const =0
virtual void createTable (QxSqlRelationParams &params) const =0
virtual void lazySelect (QxSqlRelationParams &params) const =0
virtual void eagerSelect (QxSqlRelationParams &params) const =0
virtual void lazyFrom (QxSqlRelationParams &params) const =0
virtual void eagerFrom (QxSqlRelationParams &params) const =0
virtual void lazyJoin (QxSqlRelationParams &params) const =0
virtual void eagerJoin (QxSqlRelationParams &params) const =0
virtual void lazyWhere (QxSqlRelationParams &params) const =0
virtual void eagerWhere (QxSqlRelationParams &params) const =0
virtual void lazyWhereSoftDelete (QxSqlRelationParams &params) const =0
virtual void eagerWhereSoftDelete (QxSqlRelationParams &params) const =0
virtual void lazyFetch_ResolveInput (QxSqlRelationParams &params) const =0
virtual void eagerFetch_ResolveInput (QxSqlRelationParams &params) const =0
virtual void lazyFetch_ResolveOutput (QxSqlRelationParams &params) const =0
virtual void * eagerFetch_ResolveOutput (QxSqlRelationParams &params) const =0
virtual void lazyInsert (QxSqlRelationParams &params) const =0
virtual void lazyInsert_Values (QxSqlRelationParams &params) const =0
virtual void lazyUpdate (QxSqlRelationParams &params) const =0
virtual void lazyInsert_ResolveInput (QxSqlRelationParams &params) const =0
virtual void lazyUpdate_ResolveInput (QxSqlRelationParams &params) const =0
virtual QSqlError onBeforeSave (QxSqlRelationParams &params) const =0
virtual QSqlError onAfterSave (QxSqlRelationParams &params) const =0
bool verifyOffset (QxSqlRelationParams &params, bool bId) const QX_USED

Static Public Member Functions

static void setTraceRelationInit (bool bTrace)

Protected Member Functions

QVariant getIdFromQuery_ManyToMany (bool bEager, QxSqlRelationParams &params, int iOffset, int iNameIndex) const
QVariant getIdFromQuery_ManyToOne (bool bEager, QxSqlRelationParams &params, int iOffset, int iNameIndex) const
QVariant getIdFromQuery_OneToMany (bool bEager, QxSqlRelationParams &params, int iOffset, int iNameIndex) const
QVariant getIdFromQuery_OneToOne (bool bEager, QxSqlRelationParams &params, int iOffset, int iNameIndex) const
void updateOffset_ManyToMany (bool bEager, QxSqlRelationParams &params) const
void updateOffset_ManyToOne (bool bEager, QxSqlRelationParams &params) const
void updateOffset_OneToMany (bool bEager, QxSqlRelationParams &params) const
void updateOffset_OneToOne (bool bEager, QxSqlRelationParams &params) const
void eagerSelect_ManyToMany (QxSqlRelationParams &params) const
void eagerSelect_ManyToOne (QxSqlRelationParams &params) const
void eagerSelect_OneToMany (QxSqlRelationParams &params) const
void eagerSelect_OneToOne (QxSqlRelationParams &params) const
void eagerJoin_ManyToMany (QxSqlRelationParams &params) const
void eagerJoin_ManyToOne (QxSqlRelationParams &params) const
void eagerJoin_OneToMany (QxSqlRelationParams &params) const
void eagerJoin_OneToOne (QxSqlRelationParams &params) const
void eagerWhereSoftDelete_ManyToMany (QxSqlRelationParams &params) const
void eagerWhereSoftDelete_ManyToOne (QxSqlRelationParams &params) const
void eagerWhereSoftDelete_OneToMany (QxSqlRelationParams &params) const
void eagerWhereSoftDelete_OneToOne (QxSqlRelationParams &params) const
void lazySelect_ManyToOne (QxSqlRelationParams &params) const
void lazyInsert_ManyToOne (QxSqlRelationParams &params) const
void lazyInsert_Values_ManyToOne (QxSqlRelationParams &params) const
void lazyUpdate_ManyToOne (QxSqlRelationParams &params) const
void createTable_ManyToOne (QxSqlRelationParams &params) const
QSqlError deleteFromExtraTable_ManyToMany (QxSqlRelationParams &params) const
QString createExtraTable_ManyToMany () const
bool addLazyRelation (QxSqlRelationParams &params, IxSqlRelation *pRelation) const
bool canInit () const
void setIsSameDataOwner (int i)
void setClass (IxClass *pClass, IxClass *pClassOwner)
void setRelationType (relation_type e)
void setForeignKey (const QString &s) const
void setForeignKeyOwner (const QString &s) const
void setForeignKeyDataType (const QString &s) const
void setExtraTable (const QString &s) const

Private Attributes

< IxSqlRelationImpl > 
 Private implementation idiom.

Detailed Description

qx::IxSqlRelation : common interface for all relationships defined between 2 classes (or between 2 tables in database)

Definition at line 68 of file IxSqlRelation.h.

Member Enumeration Documentation


Definition at line 78 of file IxSqlRelation.h.

Constructor & Destructor Documentation

qx::IxSqlRelation::IxSqlRelation ( IxDataMember p)
virtual qx::IxSqlRelation::~IxSqlRelation ( ) [pure virtual]

Member Function Documentation

bool qx::IxSqlRelation::addLazyRelation ( QxSqlRelationParams params,
IxSqlRelation pRelation 
) const [protected]
bool qx::IxSqlRelation::canInit ( ) const [protected]
QString qx::IxSqlRelation::createExtraTable_ManyToMany ( ) const [protected]
void qx::IxSqlRelation::createTable_ManyToOne ( QxSqlRelationParams params) const [protected]
QSqlError qx::IxSqlRelation::deleteFromExtraTable_ManyToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerJoin_ManyToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerJoin_ManyToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerJoin_OneToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerJoin_OneToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerSelect_ManyToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerSelect_ManyToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerSelect_OneToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerSelect_OneToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerWhereSoftDelete_ManyToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerWhereSoftDelete_ManyToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerWhereSoftDelete_OneToMany ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::eagerWhereSoftDelete_OneToOne ( QxSqlRelationParams params) const [protected]
IxClass* qx::IxSqlRelation::getClass ( ) const
IxClass* qx::IxSqlRelation::getClassOwner ( ) const
IxDataMember* qx::IxSqlRelation::getDataByKey ( const QString &  sKey) const
long qx::IxSqlRelation::getDataCount ( ) const
IxDataMember* qx::IxSqlRelation::getDataId ( ) const
IxDataMember* qx::IxSqlRelation::getDataIdOwner ( ) const
IxDataMember* qx::IxSqlRelation::getDataMember ( ) const
IxDataMemberX* qx::IxSqlRelation::getDataMemberX ( ) const
QString qx::IxSqlRelation::getExtraTable ( ) const
QString qx::IxSqlRelation::getForeignKey ( ) const
QString qx::IxSqlRelation::getForeignKeyDataType ( ) const
QString qx::IxSqlRelation::getForeignKeyOwner ( ) const
virtual QVariant qx::IxSqlRelation::getIdFromQuery ( bool  bEager,
QxSqlRelationParams params,
int  iOffset,
int  iNameIndex 
) const [pure virtual]
QVariant qx::IxSqlRelation::getIdFromQuery_ManyToMany ( bool  bEager,
QxSqlRelationParams params,
int  iOffset,
int  iNameIndex 
) const [protected]
QVariant qx::IxSqlRelation::getIdFromQuery_ManyToOne ( bool  bEager,
QxSqlRelationParams params,
int  iOffset,
int  iNameIndex 
) const [protected]
QVariant qx::IxSqlRelation::getIdFromQuery_OneToMany ( bool  bEager,
QxSqlRelationParams params,
int  iOffset,
int  iNameIndex 
) const [protected]
QVariant qx::IxSqlRelation::getIdFromQuery_OneToOne ( bool  bEager,
QxSqlRelationParams params,
int  iOffset,
int  iNameIndex 
) const [protected]
QString qx::IxSqlRelation::getKey ( ) const
QxCollection<QString, IxDataMember *>* qx::IxSqlRelation::getLstDataMember ( ) const
IxSqlRelationX* qx::IxSqlRelation::getLstRelation ( ) const
long qx::IxSqlRelation::getRelationCount ( ) const
relation_type qx::IxSqlRelation::getRelationType ( ) const
QString qx::IxSqlRelation::getSqlJoin ( qx::dao::sql_join::join_type  e = qx::dao::sql_join::no_join) const
qx::dao::sql_join::join_type qx::IxSqlRelation::getSqlJoinType ( ) const
virtual void qx::IxSqlRelation::init ( ) [virtual]
void qx::IxSqlRelation::lazyInsert_ManyToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::lazyInsert_Values_ManyToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::lazySelect_ManyToOne ( QxSqlRelationParams params) const [protected]
void qx::IxSqlRelation::lazyUpdate_ManyToOne ( QxSqlRelationParams params) const [protected]
IxDataMember* qx::IxSqlRelation::nextData ( long &  lIndex) const
IxSqlRelation* qx::IxSqlRelation::nextRelation ( long &  lIndex) const
void qx::IxSqlRelation::setClass ( IxClass pClass,
IxClass pClassOwner 
) [protected]
void qx::IxSqlRelation::setExtraTable ( const QString &  s) const [protected]
void qx::IxSqlRelation::setForeignKey ( const QString &  s) const [protected]
void qx::IxSqlRelation::setForeignKeyDataType ( const QString &  s) const [protected]
void qx::IxSqlRelation::setForeignKeyOwner ( const QString &  s) const [protected]
void qx::IxSqlRelation::setIsSameDataOwner ( int  i) [protected]
void qx::IxSqlRelation::setRelationType ( relation_type  e) [protected]
void qx::IxSqlRelation::setSqlJoinType ( qx::dao::sql_join::join_type  e)
static void qx::IxSqlRelation::setTraceRelationInit ( bool  bTrace) [static]
QString qx::IxSqlRelation::table ( ) const
QString qx::IxSqlRelation::tableAlias ( QxSqlRelationParams params) const
QString qx::IxSqlRelation::tableAliasOwner ( QxSqlRelationParams params) const
bool qx::IxSqlRelation::traceSqlQuery ( ) const
void qx::IxSqlRelation::updateOffset_ManyToMany ( bool  bEager,
QxSqlRelationParams params 
) const [protected]
void qx::IxSqlRelation::updateOffset_ManyToOne ( bool  bEager,
QxSqlRelationParams params 
) const [protected]
void qx::IxSqlRelation::updateOffset_OneToMany ( bool  bEager,
QxSqlRelationParams params 
) const [protected]
void qx::IxSqlRelation::updateOffset_OneToOne ( bool  bEager,
QxSqlRelationParams params 
) const [protected]
bool qx::IxSqlRelation::verifyOffset ( QxSqlRelationParams params,
bool  bId 
) const

Member Data Documentation

std::unique_ptr<IxSqlRelationImpl> qx::IxSqlRelation::m_pImpl [private]

Private implementation idiom.

Definition at line 73 of file IxSqlRelation.h.

The documentation for this class was generated from the following file: