Revision d27d606d
Von Christian Ehringfeld vor fast 10 Jahren hinzugefügt
| src/attribute.cpp | ||
|---|---|---|
|
#include "attribute.h"
|
||
|
#include "entityhelper.h"
|
||
|
using namespace CuteEntityManager;
|
||
|
|
||
|
Attribute::Attribute(QString name, QString columnName, QString tableName,
|
||
|
QMetaObject *metaObj, QString relatedTable, QMetaObject *relatedClass,
|
||
|
QString conjunctedTable) {
|
||
|
const QMetaObject *metaObj, QString relatedTable, const QMetaObject *relatedClass,
|
||
|
QString conjunctedTable, QString relatedColumnName, QString baseTableName,
|
||
|
const QMetaObject *baseMetaObj) {
|
||
|
this->name = name;
|
||
|
this->columnName = columnName;
|
||
|
this->tableName = tableName;
|
||
|
this->metaObj = metaObj;
|
||
|
this->relatedTable = relatedTable;
|
||
|
this->relatedClass = relatedClass;
|
||
|
this->conjunctedTable = conjunctedTable;
|
||
|
this->relatedColumnName = relatedColumnName;
|
||
|
this->baseMetaObj = baseMetaObj;
|
||
|
this->baseTableName = baseTableName;
|
||
|
}
|
||
|
|
||
|
QString Attribute::getName() const {
|
||
| ... | ... | |
|
relatedTable = value;
|
||
|
}
|
||
|
|
||
|
QMetaObject *Attribute::getRelatedClass() const {
|
||
|
return relatedClass;
|
||
|
}
|
||
|
|
||
|
void Attribute::setRelatedClass(QMetaObject *value) {
|
||
|
relatedClass = value;
|
||
|
}
|
||
|
|
||
|
QString Attribute::getConjunctedTable() const {
|
||
|
return conjunctedTable;
|
||
|
}
|
||
| ... | ... | |
|
conjunctedTable = value;
|
||
|
}
|
||
|
|
||
|
QMetaObject *Attribute::getMetaObj() const {
|
||
|
QString Attribute::getBaseTableName() const {
|
||
|
return baseTableName;
|
||
|
}
|
||
|
|
||
|
void Attribute::setBaseTableName(const QString &value) {
|
||
|
baseTableName = value;
|
||
|
}
|
||
|
|
||
|
void Attribute::setInheritance(const QString &baseTableName,
|
||
|
const QMetaObject *baseMetaObj) {
|
||
|
this->baseTableName = baseTableName;
|
||
|
this->baseMetaObj = baseMetaObj;
|
||
|
}
|
||
|
|
||
|
void Attribute::setRelation(const QString &tableName, const QMetaObject *relatedMetaObj,
|
||
|
const QString &conjunctedTable, const QString &relatedColumnName) {
|
||
|
this->relatedTable = tableName;
|
||
|
this->relatedClass = relatedMetaObj;
|
||
|
this->conjunctedTable = conjunctedTable;
|
||
|
this->relatedColumnName = relatedColumnName;
|
||
|
}
|
||
|
|
||
|
const QMetaProperty Attribute::getMetaProperty() {
|
||
|
return EntityHelper::getMetaProperties(this->getMetaObj()).value(this->getName());
|
||
|
}
|
||
|
|
||
|
const QMetaObject *Attribute::getMetaObj() const {
|
||
|
return metaObj;
|
||
|
}
|
||
|
|
||
|
void Attribute::setMetaObj(QMetaObject *value) {
|
||
|
void Attribute::setMetaObj(const QMetaObject *value) {
|
||
|
metaObj = value;
|
||
|
}
|
||
|
|
||
|
const QMetaObject *Attribute::getBaseMetaObj() const {
|
||
|
return baseMetaObj;
|
||
|
}
|
||
|
|
||
|
void Attribute::setBaseMetaObj(const QMetaObject *value) {
|
||
|
baseMetaObj = value;
|
||
|
}
|
||
|
|
||
|
const QMetaObject *Attribute::getRelatedClass() const {
|
||
|
return relatedClass;
|
||
|
}
|
||
|
|
||
|
void Attribute::setRelatedClass(const QMetaObject *value) {
|
||
|
relatedClass = value;
|
||
|
}
|
||
|
|
||
|
QString Attribute::getRelatedColumnName() const {
|
||
|
return relatedColumnName;
|
||
|
}
|
||
|
|
||
|
void Attribute::setRelatedColumnName(const QString &value) {
|
||
|
relatedColumnName = value;
|
||
|
}
|
||
|
|
||
Auch abrufbar als: Unified diff
created attribute resolver