| QxOrm 1.2.4 C++ Object Relational Mapping library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Attributes
qx::IxSqlRelation Class Reference
QxDao : QxOrm library database communication used by persistence engine (ORM - Object Relational Mapping)

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:

List of all members.

## Public Types
enum | relation_type { no_relation, one_to_one, one_to_many, many_to_one, many_to_many }
## Public Member Functions
| IxSqlRelation (IxDataMember *p)
virtual | ~IxSqlRelation ()=0
QxCollection< QString, IxDataMember * > * | getLstDataMember () const
IxSqlRelationX * | getLstRelation () const
void | setSqlJoinType (qx::dao::sql_join::join_type e)
qx::dao::sql_join::join_type | getSqlJoinType () const
relation_type | getRelationType () const
IxClass * | getClass () const
IxClass * | getClassOwner () const
IxDataMember * | getDataMember () const
IxDataMemberX * | getDataMemberX () const
IxDataMember * | getDataId () const
IxDataMember * | getDataIdOwner () const
QString | getKey () const
long | getDataCount () const
long | getRelationCount () const
IxDataMember * | getDataByKey (const QString &sKey) const
IxDataMember * | nextData (long &lIndex) const
IxSqlRelation * | nextRelation (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 ()=0
virtual QString | getDescription () const =0
virtual QString | getExtraTable () const =0
virtual QString | createExtraTable () const =0
virtual bool | getCartesianProduct () const =0
virtual QVariant | getIdFromQuery (bool bEager, QxSqlRelationParams &params) 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
## Protected Attributes
IxClass * | m_pClass
| 'IxClass' associated wth sql relation
IxClass * | m_pClassOwner
| 'IxClass' of the owner
IxDataMember * | m_pDataMember
| 'IxDataMember' associated wth sql relation
IxDataMemberX * | m_pDataMemberX
| Collection of 'IxDataMember' : parent of 'm_pDataMember'.
IxDataMember * | m_pDataMemberId
| 'IxDataMember' id of 'm_pDataMemberX'
IxDataMember * | m_pDataMemberIdOwner
| 'IxDataMember' id of the owner
long | m_lOffsetRelation
| Generic offset for sql relation.
qx::dao::sql_join::join_type | m_eJoinType
| Join type to build sql query.
relation_type | m_eRelationType
| Relation type : one-to-one, one-to-many, etc.
QxSoftDelete | m_oSoftDelete
| Soft delete (or logical delete) behavior.
QxCollection< QString, IxDataMember * > * | m_lstDataMemberPtr
| Optimization : handle to collection of 'IxDataMember'.
IxSqlRelationX * | m_lstSqlRelationPtr
| Optimization : handle to collection of 'IxSqlRelation'.

## Detailed Description

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

Definition at line 67 of file IxSqlRelation.h.

## Member Enumeration Documentation

enum qx::IxSqlRelation::relation_type

Enumerator:

  no_relation |
  one_to_one |
  one_to_many |
  many_to_one |
  many_to_many |

Definition at line 72 of file IxSqlRelation.h.

## Constructor & Destructor Documentation

qx::IxSqlRelation::IxSqlRelation | ( | IxDataMember * | p | ) | `[inline]`

Definition at line 92 of file IxSqlRelation.h.

virtual qx::IxSqlRelation::~IxSqlRelation | ( |  | ) | `[pure virtual]`

## Member Function Documentation

virtual QString qx::IxSqlRelation::createExtraTable | ( |  | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::createTable | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::eagerFetch_ResolveInput | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void* qx::IxSqlRelation::eagerFetch_ResolveOutput | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::eagerFrom | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::eagerJoin | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::eagerSelect | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::eagerWhere | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::eagerWhereSoftDelete | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual bool qx::IxSqlRelation::getCartesianProduct | ( |  | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

IxClass* qx::IxSqlRelation::getClass | ( |  | ) | const`[inline]`

Definition at line 101 of file IxSqlRelation.h.

IxClass* qx::IxSqlRelation::getClassOwner | ( |  | ) | const`[inline]`

Definition at line 102 of file IxSqlRelation.h.

IxDataMember* qx::IxSqlRelation::getDataByKey | ( | const QString & | sKey | ) | const

long qx::IxSqlRelation::getDataCount | ( |  | ) | const

IxDataMember* qx::IxSqlRelation::getDataId | ( |  | ) | const`[inline]`

Definition at line 105 of file IxSqlRelation.h.

IxDataMember* qx::IxSqlRelation::getDataIdOwner | ( |  | ) | const`[inline]`

Definition at line 106 of file IxSqlRelation.h.

IxDataMember* qx::IxSqlRelation::getDataMember | ( |  | ) | const`[inline]`

Definition at line 103 of file IxSqlRelation.h.

IxDataMemberX* qx::IxSqlRelation::getDataMemberX | ( |  | ) | const`[inline]`

Definition at line 104 of file IxSqlRelation.h.

virtual QString qx::IxSqlRelation::getDescription | ( |  | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual QString qx::IxSqlRelation::getExtraTable | ( |  | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual QVariant qx::IxSqlRelation::getIdFromQuery | ( | bool | bEager,
|  | QxSqlRelationParams & | params
| ) |  | const`[pure virtual]`

Implemented in qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

QString qx::IxSqlRelation::getKey | ( |  | ) | const

QxCollection<QString, IxDataMember *>* qx::IxSqlRelation::getLstDataMember | ( |  | ) | const`[inline]`

Definition at line 95 of file IxSqlRelation.h.

IxSqlRelationX* qx::IxSqlRelation::getLstRelation | ( |  | ) | const`[inline]`

Definition at line 96 of file IxSqlRelation.h.

long qx::IxSqlRelation::getRelationCount | ( |  | ) | const

relation_type qx::IxSqlRelation::getRelationType | ( |  | ) | const`[inline]`

Definition at line 100 of file IxSqlRelation.h.

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`[inline]`

Definition at line 99 of file IxSqlRelation.h.

virtual void qx::IxSqlRelation::init | ( |  | ) | `[pure virtual]`

Implemented in qx::QxSqlRelation< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyFetch_ResolveInput | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyFetch_ResolveOutput | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyFrom | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyInsert | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyInsert_ResolveInput | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyInsert_Values | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyJoin | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazySelect | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyUpdate | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToOne< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyUpdate_ResolveInput | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToOne< DataType, Owner >, and qx::QxSqlRelation_OneToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyWhere | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual void qx::IxSqlRelation::lazyWhereSoftDelete | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

IxDataMember* qx::IxSqlRelation::nextData | ( | long & | lIndex | ) | const

IxSqlRelation* qx::IxSqlRelation::nextRelation | ( | long & | lIndex | ) | const

virtual QSqlError qx::IxSqlRelation::onAfterSave | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

virtual QSqlError qx::IxSqlRelation::onBeforeSave | ( | QxSqlRelationParams & | params | ) | const`[pure virtual]`

Implemented in qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

void qx::IxSqlRelation::setSqlJoinType | ( | qx::dao::sql_join::join_type | e | ) | `[inline]`

Definition at line 98 of file IxSqlRelation.h.

QString qx::IxSqlRelation::table | ( |  | ) | const

QString qx::IxSqlRelation::tableAlias | ( | QxSqlRelationParams & | params | ) | const

QString qx::IxSqlRelation::tableAliasOwner | ( | QxSqlRelationParams & | params | ) | const

bool qx::IxSqlRelation::traceSqlQuery | ( |  | ) | const

virtual void qx::IxSqlRelation::updateOffset | ( | bool | bEager,
|  | QxSqlRelationParams & | params
| ) |  | const`[pure virtual]`

Implemented in qx::QxSqlRelation_OneToMany< DataType, Owner >, qx::QxSqlRelation_ManyToMany< DataType, Owner >, qx::QxSqlRelation_OneToOne< DataType, Owner >, and qx::QxSqlRelation_ManyToOne< DataType, Owner >.

bool qx::IxSqlRelation::verifyOffset | ( | QxSqlRelationParams & | params,
|  | bool | bId
| ) |  | const

## Member Data Documentation

qx::dao::sql_join::join_type qx::IxSqlRelation::m_eJoinType`[protected]`

Join type to build sql query.

Definition at line 83 of file IxSqlRelation.h.

relation_type qx::IxSqlRelation::m_eRelationType`[protected]`

Relation type : one-to-one, one-to-many, etc.

Definition at line 84 of file IxSqlRelation.h.

long qx::IxSqlRelation::m_lOffsetRelation`[protected]`

Generic offset for sql relation.

Definition at line 82 of file IxSqlRelation.h.

QxCollection<QString, IxDataMember *>* qx::IxSqlRelation::m_lstDataMemberPtr`[protected]`

Optimization : handle to collection of 'IxDataMember'.

Definition at line 87 of file IxSqlRelation.h.

IxSqlRelationX* qx::IxSqlRelation::m_lstSqlRelationPtr`[protected]`

Optimization : handle to collection of 'IxSqlRelation'.

Definition at line 88 of file IxSqlRelation.h.

QxSoftDelete qx::IxSqlRelation::m_oSoftDelete`[protected]`

Soft delete (or logical delete) behavior.

Definition at line 85 of file IxSqlRelation.h.

IxClass* qx::IxSqlRelation::m_pClass`[protected]`

'IxClass' associated wth sql relation

Definition at line 76 of file IxSqlRelation.h.

IxClass* qx::IxSqlRelation::m_pClassOwner`[protected]`

'IxClass' of the owner

Definition at line 77 of file IxSqlRelation.h.

IxDataMember* qx::IxSqlRelation::m_pDataMember`[protected]`

'IxDataMember' associated wth sql relation

Definition at line 78 of file IxSqlRelation.h.

IxDataMember* qx::IxSqlRelation::m_pDataMemberId`[protected]`

'IxDataMember' id of 'm_pDataMemberX'

Definition at line 80 of file IxSqlRelation.h.

IxDataMember* qx::IxSqlRelation::m_pDataMemberIdOwner`[protected]`

'IxDataMember' id of the owner

Definition at line 81 of file IxSqlRelation.h.

IxDataMemberX* qx::IxSqlRelation::m_pDataMemberX`[protected]`

Collection of 'IxDataMember' : parent of 'm_pDataMember'.

Definition at line 79 of file IxSqlRelation.h.

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

- D:/Dvlp/_Perso/QxOrm/include/QxDao/IxSqlRelation.h