Herunterladen als
root/src/attribute.h @ 7b467bf5
4e75d5a1 | Christian Ehringfeld | #ifndef ATTRIBUTE_H
|
|
#define ATTRIBUTE_H
|
|||
#include <QString>
|
|||
d27d606d | Christian Ehringfeld | #include <QMetaObject>
|
|
95a2ba7e | Christian Ehringfeld | #include "relation.h"
|
|
4e75d5a1 | Christian Ehringfeld | namespace CuteEntityManager {
|
|
class Attribute {
|
|||
public:
|
|||
d27d606d | Christian Ehringfeld | Attribute(QString name, QString columnName, QString tableName, const QMetaObject *metaObj,
|
|
QString relatedTable = "", const QMetaObject *relatedClass = nullptr,
|
|||
QString conjunctedTable = "", QString relatedColumnName = "", QString baseTableName = "",
|
|||
const QMetaObject *baseMetaObj = nullptr);
|
|||
46d2de48 | Christian Ehringfeld | QString getName() const;
|
|
void setName(const QString &value);
|
|||
QString getColumnName() const;
|
|||
void setColumnName(const QString &value);
|
|||
QString getTableName() const;
|
|||
void setTableName(const QString &value);
|
|||
QString getRelatedTable() const;
|
|||
void setRelatedTable(const QString &value);
|
|||
QString getConjunctedTable() const;
|
|||
void setConjunctedTable(const QString &value);
|
|||
d27d606d | Christian Ehringfeld | QString getBaseTableName() const;
|
|
void setBaseTableName(const QString &value);
|
|||
void setInheritance(const QString &baseTableName, const QMetaObject *baseMetaObj);
|
|||
95a2ba7e | Christian Ehringfeld | void setRelation(const QString &tableName, const QMetaObject *relatedMetaObj, const Relation &relation = Relation(),
|
|
d27d606d | Christian Ehringfeld | const QString &conjunctedTable = "", const QString &relatedColumnName = "");
|
|
const QMetaProperty getMetaProperty();
|
|||
const QMetaObject *getMetaObj() const;
|
|||
void setMetaObj(const QMetaObject *value);
|
|||
const QMetaObject *getBaseMetaObj() const;
|
|||
void setBaseMetaObj(const QMetaObject *value);
|
|||
const QMetaObject *getRelatedClass() const;
|
|||
void setRelatedClass(const QMetaObject *value);
|
|||
QString getRelatedColumnName() const;
|
|||
void setRelatedColumnName(const QString &value);
|
|||
46d2de48 | Christian Ehringfeld | ||
95a2ba7e | Christian Ehringfeld | Relation getRelation() const;
|
|
QString toString() const;
|
|||
private:
|
|||
4e75d5a1 | Christian Ehringfeld | QString name;
|
|
46d2de48 | Christian Ehringfeld | QString columnName;
|
|
QString tableName;
|
|||
d27d606d | Christian Ehringfeld | const QMetaObject *metaObj;
|
|
QString baseTableName;
|
|||
const QMetaObject *baseMetaObj;
|
|||
4e75d5a1 | Christian Ehringfeld | QString relatedTable;
|
|
d27d606d | Christian Ehringfeld | const QMetaObject *relatedClass;
|
|
95a2ba7e | Christian Ehringfeld | Relation relation;
|
|
d27d606d | Christian Ehringfeld | QString relatedColumnName;
|
|
46d2de48 | Christian Ehringfeld | QString conjunctedTable;
|
|
4e75d5a1 | Christian Ehringfeld | };
|
|
}
|
|||
#endif // ATTRIBUTE_H
|