Revision 4d58ef6a
Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt
src/entity.cpp | ||
---|---|---|
/*
|
||
Base class for all models
|
||
Copyright (C) 2013 Christian Ehringfeld <c.ehringfeld@t-online.de>
|
||
|
||
This file is part of OpenTeacherTool.
|
||
|
||
OpenTeacherTool is free software: you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation, either version 3 of the License, or
|
||
(at your option) any later version.
|
||
|
||
OpenTeacherTool is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with OpenTeacherTool. If not, see <http://www.gnu.org/licenses/>.
|
||
*/
|
||
* Copyright (C) 2015 Christian Ehringfeld <c.ehringfeld@t-online.de>
|
||
*
|
||
* This program is free software; you can redistribute it and/or modify it
|
||
* under the terms of the GNU Lesser General Public License as published by
|
||
* the Free Software Foundation.
|
||
*
|
||
* This program is distributed in the hope that it will be useful, but
|
||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||
* for more details.
|
||
*
|
||
* You should have received a copy of the GNU Lesser General Public License
|
||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||
*/
|
||
|
||
#include "entity.h"
|
||
|
||
namespace OpenTeacherTool {
|
||
namespace CuteEntityManager {
|
||
|
||
Entity::Entity() {
|
||
Entity::Entity() : QObject(){
|
||
this->id = -1;
|
||
this->relations = new QHash<QString,Entity*>();
|
||
this->attributeValues = new QHash<QString, QVariant>();
|
||
}
|
||
|
||
qint64 Entity::getId() {
|
||
... | ... | |
}
|
||
|
||
void Entity::setId(qint64 id) {
|
||
this->id = id;
|
||
this->id = id;
|
||
}
|
||
|
||
Entity::~Entity() {
|
||
delete this->relations;
|
||
delete this->attributeValues;
|
||
}
|
||
|
||
Entity* Entity::getEntity() {
|
||
return this;
|
||
}
|
||
|
||
QString Entity::idColumnSQL() {
|
||
return "id BIGINT NOT NULL";
|
||
}
|
||
|
||
//QHash<QString, QString> OpenTeacherTool::Entity::getProperties(Datebasetype t) {
|
Auch abrufbar als: Unified diff
some stuff