From a4d37b7b3eb045387c5a7585f1b140c95e367577 Mon Sep 17 00:00:00 2001 From: Sverre Rabbelier Date: Sat, 19 Apr 2008 13:47:04 +0200 Subject: [PATCH] Added a getmulti(SelectionMaskPtr) to SavableManager. --- src/DAL/SavableManager.cpp | 8 +++++++- src/DAL/SavableManager.h | 16 ++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/DAL/SavableManager.cpp b/src/DAL/SavableManager.cpp index 0c2dd30..0bd2dbd 100644 --- a/src/DAL/SavableManager.cpp +++ b/src/DAL/SavableManager.cpp @@ -86,8 +86,14 @@ SavableManagersPtr SavableManager::getmulti(FieldValuesPtr values, const Joins& mask->addJoin(join); } - SqliteMgr::Get()->doSelectMulti(mask.get()); + return getmulti(mask); +} + +SavableManagersPtr SavableManager::getmulti(SelectionMaskPtr mask) // static +{ + Assert(mask); + SqliteMgr::Get()->doSelectMulti(mask.get()); return mask->getResult(); } diff --git a/src/DAL/SavableManager.h b/src/DAL/SavableManager.h index d3414f0..ac11918 100644 --- a/src/DAL/SavableManager.h +++ b/src/DAL/SavableManager.h @@ -61,7 +61,7 @@ class SavableManager : public boost::enable_shared_from_this * Select multiple entries from the database restricting on the specified values. * * This method wraps the creation of the SelectionMask and the call to the database. - * This is the preferred method of selection multiple rows from the database is through 'getmulti'. + * This is the preferred method of selection multiple rows from the database. * * @param values The values to filter on. * @return A SavableManagers bucket containing the retreived data. @@ -73,7 +73,7 @@ class SavableManager : public boost::enable_shared_from_this * Select multiple entries from the database restricting on the specified values. * * This method wraps the creation of the SelectionMask and the call to the database. - * This is the preferred method of selection multiple rows from the database is through 'getmulti'. + * This is the preferred method of selection multiple rows from the database. * * @param values The values to filter on. * @param joins The joins to extend the selection with. @@ -82,6 +82,18 @@ class SavableManager : public boost::enable_shared_from_this */ static SavableManagersPtr getmulti(FieldValuesPtr values, const Joins& joins); + /** + * Select multiple entries from the database restricting with the specified mask. + * + * This method uses the specified mask to make the call to the database. + * This is the preferred method of selection multiple rows from the database. + * + * @param mask The mask to use. + * @return A SavableManagers bucket containing the retreived data. + * @see SelectionMask + */ + static SavableManagersPtr getmulti(SelectionMaskPtr mask); + /** Returns a new manager for the specified table, it is not yet stored in the database. */ static SavableManagerPtr getnew(TableImplPtr table); -- 2.11.4.GIT