[Mpuls-commits] r1972 - wasko/branches/2.0/jmdweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 16 12:48:10 CET 2010


Author: torsten
Date: 2010-03-16 12:48:10 +0100 (Tue, 16 Mar 2010)
New Revision: 1972

Modified:
   wasko/branches/2.0/jmdweb/model/case.py
Log:
* jmdweb/model/case.py (CaseOverview): Inherit from mpulsbase.



Modified: wasko/branches/2.0/jmdweb/model/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/model/case.py	2010-03-16 11:46:00 UTC (rev 1971)
+++ wasko/branches/2.0/jmdweb/model/case.py	2010-03-16 11:48:10 UTC (rev 1972)
@@ -47,9 +47,8 @@
 from mpulsweb.model.user import UserObject
 from mpulsweb.model.agencysettings import Agency
 from mpulsweb.model.document import listDocuments
-from mpulsweb.model.case import MpulsCase, MpulsCaseFactory
+from mpulsweb.model.case import MpulsCase, MpulsCaseFactory, MpulsCaseOverview
 
-from jmdweb.lib.search import CaseSearch
 #from jmdweb.lib.csv import exportAsCSV
 #from jmdweb.lib.excel import exportAsXLS
 #from jmdweb.lib.xmlexport import exportAsXML
@@ -277,29 +276,9 @@
             db.recycleConnection(con, cur)
 
 
-class CaseOverview:
+class CaseOverview(MpulsCaseOverview):
+    pass
 
-    def __init__(self):
-        self.ds_list = []
-
-    def search(self, search_str=None):
-        self.ds_list = []
-        search = CaseSearch(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
-
-
 class CaseFactory(MpulsCaseFactory):
 
     def _initNewCase(self, id):



More information about the Mpuls-commits mailing list