![]() |
QxOrm 1.4.9
C++ Object Relational Mapping library
|
qx::IxDataMember : common interface for all class properties registered into QxOrm context More...
#include <IxDataMember.h>
Classes | |
| struct | qxCannotAccessDataPointer |
| struct | qxCannotAccessDataPointer< QString, dummy > |
| struct | qxCannotAccessDataPointer< QVariant, dummy > |
Public Types | |
| typedef std::function< void(IxDataMemberSqlCallbackParams &)> | type_fct_sql_callback |
Public Member Functions | |
| IxDataMember (const QString &sKey, long lVersion, bool bSerialize, bool bDao, IxDataMember *pImpl) | |
| virtual | ~IxDataMember ()=0 |
| QString | getKey () const |
| QString | getName () const |
| int | getNameCount () const |
| QString | getNameParent () const |
| const char * | getNamePtr () const |
| QString | getDescription () const |
| QString | getFormat () const |
| long | getVersion () const |
| bool | getSerialize () const |
| bool | getDao () const |
| QVariant | getDefaultValue () const |
| QVariant | getMinValue () const |
| QVariant | getMaxValue () const |
| int | getPrecision () const |
| int | getMinLength () const |
| int | getMaxLength () const |
| bool | getRequired () const |
| bool | getReadOnly () const |
| bool | getAutoIncrement () const |
| bool | getNotNull () const |
| bool | getIsPrimaryKey () const |
| bool | getIsIndex () const |
| bool | getIsUnique () const |
| IxDataMemberX * | getParent () const |
| IxSqlRelation * | getSqlRelation () const |
| bool | hasSqlRelation () const |
| bool | getAccessDataPointer () const |
| virtual QString | getType () const |
| QString | getTypeParent () const |
| IxDataMember * | getPImpl () const |
| void | setName (const QString &s) |
| void | setNameParent (const QString &s) |
| void | setDescription (const QString &s) |
| void | setFormat (const QString &s) |
| void | setSqlType (const QString &s) |
| void | setSqlAlias (const QString &s) |
| void | setVersion (long l) |
| void | setSerialize (bool b) |
| void | setDao (bool b) |
| void | setDefaultValue (const QVariant &v) |
| void | setPrecision (int i) |
| void | setRequired (bool b) |
| void | setReadOnly (bool b) |
| void | setAutoIncrement (bool b) |
| void | setIsPrimaryKey (bool b) |
| void | setIsIndex (bool b) |
| void | setIsUnique (bool b) |
| void | setParent (IxDataMemberX *p) |
| void | setSqlRelation (IxSqlRelation *p) |
| void | setAccessDataPointer (bool b) |
| void | setMinValue (long lMinValue, const QString &sMessage=QString()) |
| void | setMinValue (double dMinValue, const QString &sMessage=QString()) |
| void | setMaxValue (long lMaxValue, const QString &sMessage=QString()) |
| void | setMaxValue (double dMaxValue, const QString &sMessage=QString()) |
| void | setMinLength (int iMinLength, const QString &sMessage=QString()) |
| void | setMaxLength (int iMaxLength, const QString &sMessage=QString()) |
| void | setNotNull (bool bNotNull, const QString &sMessage=QString()) |
| bool | isThereRelationPartOfPrimaryKey (int iIndexNamePK, IxSqlRelation *&pRelation, int &iIndexNameFK) const |
| bool | isPartOfPrimaryKey (int iIndexNameFK, IxDataMember *&pPrimaryKey, int &iIndexNamePK) const |
| void | setRelationPartOfPrimaryKey (int iIndexNamePK, IxSqlRelation *pRelation, int iIndexNameFK) |
| void | setPartOfPrimaryKey (int iIndexNameFK, IxDataMember *pPrimaryKey, int iIndexNamePK) |
| QString | getName (int iIndex, const QString &sOtherName=QString()) const |
| QString | getSqlAlias (const QString &sTable=QString(), bool bClauseWhere=false, int iIndexName=0, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const |
| QString | getSqlType (int iIndexName=-1) const |
| QString | getSqlTypeAndParams (int iIndexName=-1) const |
| QString | getSqlPlaceHolder (const QString &sAppend=QString(), int iIndexName=0, const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false) const |
| void | setSqlPlaceHolder (QSqlQuery &query, void *pOwner, const QString &sAppend=QString(), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false, qx::QxCollection< QString, QVariantList > *pLstExecBatch=NULL) const |
| QString | getSqlAliasEqualToPlaceHolder (const QString &sTable=QString(), bool bClauseWhere=false, const QString &sAppend=QString(), const QString &sSep=QString(" AND "), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const |
| QString | getSqlNameEqualToPlaceHolder (const QString &sAppend=QString(), const QString &sSep=QString(" AND "), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const |
| QString | getSqlTablePointNameAsAlias (const QString &sTable, const QString &sSep=QString(", "), const QString &sSuffixAlias=QString(), bool bCheckFKPartOfPK=false, const QString &sCustomAlias=QString(), qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const |
| QString | getSqlName (const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false, qx::IxSqlQueryBuilder *pSqlQueryBuilder=NULL) const |
| QString | getSqlNameAndTypeAndParams (const QString &sSep=QString(", "), const QString &sOtherName=QString(), bool bCheckFKPartOfPK=false) const |
| void | customGetSqlName (type_fct_sql_callback fct) |
| void | customGetSqlTablePointNameAsAlias (type_fct_sql_callback fct) |
| void | customGetSqlNameEqualToPlaceHolder (type_fct_sql_callback fct) |
| void | customGetSqlAliasEqualToPlaceHolder (type_fct_sql_callback fct) |
| void | customGetSqlAlias (type_fct_sql_callback fct) |
| virtual bool | isEqual (const void *pOwner1, const void *pOwner2) const =0 |
| virtual QVariant | toVariant (const void *pOwner, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const =0 |
| virtual qx_bool | fromVariant (void *pOwner, const QVariant &v, const QString &sFormat, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context)=0 |
| QVariant | toVariant (const void *pOwner, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) const |
| qx_bool | fromVariant (void *pOwner, const QVariant &v, int iIndexName=-1, qx::cvt::context::ctx_type ctx=qx::cvt::context::e_no_context) |
| virtual QJsonValue | toJson (const void *pOwner, const QString &sFormat) const =0 |
| virtual qx_bool | fromJson (void *pOwner, const QJsonValue &j, const QString &sFormat)=0 |
| QJsonValue | toJson (const void *pOwner) const |
| qx_bool | fromJson (void *pOwner, const QJsonValue &j) |
| qx::any | getValueAnyPtr (const void *pOwner) const |
| qx::any | getValueAnyPtr (void *pOwner) |
| void * | getValueVoidPtr (const void *pOwner) const |
| void * | getValueVoidPtr (void *pOwner) |
| template<typename T > | |
| T * | getValuePtr (void *pOwner, bool *bOk=NULL) |
| template<typename T > | |
| T | getValue (void *pOwner, bool *bOk=NULL) |
| template<typename T > | |
| bool | setValue (void *pOwner, const T &val) |
Public Member Functions inherited from qx::QxPropertyBag | |
| QxPropertyBag () | |
| virtual | ~QxPropertyBag () |
| void | setPropertyBag (const QString &key, const QVariant &value) |
| QVariant | getPropertyBag (const QString &key) const |
| void | removePropertyBag (const QString &key) |
| void | clearPropertyBag () |
| long | countPropertyBag () const |
| QList< QString > | getAllPropertyBagKeys () const |
Static Public Member Functions | |
| static QString | getSqlFromTable (const QString &sTable, const QString &sCustomAlias=QString()) |
| static QString | getSqlTableName (const QString &sTable) |
| static QString | getSqlColumnName (const QString &sColumn) |
| static QString | getSqlTableNameAlias (const QString &sTable) |
| static QString | getSqlColumnNameAlias (const QString &sColumn) |
Protected Member Functions | |
| virtual qx::any | getDataPtr (const void *pOwner) const =0 |
| virtual qx::any | getDataPtr (void *pOwner)=0 |
| virtual void * | getDataVoidPtr (const void *pOwner) const =0 |
| virtual void * | getDataVoidPtr (void *pOwner)=0 |
Private Member Functions | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
Private Attributes | |
| std::unique_ptr< IxDataMemberImpl > | m_pImpl |
| Private implementation idiom. | |
Friends | |
| template<typename DataType , class Owner > | |
| class | QxDataMember |
Additional Inherited Members | |
Protected Types inherited from qx::QxPropertyBag | |
| typedef QHash< QString, QVariant > | type_hash_prop_bag |
| typedef std::shared_ptr< type_hash_prop_bag > | type_hash_prop_bag_ptr |
Protected Attributes inherited from qx::QxPropertyBag | |
| type_hash_prop_bag_ptr | m_lstPropertyBag |
| List of all properties in the bag (meta-data) | |
qx::IxDataMember : common interface for all class properties registered into QxOrm context
Definition at line 94 of file IxDataMember.h.
| typedef std::function<void (IxDataMemberSqlCallbackParams &)> qx::IxDataMember::type_fct_sql_callback |
Definition at line 102 of file IxDataMember.h.
| qx::IxDataMember::IxDataMember | ( | const QString & | sKey, |
| long | lVersion, | ||
| bool | bSerialize, | ||
| bool | bDao, | ||
| IxDataMember * | pImpl ) |
|
pure virtual |
| void qx::IxDataMember::customGetSqlAlias | ( | type_fct_sql_callback | fct | ) |
| void qx::IxDataMember::customGetSqlAliasEqualToPlaceHolder | ( | type_fct_sql_callback | fct | ) |
| void qx::IxDataMember::customGetSqlName | ( | type_fct_sql_callback | fct | ) |
| void qx::IxDataMember::customGetSqlNameEqualToPlaceHolder | ( | type_fct_sql_callback | fct | ) |
| void qx::IxDataMember::customGetSqlTablePointNameAsAlias | ( | type_fct_sql_callback | fct | ) |
| qx_bool qx::IxDataMember::fromJson | ( | void * | pOwner, |
| const QJsonValue & | j ) |
|
pure virtual |
|
pure virtual |
| qx_bool qx::IxDataMember::fromVariant | ( | void * | pOwner, |
| const QVariant & | v, | ||
| int | iIndexName = -1, | ||
| qx::cvt::context::ctx_type | ctx = qx::cvt::context::e_no_context ) |
| bool qx::IxDataMember::getAccessDataPointer | ( | ) | const |
| bool qx::IxDataMember::getAutoIncrement | ( | ) | const |
| bool qx::IxDataMember::getDao | ( | ) | const |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
| QVariant qx::IxDataMember::getDefaultValue | ( | ) | const |
| QString qx::IxDataMember::getDescription | ( | ) | const |
| QString qx::IxDataMember::getFormat | ( | ) | const |
| bool qx::IxDataMember::getIsIndex | ( | ) | const |
| bool qx::IxDataMember::getIsPrimaryKey | ( | ) | const |
| bool qx::IxDataMember::getIsUnique | ( | ) | const |
| QString qx::IxDataMember::getKey | ( | ) | const |
| int qx::IxDataMember::getMaxLength | ( | ) | const |
| QVariant qx::IxDataMember::getMaxValue | ( | ) | const |
| int qx::IxDataMember::getMinLength | ( | ) | const |
| QVariant qx::IxDataMember::getMinValue | ( | ) | const |
| QString qx::IxDataMember::getName | ( | ) | const |
| QString qx::IxDataMember::getName | ( | int | iIndex, |
| const QString & | sOtherName = QString() ) const |
| int qx::IxDataMember::getNameCount | ( | ) | const |
| QString qx::IxDataMember::getNameParent | ( | ) | const |
| const char * qx::IxDataMember::getNamePtr | ( | ) | const |
| bool qx::IxDataMember::getNotNull | ( | ) | const |
| IxDataMemberX * qx::IxDataMember::getParent | ( | ) | const |
| IxDataMember * qx::IxDataMember::getPImpl | ( | ) | const |
| int qx::IxDataMember::getPrecision | ( | ) | const |
| bool qx::IxDataMember::getReadOnly | ( | ) | const |
| bool qx::IxDataMember::getRequired | ( | ) | const |
| bool qx::IxDataMember::getSerialize | ( | ) | const |
| QString qx::IxDataMember::getSqlAlias | ( | const QString & | sTable = QString(), |
| bool | bClauseWhere = false, | ||
| int | iIndexName = 0, | ||
| qx::IxSqlQueryBuilder * | pSqlQueryBuilder = NULL ) const |
| QString qx::IxDataMember::getSqlAliasEqualToPlaceHolder | ( | const QString & | sTable = QString(), |
| bool | bClauseWhere = false, | ||
| const QString & | sAppend = QString(), | ||
| const QString & | sSep = QString(" AND "), | ||
| bool | bCheckFKPartOfPK = false, | ||
| qx::IxSqlQueryBuilder * | pSqlQueryBuilder = NULL ) const |
|
static |
|
static |
|
static |
| QString qx::IxDataMember::getSqlName | ( | const QString & | sSep = QString(", "), |
| const QString & | sOtherName = QString(), | ||
| bool | bCheckFKPartOfPK = false, | ||
| qx::IxSqlQueryBuilder * | pSqlQueryBuilder = NULL ) const |
| QString qx::IxDataMember::getSqlNameAndTypeAndParams | ( | const QString & | sSep = QString(", "), |
| const QString & | sOtherName = QString(), | ||
| bool | bCheckFKPartOfPK = false ) const |
| QString qx::IxDataMember::getSqlNameEqualToPlaceHolder | ( | const QString & | sAppend = QString(), |
| const QString & | sSep = QString(" AND "), | ||
| bool | bCheckFKPartOfPK = false, | ||
| qx::IxSqlQueryBuilder * | pSqlQueryBuilder = NULL ) const |
| QString qx::IxDataMember::getSqlPlaceHolder | ( | const QString & | sAppend = QString(), |
| int | iIndexName = 0, | ||
| const QString & | sSep = QString(", "), | ||
| const QString & | sOtherName = QString(), | ||
| bool | bCheckFKPartOfPK = false ) const |
| IxSqlRelation * qx::IxDataMember::getSqlRelation | ( | ) | const |
|
static |
|
static |
| QString qx::IxDataMember::getSqlTablePointNameAsAlias | ( | const QString & | sTable, |
| const QString & | sSep = QString(", "), | ||
| const QString & | sSuffixAlias = QString(), | ||
| bool | bCheckFKPartOfPK = false, | ||
| const QString & | sCustomAlias = QString(), | ||
| qx::IxSqlQueryBuilder * | pSqlQueryBuilder = NULL ) const |
| QString qx::IxDataMember::getSqlType | ( | int | iIndexName = -1 | ) | const |
| QString qx::IxDataMember::getSqlTypeAndParams | ( | int | iIndexName = -1 | ) | const |
|
virtual |
| QString qx::IxDataMember::getTypeParent | ( | ) | const |
|
inline |
Definition at line 244 of file IxDataMember.h.
|
inline |
Definition at line 227 of file IxDataMember.h.
|
inline |
Definition at line 228 of file IxDataMember.h.
|
inline |
Definition at line 233 of file IxDataMember.h.
|
inline |
Definition at line 229 of file IxDataMember.h.
|
inline |
Definition at line 230 of file IxDataMember.h.
| long qx::IxDataMember::getVersion | ( | ) | const |
| bool qx::IxDataMember::hasSqlRelation | ( | ) | const |
|
pure virtual |
| bool qx::IxDataMember::isPartOfPrimaryKey | ( | int | iIndexNameFK, |
| IxDataMember *& | pPrimaryKey, | ||
| int & | iIndexNamePK ) const |
| bool qx::IxDataMember::isThereRelationPartOfPrimaryKey | ( | int | iIndexNamePK, |
| IxSqlRelation *& | pRelation, | ||
| int & | iIndexNameFK ) const |
|
private |
| void qx::IxDataMember::setAccessDataPointer | ( | bool | b | ) |
| void qx::IxDataMember::setAutoIncrement | ( | bool | b | ) |
| void qx::IxDataMember::setDao | ( | bool | b | ) |
| void qx::IxDataMember::setDefaultValue | ( | const QVariant & | v | ) |
| void qx::IxDataMember::setDescription | ( | const QString & | s | ) |
| void qx::IxDataMember::setFormat | ( | const QString & | s | ) |
| void qx::IxDataMember::setIsIndex | ( | bool | b | ) |
| void qx::IxDataMember::setIsPrimaryKey | ( | bool | b | ) |
| void qx::IxDataMember::setIsUnique | ( | bool | b | ) |
| void qx::IxDataMember::setMaxLength | ( | int | iMaxLength, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setMaxValue | ( | double | dMaxValue, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setMaxValue | ( | long | lMaxValue, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setMinLength | ( | int | iMinLength, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setMinValue | ( | double | dMinValue, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setMinValue | ( | long | lMinValue, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setName | ( | const QString & | s | ) |
| void qx::IxDataMember::setNameParent | ( | const QString & | s | ) |
| void qx::IxDataMember::setNotNull | ( | bool | bNotNull, |
| const QString & | sMessage = QString() ) |
| void qx::IxDataMember::setParent | ( | IxDataMemberX * | p | ) |
| void qx::IxDataMember::setPartOfPrimaryKey | ( | int | iIndexNameFK, |
| IxDataMember * | pPrimaryKey, | ||
| int | iIndexNamePK ) |
| void qx::IxDataMember::setPrecision | ( | int | i | ) |
| void qx::IxDataMember::setReadOnly | ( | bool | b | ) |
| void qx::IxDataMember::setRelationPartOfPrimaryKey | ( | int | iIndexNamePK, |
| IxSqlRelation * | pRelation, | ||
| int | iIndexNameFK ) |
| void qx::IxDataMember::setRequired | ( | bool | b | ) |
| void qx::IxDataMember::setSerialize | ( | bool | b | ) |
| void qx::IxDataMember::setSqlAlias | ( | const QString & | s | ) |
| void qx::IxDataMember::setSqlPlaceHolder | ( | QSqlQuery & | query, |
| void * | pOwner, | ||
| const QString & | sAppend = QString(), | ||
| const QString & | sOtherName = QString(), | ||
| bool | bCheckFKPartOfPK = false, | ||
| qx::QxCollection< QString, QVariantList > * | pLstExecBatch = NULL ) const |
| void qx::IxDataMember::setSqlRelation | ( | IxSqlRelation * | p | ) |
| void qx::IxDataMember::setSqlType | ( | const QString & | s | ) |
|
inline |
Definition at line 252 of file IxDataMember.h.
| void qx::IxDataMember::setVersion | ( | long | l | ) |
| QJsonValue qx::IxDataMember::toJson | ( | const void * | pOwner | ) | const |
|
pure virtual |
|
pure virtual |
| QVariant qx::IxDataMember::toVariant | ( | const void * | pOwner, |
| int | iIndexName = -1, | ||
| qx::cvt::context::ctx_type | ctx = qx::cvt::context::e_no_context ) const |
|
friend |
Definition at line 98 of file IxDataMember.h.
|
private |
Private implementation idiom.
Definition at line 107 of file IxDataMember.h.