refs #568, specialized lists (timestamp, DB objects, model list)

* remaned to latest/oldestObject
* JSON functions with prefix
* remove by keys
* only add models with model string to QStringList
This commit is contained in:
Klaus Basan
2016-01-08 00:17:16 +01:00
parent 5a17506a97
commit 72256cf86f
7 changed files with 100 additions and 18 deletions

View File

@@ -31,9 +31,18 @@ namespace BlackMisc
//! Sort by timestamp
void sortByKey();
//! From DB JSON
//! All keys as list
QList<int> toDbKeyList() const;
//! Remove objects with key
int removeObjectsWithKeys(const QList<int> &keys);
//! From DB JSON with default prefixes
static CONTAINER fromDatabaseJson(const QJsonArray &array);
//! From DB JSON
static CONTAINER fromDatabaseJson(const QJsonArray &array, const QString &prefix);
protected:
//! Constructor
IDatastoreObjectListWithIntegerKey();
@@ -53,9 +62,15 @@ namespace BlackMisc
//! All keys as string list
QStringList toDbKeyList() const;
//! From DB JSON
//! Remove objects with key
int removeObjectsWithKeys(const QStringList &keys);
//! From DB JSON with default prefixes
static CONTAINER fromDatabaseJson(const QJsonArray &array);
//! From DB JSON
static CONTAINER fromDatabaseJson(const QJsonArray &array, const QString &prefix);
protected:
//! Constructor
IDatastoreObjectListWithStringKey();