equal
deleted
inserted
replaced
1 """mixins of entity/views organized somewhat in a graph or tree structure |
1 """mixins of entity/views organized somewhat in a graph or tree structure |
2 |
2 |
3 |
3 |
4 :organization: Logilab |
4 :organization: Logilab |
5 :copyright: 2001-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
5 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
6 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
7 """ |
7 """ |
8 __docformat__ = "restructuredtext en" |
8 __docformat__ = "restructuredtext en" |
9 |
9 |
10 from logilab.common.decorators import cached |
10 from logilab.common.decorators import cached |
185 rset = self.req.execute('Any T, TN WHERE T name %(n)s, T transition_of E, E name %(e)s', |
185 rset = self.req.execute('Any T, TN WHERE T name %(n)s, T transition_of E, E name %(e)s', |
186 {'n': trname, 'e': str(self.e_schema)}) |
186 {'n': trname, 'e': str(self.e_schema)}) |
187 if rset: |
187 if rset: |
188 return rset.get_entity(0, 0) |
188 return rset.get_entity(0, 0) |
189 return None |
189 return None |
190 |
190 |
191 def change_state(self, stateeid, trcomment=None, trcommentformat=None): |
191 def change_state(self, stateeid, trcomment=None, trcommentformat=None): |
192 """change the entity's state according to a state defined in given |
192 """change the entity's state according to a state defined in given |
193 parameters |
193 parameters |
194 """ |
194 """ |
195 if trcomment: |
195 if trcomment: |