source: src/mvc/track.h @ 005e2b7

qt5
Last change on this file since 005e2b7 was 005e2b7, checked in by korrco <korrco@…>, 12 years ago

caching removed

  • Property mode set to 100644
File size: 872 bytes
Line 
1/*
2 * track.h
3 *
4 *  Created on: Dec 27, 2009
5 *      Author: Pavol Korinek
6 */
7
8#ifndef TRACK_H_
9#define TRACK_H_
10
11#include <ormrecord.h>
12
13class Track : public OrmRecord<Track>
14{
15public:
16    static const QSqlRecord sColumns;
17    static const QSqlRecord sInsertColumns;
18    static QString const sTableName;
19    static const int sTableColCount;
20    static const QString NAME;
21public:
22    static QMap<int, Track> mIdToTrack;
23public:
24    int insert();
25    int id() const { return value("id").toInt(); }
26    void setId(int id) { setValue("id", id); }
27    QString name() const { return value("name").toString(); }
28    void setName(const QString & type) { setValue("name", type); }
29public:
30    static QList<Track> getAll();
31    static Track retrieve(int id);
32    static QString retrieveTrackName(int id);
33    static Track retrieveByName(QString name);
34};
35
36#endif /* TRACK_H_ */
Note: See TracBrowser for help on using the repository browser.