![]() |
QxOrm 1.1.6
C++ Object Relational Mapping library
|
qx::IxDataMember : common interface for all class properties registered into QxOrm context More...
#include <IxDataMember.h>
Public Member Functions | |
IxDataMember (const QString &sKey) | |
IxDataMember (const QString &sKey, long lVersion, bool bSerialize, bool bDao) | |
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 |
IxDataMemberX * | getParent () const |
IxSqlRelation * | getSqlRelation () const |
bool | hasSqlRelation () const |
void | setName (const QString &sName) |
void | setNameParent (const QString &sName) |
void | setDescription (const QString &sDesc) |
void | setFormat (const QString &sFormat) |
void | setSqlType (const QString &sSqlType) |
void | setSqlAlias (const QString &sSqlAlias) |
void | setVersion (long lVersion) |
void | setSerialize (bool bSerialize) |
void | setDao (bool bDao) |
void | setDefaultValue (const QVariant &var) |
void | setMinValue (const QVariant &var) |
void | setMaxValue (const QVariant &var) |
void | setPrecision (int iPrecision) |
void | setMinLength (int iMinLength) |
void | setMaxLength (int iMaxLength) |
void | setRequired (bool bRequired) |
void | setReadOnly (bool bReadOnly) |
void | setAutoIncrement (bool bAutoIncrement) |
void | setNotNull (bool bNotNull) |
void | setIsPrimaryKey (bool bIsPrimaryKey) |
void | setParent (IxDataMemberX *pParent) |
void | setSqlRelation (IxSqlRelation *pSqlRelation) |
QString | getName (int iIndex, const QString &sOtherName=QString()) const |
QString | getSqlAlias (const QString &sTable=QString(), bool bClauseWhere=false, int iIndexName=0) 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()) const |
void | setSqlPlaceHolder (QSqlQuery &query, void *pOwner, const QString &sAppend=QString(), const QString &sOtherName=QString()) const |
QString | getSqlAliasEqualToPlaceHolder (const QString &sTable=QString(), bool bClauseWhere=false, const QString &sAppend=QString(), const QString &sSep=QString(" AND ")) const |
QString | getSqlNameEqualToPlaceHolder (const QString &sAppend=QString(), const QString &sSep=QString(" AND ")) const |
QString | getSqlTablePointNameAsAlias (const QString &sTable, const QString &sSep=QString(", ")) const |
QString | getSqlName (const QString &sSep=QString(", "), const QString &sOtherName=QString()) const |
QString | getSqlNameAndTypeAndParams (const QString &sSep=QString(", "), const QString &sOtherName=QString()) const |
virtual bool | isEqual (const void *pOwner1, const void *pOwner2) const =0 |
virtual boost::any | getDataPtr (const void *pOwner) const =0 |
virtual boost::any | getDataPtr (void *pOwner)=0 |
virtual void * | getDataVoidPtr (const void *pOwner) const =0 |
virtual void * | getDataVoidPtr (void *pOwner)=0 |
virtual qx_bool | isValid (const void *pOwner) const =0 |
virtual qx_bool | isValid (void *pOwner)=0 |
virtual QString | toString (const void *pOwner, const QString &sFormat, int iIndexName=-1) const =0 |
virtual qx_bool | fromString (void *pOwner, const QString &s, const QString &sFormat, int iIndexName=-1)=0 |
virtual QVariant | toVariant (const void *pOwner, const QString &sFormat, int iIndexName=-1) const =0 |
virtual qx_bool | fromVariant (void *pOwner, const QVariant &v, const QString &sFormat, int iIndexName=-1)=0 |
QString | toString (const void *pOwner, int iIndexName=-1) const |
qx_bool | fromString (void *pOwner, const QString &s, int iIndexName=-1) |
QVariant | toVariant (const void *pOwner, int iIndexName=-1) const |
qx_bool | fromVariant (void *pOwner, const QVariant &v, int iIndexName=-1) |
Protected Attributes | |
QString | m_sKey |
Data key. | |
QString | m_sName |
Data name <=> database record name (if empty => data key) | |
QString | m_sNameParent |
Data parent name <=> database table name. | |
QString | m_sDescription |
Data description. | |
QString | m_sFormat |
Data format ('%04d' for example) | |
QString | m_sSqlType |
Data sql type. | |
QString | m_sSqlAlias |
Data sql alias. | |
long | m_lVersion |
Data version creation. | |
bool | m_bSerialize |
Data must be serialized. | |
bool | m_bDao |
Data is associated with a data source. | |
QVariant | m_vDefaultValue |
Data default value under QVariant format. | |
QVariant | m_vMinValue |
Data minimum value under QVariant format. | |
QVariant | m_vMaxValue |
Data maximum value under QVariant format. | |
int | m_iPrecision |
Data precision for numerics values (double, float, etc...) | |
int | m_iMinLength |
Data minimum length (-1 <=> no min length) | |
int | m_iMaxLength |
Data maximum length (-1 <=> no max length) | |
bool | m_bRequired |
Data is required or optional. | |
bool | m_bReadOnly |
Data is read-only. | |
bool | m_bAutoIncrement |
Data value is auto-generated (auto-increment) | |
bool | m_bNotNull |
Data can be null or not. | |
bool | m_bIsPrimaryKey |
Data is a primary key. | |
QByteArray | m_byteName |
Optimization to retrieve name under "const char *" format. | |
const char * | m_pName |
Optimization to retrieve name under "const char *" format. | |
QStringList | m_lstNames |
Particular case of "boost::tuple<>" data member (multi-column primary key, composite key) | |
boost::scoped_ptr< IxSqlRelation > | m_pSqlRelation |
Sql relation to build/resolve sql query. | |
IxDataMemberX * | m_pParent |
'IxDataMemberX' parent | |
Private Member Functions | |
void | updateNamePtr () |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
qx::IxDataMember : common interface for all class properties registered into QxOrm context
Definition at line 74 of file IxDataMember.h.
qx::IxDataMember::IxDataMember | ( | const QString & | sKey | ) | [inline] |
Definition at line 110 of file IxDataMember.h.
qx::IxDataMember::IxDataMember | ( | const QString & | sKey, |
long | lVersion, | ||
bool | bSerialize, | ||
bool | bDao | ||
) | [inline] |
Definition at line 111 of file IxDataMember.h.
virtual qx::IxDataMember::~IxDataMember | ( | ) | [pure virtual] |
virtual qx_bool qx::IxDataMember::fromString | ( | void * | pOwner, |
const QString & | s, | ||
const QString & | sFormat, | ||
int | iIndexName = -1 |
||
) | [pure virtual] |
qx_bool qx::IxDataMember::fromString | ( | void * | pOwner, |
const QString & | s, | ||
int | iIndexName = -1 |
||
) | [inline] |
Definition at line 188 of file IxDataMember.h.
virtual qx_bool qx::IxDataMember::fromVariant | ( | void * | pOwner, |
const QVariant & | v, | ||
const QString & | sFormat, | ||
int | iIndexName = -1 |
||
) | [pure virtual] |
qx_bool qx::IxDataMember::fromVariant | ( | void * | pOwner, |
const QVariant & | v, | ||
int | iIndexName = -1 |
||
) | [inline] |
Definition at line 190 of file IxDataMember.h.
bool qx::IxDataMember::getAutoIncrement | ( | ) | const [inline] |
Definition at line 132 of file IxDataMember.h.
bool qx::IxDataMember::getDao | ( | ) | const [inline] |
Definition at line 123 of file IxDataMember.h.
virtual boost::any qx::IxDataMember::getDataPtr | ( | const void * | pOwner | ) | const [pure virtual] |
virtual boost::any qx::IxDataMember::getDataPtr | ( | void * | pOwner | ) | [pure virtual] |
virtual void* qx::IxDataMember::getDataVoidPtr | ( | const void * | pOwner | ) | const [pure virtual] |
virtual void* qx::IxDataMember::getDataVoidPtr | ( | void * | pOwner | ) | [pure virtual] |
QVariant qx::IxDataMember::getDefaultValue | ( | ) | const [inline] |
Definition at line 124 of file IxDataMember.h.
QString qx::IxDataMember::getDescription | ( | ) | const [inline] |
Definition at line 119 of file IxDataMember.h.
QString qx::IxDataMember::getFormat | ( | ) | const [inline] |
Definition at line 120 of file IxDataMember.h.
bool qx::IxDataMember::getIsPrimaryKey | ( | ) | const [inline] |
Definition at line 134 of file IxDataMember.h.
QString qx::IxDataMember::getKey | ( | ) | const [inline] |
Definition at line 114 of file IxDataMember.h.
int qx::IxDataMember::getMaxLength | ( | ) | const [inline] |
Definition at line 129 of file IxDataMember.h.
QVariant qx::IxDataMember::getMaxValue | ( | ) | const [inline] |
Definition at line 126 of file IxDataMember.h.
int qx::IxDataMember::getMinLength | ( | ) | const [inline] |
Definition at line 128 of file IxDataMember.h.
QVariant qx::IxDataMember::getMinValue | ( | ) | const [inline] |
Definition at line 125 of file IxDataMember.h.
QString qx::IxDataMember::getName | ( | ) | const [inline] |
Definition at line 115 of file IxDataMember.h.
QString qx::IxDataMember::getName | ( | int | iIndex, |
const QString & | sOtherName = QString() |
||
) | const |
int qx::IxDataMember::getNameCount | ( | ) | const [inline] |
Definition at line 116 of file IxDataMember.h.
QString qx::IxDataMember::getNameParent | ( | ) | const [inline] |
Definition at line 117 of file IxDataMember.h.
const char* qx::IxDataMember::getNamePtr | ( | ) | const [inline] |
Definition at line 118 of file IxDataMember.h.
bool qx::IxDataMember::getNotNull | ( | ) | const [inline] |
Definition at line 133 of file IxDataMember.h.
IxDataMemberX* qx::IxDataMember::getParent | ( | ) | const [inline] |
Definition at line 135 of file IxDataMember.h.
int qx::IxDataMember::getPrecision | ( | ) | const [inline] |
Definition at line 127 of file IxDataMember.h.
bool qx::IxDataMember::getReadOnly | ( | ) | const [inline] |
Definition at line 131 of file IxDataMember.h.
bool qx::IxDataMember::getRequired | ( | ) | const [inline] |
Definition at line 130 of file IxDataMember.h.
bool qx::IxDataMember::getSerialize | ( | ) | const [inline] |
Definition at line 122 of file IxDataMember.h.
QString qx::IxDataMember::getSqlAlias | ( | const QString & | sTable = QString() , |
bool | bClauseWhere = false , |
||
int | iIndexName = 0 |
||
) | const |
QString qx::IxDataMember::getSqlAliasEqualToPlaceHolder | ( | const QString & | sTable = QString() , |
bool | bClauseWhere = false , |
||
const QString & | sAppend = QString() , |
||
const QString & | sSep = QString(" AND ") |
||
) | const |
QString qx::IxDataMember::getSqlName | ( | const QString & | sSep = QString(", ") , |
const QString & | sOtherName = QString() |
||
) | const |
QString qx::IxDataMember::getSqlNameAndTypeAndParams | ( | const QString & | sSep = QString(", ") , |
const QString & | sOtherName = QString() |
||
) | const |
QString qx::IxDataMember::getSqlNameEqualToPlaceHolder | ( | const QString & | sAppend = QString() , |
const QString & | sSep = QString(" AND ") |
||
) | const |
QString qx::IxDataMember::getSqlPlaceHolder | ( | const QString & | sAppend = QString() , |
int | iIndexName = 0 , |
||
const QString & | sSep = QString(", ") , |
||
const QString & | sOtherName = QString() |
||
) | const |
IxSqlRelation* qx::IxDataMember::getSqlRelation | ( | ) | const [inline] |
Definition at line 136 of file IxDataMember.h.
QString qx::IxDataMember::getSqlTablePointNameAsAlias | ( | const QString & | sTable, |
const QString & | sSep = QString(", ") |
||
) | const |
QString qx::IxDataMember::getSqlType | ( | int | iIndexName = -1 | ) | const |
QString qx::IxDataMember::getSqlTypeAndParams | ( | int | iIndexName = -1 | ) | const |
long qx::IxDataMember::getVersion | ( | ) | const [inline] |
Definition at line 121 of file IxDataMember.h.
bool qx::IxDataMember::hasSqlRelation | ( | ) | const [inline] |
Definition at line 137 of file IxDataMember.h.
virtual bool qx::IxDataMember::isEqual | ( | const void * | pOwner1, |
const void * | pOwner2 | ||
) | const [pure virtual] |
virtual qx_bool qx::IxDataMember::isValid | ( | void * | pOwner | ) | [pure virtual] |
virtual qx_bool qx::IxDataMember::isValid | ( | const void * | pOwner | ) | const [pure virtual] |
void qx::IxDataMember::serialize | ( | Archive & | ar, |
const unsigned int | version | ||
) | [private] |
void qx::IxDataMember::setAutoIncrement | ( | bool | bAutoIncrement | ) | [inline] |
Definition at line 156 of file IxDataMember.h.
void qx::IxDataMember::setDao | ( | bool | bDao | ) | [inline] |
Definition at line 147 of file IxDataMember.h.
void qx::IxDataMember::setDefaultValue | ( | const QVariant & | var | ) | [inline] |
Definition at line 148 of file IxDataMember.h.
void qx::IxDataMember::setDescription | ( | const QString & | sDesc | ) | [inline] |
Definition at line 141 of file IxDataMember.h.
void qx::IxDataMember::setFormat | ( | const QString & | sFormat | ) | [inline] |
Definition at line 142 of file IxDataMember.h.
void qx::IxDataMember::setIsPrimaryKey | ( | bool | bIsPrimaryKey | ) | [inline] |
Definition at line 158 of file IxDataMember.h.
void qx::IxDataMember::setMaxLength | ( | int | iMaxLength | ) | [inline] |
Definition at line 153 of file IxDataMember.h.
void qx::IxDataMember::setMaxValue | ( | const QVariant & | var | ) | [inline] |
Definition at line 150 of file IxDataMember.h.
void qx::IxDataMember::setMinLength | ( | int | iMinLength | ) | [inline] |
Definition at line 152 of file IxDataMember.h.
void qx::IxDataMember::setMinValue | ( | const QVariant & | var | ) | [inline] |
Definition at line 149 of file IxDataMember.h.
void qx::IxDataMember::setName | ( | const QString & | sName | ) | [inline] |
Definition at line 139 of file IxDataMember.h.
void qx::IxDataMember::setNameParent | ( | const QString & | sName | ) | [inline] |
Definition at line 140 of file IxDataMember.h.
void qx::IxDataMember::setNotNull | ( | bool | bNotNull | ) | [inline] |
Definition at line 157 of file IxDataMember.h.
void qx::IxDataMember::setParent | ( | IxDataMemberX * | pParent | ) | [inline] |
Definition at line 159 of file IxDataMember.h.
void qx::IxDataMember::setPrecision | ( | int | iPrecision | ) | [inline] |
Definition at line 151 of file IxDataMember.h.
void qx::IxDataMember::setReadOnly | ( | bool | bReadOnly | ) | [inline] |
Definition at line 155 of file IxDataMember.h.
void qx::IxDataMember::setRequired | ( | bool | bRequired | ) | [inline] |
Definition at line 154 of file IxDataMember.h.
void qx::IxDataMember::setSerialize | ( | bool | bSerialize | ) | [inline] |
Definition at line 146 of file IxDataMember.h.
void qx::IxDataMember::setSqlAlias | ( | const QString & | sSqlAlias | ) | [inline] |
Definition at line 144 of file IxDataMember.h.
void qx::IxDataMember::setSqlPlaceHolder | ( | QSqlQuery & | query, |
void * | pOwner, | ||
const QString & | sAppend = QString() , |
||
const QString & | sOtherName = QString() |
||
) | const |
void qx::IxDataMember::setSqlRelation | ( | IxSqlRelation * | pSqlRelation | ) | [inline] |
Definition at line 160 of file IxDataMember.h.
void qx::IxDataMember::setSqlType | ( | const QString & | sSqlType | ) | [inline] |
Definition at line 143 of file IxDataMember.h.
void qx::IxDataMember::setVersion | ( | long | lVersion | ) | [inline] |
Definition at line 145 of file IxDataMember.h.
virtual QString qx::IxDataMember::toString | ( | const void * | pOwner, |
const QString & | sFormat, | ||
int | iIndexName = -1 |
||
) | const [pure virtual] |
QString qx::IxDataMember::toString | ( | const void * | pOwner, |
int | iIndexName = -1 |
||
) | const [inline] |
Definition at line 187 of file IxDataMember.h.
virtual QVariant qx::IxDataMember::toVariant | ( | const void * | pOwner, |
const QString & | sFormat, | ||
int | iIndexName = -1 |
||
) | const [pure virtual] |
QVariant qx::IxDataMember::toVariant | ( | const void * | pOwner, |
int | iIndexName = -1 |
||
) | const [inline] |
Definition at line 189 of file IxDataMember.h.
void qx::IxDataMember::updateNamePtr | ( | ) | [inline, private] |
Definition at line 226 of file IxDataMember.h.
bool qx::IxDataMember::m_bAutoIncrement [protected] |
Data value is auto-generated (auto-increment)
Definition at line 97 of file IxDataMember.h.
bool qx::IxDataMember::m_bDao [protected] |
Data is associated with a data source.
Definition at line 88 of file IxDataMember.h.
bool qx::IxDataMember::m_bIsPrimaryKey [protected] |
Data is a primary key.
Definition at line 99 of file IxDataMember.h.
bool qx::IxDataMember::m_bNotNull [protected] |
Data can be null or not.
Definition at line 98 of file IxDataMember.h.
bool qx::IxDataMember::m_bReadOnly [protected] |
Data is read-only.
Definition at line 96 of file IxDataMember.h.
bool qx::IxDataMember::m_bRequired [protected] |
Data is required or optional.
Definition at line 95 of file IxDataMember.h.
bool qx::IxDataMember::m_bSerialize [protected] |
Data must be serialized.
Definition at line 87 of file IxDataMember.h.
QByteArray qx::IxDataMember::m_byteName [protected] |
Optimization to retrieve name under "const char *" format.
Definition at line 101 of file IxDataMember.h.
int qx::IxDataMember::m_iMaxLength [protected] |
Data maximum length (-1 <=> no max length)
Definition at line 94 of file IxDataMember.h.
int qx::IxDataMember::m_iMinLength [protected] |
Data minimum length (-1 <=> no min length)
Definition at line 93 of file IxDataMember.h.
int qx::IxDataMember::m_iPrecision [protected] |
Data precision for numerics values (double, float, etc...)
Definition at line 92 of file IxDataMember.h.
QStringList qx::IxDataMember::m_lstNames [protected] |
Particular case of "boost::tuple<>" data member (multi-column primary key, composite key)
Definition at line 103 of file IxDataMember.h.
long qx::IxDataMember::m_lVersion [protected] |
Data version creation.
Definition at line 86 of file IxDataMember.h.
const char* qx::IxDataMember::m_pName [protected] |
Optimization to retrieve name under "const char *" format.
Definition at line 102 of file IxDataMember.h.
IxDataMemberX* qx::IxDataMember::m_pParent [protected] |
'IxDataMemberX' parent
Definition at line 106 of file IxDataMember.h.
boost::scoped_ptr<IxSqlRelation> qx::IxDataMember::m_pSqlRelation [protected] |
Sql relation to build/resolve sql query.
Definition at line 105 of file IxDataMember.h.
QString qx::IxDataMember::m_sDescription [protected] |
Data description.
Definition at line 82 of file IxDataMember.h.
QString qx::IxDataMember::m_sFormat [protected] |
Data format ('%04d' for example)
Definition at line 83 of file IxDataMember.h.
QString qx::IxDataMember::m_sKey [protected] |
Data key.
Definition at line 79 of file IxDataMember.h.
QString qx::IxDataMember::m_sName [protected] |
Data name <=> database record name (if empty => data key)
Definition at line 80 of file IxDataMember.h.
QString qx::IxDataMember::m_sNameParent [protected] |
Data parent name <=> database table name.
Definition at line 81 of file IxDataMember.h.
QString qx::IxDataMember::m_sSqlAlias [protected] |
Data sql alias.
Definition at line 85 of file IxDataMember.h.
QString qx::IxDataMember::m_sSqlType [protected] |
Data sql type.
Definition at line 84 of file IxDataMember.h.
QVariant qx::IxDataMember::m_vDefaultValue [protected] |
Data default value under QVariant format.
Definition at line 89 of file IxDataMember.h.
QVariant qx::IxDataMember::m_vMaxValue [protected] |
Data maximum value under QVariant format.
Definition at line 91 of file IxDataMember.h.
QVariant qx::IxDataMember::m_vMinValue [protected] |
Data minimum value under QVariant format.
Definition at line 90 of file IxDataMember.h.