'Load the item\'s state information from an external datastore,
if one has been provided.'

def load(self):

    if self.db:
        item = self.db.load(self.owner, self.jid, self._db_state)
        if item:
            self['name'] = item['name']
            self['groups'] = item['groups']
            self['from'] = item['from']
            self['to'] = item['to']
            self['whitelisted'] = item['whitelisted']
            self['pending_out'] = item['pending_out']
            self['pending_in'] = item['pending_in']
            self['subscription'] = self._subscription()
        return self._state
    return None
