/[gnue]/gnue-appserver/src/geasList.py
ViewVC logotype

Diff of /gnue-appserver/src/geasList.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by reinhard, Mon Sep 1 20:11:37 2003 UTC revision 1.30 by reinhard, Wed Sep 10 20:31:39 2003 UTC
# Line 85  class geasList: Line 85  class geasList:
85    
86    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
87    # Populate the list with a single instance with given gnue_id, and return    # Populate the list with a single instance with given gnue_id, and return
88    # that instance    # that instance, return an exception if not found
89    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
90    
91    def find (self, object_id):    def find (self, object_id):
92      self.populate ([['eq', ''], ['field', 'gnue_id'], ['const', object_id]])      self.populate ([['eq', ''], ['field', 'gnue_id'], ['const', object_id]])
93      return self.firstInstance ()      result = self.firstInstance ()
94        if result == None:
95          raise Exception, "Can't find object ID '%s' in class '%s'" % \
96                           (object_id, self._classdef.fullName)
97        return result
98    
99    # ---------------------------------------------------------------------------    # ---------------------------------------------------------------------------
100    # Populate the list with a single empty instance, and return that instance    # Populate the list with a single empty instance, and return that instance

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26