+QStringList Event::persons()
+{
+ if( mPersonsList.isEmpty() )
+ {
+ QSqlQuery query;
+ query.prepare("SELECT person.name FROM person INNER JOIN event_person ON person.id = event_person.xid_person AND event_person.xid_event = :id AND event_person.xid_conference = :conf1 AND person.xid_conference = :conf2");
+ query.bindValue(":id", id());
+ query.bindValue(":conf1", conferenceId());
+ query.bindValue(":conf2", conferenceId());
+ if (!query.exec()) qDebug() << query.lastError();
+
+ while(query.next())
+ mPersonsList.append(query.record().value("name").toString());
+ }
+
+ return mPersonsList;
+}
+
+QMap<QString,QString> Event::links()
+{
+ if ( mLinksList.isEmpty() )
+ {
+ QSqlQuery query;
+ query.prepare("SELECT name,url FROM link WHERE xid_event = :id AND xid_conference = :conf");
+ query.bindValue(":id", id());
+ query.bindValue(":conf", conferenceId());
+ query.exec();
+ // TODO: handle qeury error
+ //qDebug() << query.lastError();
+
+ while(query.next())
+ mLinksList.insert(query.record().value("name").toString(), query.record().value("url").toString());
+ }
+ return mLinksList;
+}
+
+bool Event::hasTimeConflict() const
+{
+ if(!isFavourite()) // if it's not favourite, it can't have time-conflict
+ return false;
+
+ return conflictEvents(id(),conferenceId()).count() > 0 ? true : false;