Herunterladen als
root/src/join.cpp @ 3160499c
5d93390e | Christian Ehringfeld | #include "join.h"
|
|
using namespace CuteEntityManager;
|
|||
Join::Join() {
|
|||
}
|
|||
Join::Join(QString foreignTable, QString condition, QString type) {
|
|||
3160499c | Christian Ehringfeld | this->foreignTable = foreignTable;
|
|
this->condition = Condition(condition);
|
|||
this->type = type;
|
|||
}
|
|||
Join::Join(QString foreignTable, Condition condition, QString type) {
|
|||
5d93390e | Christian Ehringfeld | this->foreignTable = foreignTable;
|
|
this->condition = condition;
|
|||
this->type = type;
|
|||
}
|
|||
QString Join::getType() const {
|
|||
return type;
|
|||
}
|
|||
void Join::setType(const QString &value) {
|
|||
type = value;
|
|||
}
|
|||
QString Join::getForeignTable() const {
|
|||
return foreignTable;
|
|||
}
|
|||
void Join::setForeignTable(const QString &value) {
|
|||
foreignTable = value;
|
|||
}
|
|||
3160499c | Christian Ehringfeld | Condition Join::getCondition() const {
|
|
5d93390e | Christian Ehringfeld | return condition;
|
|
}
|
|||
3160499c | Christian Ehringfeld | QString Join::getMainCondition() const {
|
|
auto conditions = this->condition.getConditions();
|
|||
if (!conditions.isEmpty()) {
|
|||
return conditions.at(0);
|
|||
} else {
|
|||
return "";
|
|||
}
|
|||
5d93390e | Christian Ehringfeld | }
|
|
3160499c | Christian Ehringfeld | void Join::setCondition(const Condition &value) {
|
|
condition = value;
|
|||
}
|