[Mpuls-commits] r1970 - wasko/branches/2.0/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Mar 16 12:42:44 CET 2010
Author: torsten
Date: 2010-03-16 12:42:44 +0100 (Tue, 16 Mar 2010)
New Revision: 1970
Modified:
wasko/branches/2.0/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCaseOverview): New. Baseclass for CaseOverviews.
Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py 2010-03-16 11:39:56 UTC (rev 1969)
+++ wasko/branches/2.0/mpulsweb/model/case.py 2010-03-16 11:42:44 UTC (rev 1970)
@@ -511,3 +511,27 @@
The base-class method does nothing. Derived classes should
override this method if necessary.
"""
+
+class MpulsCaseOverview:
+
+ def __init__(self):
+ self.ds_list = []
+
+ def search(self, search_str=None):
+ self.ds_list = []
+ search = g.case_search(g.case_factory.get_search_retrieve_fields(),
+ g.case_factory.get_search_match_fields())
+ result = search.perform(search_str)
+ factory = g.case_factory
+ for row in result:
+ case = factory.loadFromQueryResult(row)
+ self.ds_list.append(case)
+ return self.ds_list
+
+ def numDatasets(self):
+ return len(self.ds_list)
+
+ def getDatasets(self):
+ return self.ds_list
+
+
More information about the Mpuls-commits
mailing list