__selectors__ compat tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 17 Feb 2009 21:50:41 +0100
branchtls-sprint
changeset 699 cc149f4def1e
parent 698 7dfd03e9e810
child 700 a2471775aef6
__selectors__ compat
common/appobject.py
--- a/common/appobject.py	Tue Feb 17 21:50:24 2009 +0100
+++ b/common/appobject.py	Tue Feb 17 21:50:41 2009 +0100
@@ -11,6 +11,7 @@
 from mx.DateTime import now, oneSecond
 from simplejson import dumps
 
+from logilab.common.decorators import classproperty
 from logilab.common.deprecation import obsolete
 
 from rql.nodes import VariableRef, SubQuery
@@ -98,8 +99,15 @@
     @classmethod
     def propkey(cls, propid):
         return '%s.%s.%s' % (cls.__registry__, cls.id, propid)
-            
-        
+
+    @classproperty
+    @obsolete('use __select__ and & or | operators')
+    def __selectors__(cls):
+        if isinstance(self.__select__, AndSelector):
+            return self.__select__.selectors
+        return self.__select__
+    
+    @classmethod
     def __init__(self, req=None, rset=None):
         super(AppRsetObject, self).__init__()
         self.req = req