Allow to find and select the default distributors

This commit is contained in:
Klaus Basan
2018-11-14 04:23:22 +01:00
parent b937f10992
commit c94a619599
6 changed files with 79 additions and 1 deletions

View File

@@ -47,6 +47,19 @@ namespace BlackMisc
return this->container().findFirstByOrDefault(&OBJ::getDbKey, key, notFound);
}
template<class OBJ, class CONTAINER, typename KEYTYPE>
CONTAINER IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::findByKeys(const QSet<KEYTYPE> &keys) const
{
CONTAINER objects;
if (keys.isEmpty()) { return objects; }
for (const OBJ &obj : ITimestampObjectList<OBJ, CONTAINER>::container())
{
if (!keys.contains(obj.getDbKey())) { continue; }
objects.push_back(obj);
}
return objects;
}
template<class OBJ, class CONTAINER, typename KEYTYPE>
CONTAINER IDatastoreObjectList<OBJ, CONTAINER, KEYTYPE>::findObjectsWithDbKey() const
{