def __init__(self, connection, **kwargs): tools.Options.__init__(self, **kwargs) self._connection = connection self._id = tools.guid() self._fields = None self._keyFields = None self._schema = Schema() self._delegates = [] self._data = None
def loadModel(self, delegate): if tools.supports(delegate, "modelLoaded") == False: raise Exception( "The stats delegate must implement the modelLoaded method") id = tools.guid() self._modelDelegates[id] = ModelDelegate(self, delegate) o = {} o["request"] = "model" o["id"] = id o["schema"] = True o["index"] = True o["xml"] = True self.send(o)
def guid(): return (tools.guid())
def __init__(self, connection, path, **kwargs): tools.Options.__init__(self, **kwargs) self._connection = connection self._path = path self._id = tools.guid() self._data = []