Projekt

Allgemein

Profil

Herunterladen als
Herunterladen (3,38 KB) Statistiken
| Zweig: | Revision:
4e75d5a1 Christian Ehringfeld
#include "attribute.h"
d27d606d Christian Ehringfeld
#include "entityhelper.h"
4e75d5a1 Christian Ehringfeld
using namespace CuteEntityManager;

46d2de48 Christian Ehringfeld
Attribute::Attribute(QString name, QString columnName, QString tableName,
d27d606d Christian Ehringfeld
const QMetaObject *metaObj, QString relatedTable, const QMetaObject *relatedClass,
QString conjunctedTable, QString relatedColumnName, QString baseTableName,
const QMetaObject *baseMetaObj) {
46d2de48 Christian Ehringfeld
this->name = name;
d27d606d Christian Ehringfeld
this->columnName = columnName;
46d2de48 Christian Ehringfeld
this->tableName = tableName;
this->metaObj = metaObj;
this->relatedTable = relatedTable;
this->relatedClass = relatedClass;
this->conjunctedTable = conjunctedTable;
d27d606d Christian Ehringfeld
this->relatedColumnName = relatedColumnName;
this->baseMetaObj = baseMetaObj;
this->baseTableName = baseTableName;
46d2de48 Christian Ehringfeld
}

95a2ba7e Christian Ehringfeld
QString Attribute::toString() const {
f9dccfc5 Christian Ehringfeld
return ("Attribute: " + this->name + " " + this->columnName + " " + this->tableName + " " +
this->relatedTable + " " + this->relatedColumnName + " " + this->conjunctedTable);
95a2ba7e Christian Ehringfeld
}


46d2de48 Christian Ehringfeld
QString Attribute::getName() const {
return name;
}

void Attribute::setName(const QString &value) {
name = value;
}

QString Attribute::getColumnName() const {
return columnName;
}

void Attribute::setColumnName(const QString &value) {
columnName = value;
}

QString Attribute::getTableName() const {
return tableName;
}

void Attribute::setTableName(const QString &value) {
tableName = value;
}

QString Attribute::getRelatedTable() const {
return relatedTable;
}

void Attribute::setRelatedTable(const QString &value) {
relatedTable = value;
}

QString Attribute::getConjunctedTable() const {
return conjunctedTable;
}

void Attribute::setConjunctedTable(const QString &value) {
conjunctedTable = value;
}

d27d606d Christian Ehringfeld
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,
95a2ba7e Christian Ehringfeld
const Relation &relation,
d27d606d Christian Ehringfeld
const QString &conjunctedTable, const QString &relatedColumnName) {
this->relatedTable = tableName;
this->relatedClass = relatedMetaObj;
this->conjunctedTable = conjunctedTable;
this->relatedColumnName = relatedColumnName;
95a2ba7e Christian Ehringfeld
this->relation = relation;
d27d606d Christian Ehringfeld
}

const QMetaProperty Attribute::getMetaProperty() {
return EntityHelper::getMetaProperties(this->getMetaObj()).value(this->getName());
}

const QMetaObject *Attribute::getMetaObj() const {
46d2de48 Christian Ehringfeld
return metaObj;
}

d27d606d Christian Ehringfeld
void Attribute::setMetaObj(const QMetaObject *value) {
46d2de48 Christian Ehringfeld
metaObj = value;
4e75d5a1 Christian Ehringfeld
}

d27d606d Christian Ehringfeld
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;
}

95a2ba7e Christian Ehringfeld
Relation Attribute::getRelation() const {
return relation;
}