def HandleEntity(self, entity):
    #logging.info(entity['name'])
    entity = utils.handle_entity_with_name_key(entity, self.kind, self.props)

    latitude = entity['latitude']
    longitude = entity['longitude']
    if latitude and longitude:
        hash = str(geohash.Geohash((float(longitude),float(latitude))))
        #logging.info(hash)
        entity['bbhash1'] = hash[:2]
        entity['bbhash2'] = hash[:4]
        entity['bbhash'] = hash
        
    entity['updated'] = datetime.datetime.now()
    entity['bookmark'] = utils.bookmark_for_kind(self.kind, 'user.name', entity['updated'])    
    return entity
    def HandleEntity(self, entity):
        #logging.info(entity['name'])
        entity = utils.handle_entity_with_name_key(entity, self.kind,
                                                   self.props)

        latitude = entity['latitude']
        longitude = entity['longitude']
        if latitude and longitude:
            hash = str(geohash.Geohash((float(longitude), float(latitude))))
            #logging.info(hash)
            entity['bbhash1'] = hash[:2]
            entity['bbhash2'] = hash[:4]
            entity['bbhash'] = hash

        entity['updated'] = datetime.datetime.now()
        entity['bookmark'] = utils.bookmark_for_kind(self.kind, 'user.name',
                                                     entity['updated'])
        return entity
 def HandleEntity(self, entity):
   import_fkname(entity, 'admin', 'User')
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   import_fkname_list(entity, 'permissions', 'Permission')
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   import_fkname_list(entity, 'roles', 'Role')
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     import_fkname_list(entity, 'roles', 'Role')
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   import_fkname(entity, 'query', 'DataQuery')
   import_fkname(entity, 'app', 'App')
   return utils.handle_entity_with_name_key(entity, 'SynchSubscription', self.props)
 def HandleEntity(self, entity):
     import_fkname_list(entity, 'field_mapping', 'EntityPropertyMetadata')
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     import_fkname(entity, 'query', 'DataQuery')
     import_fkname(entity, 'app', 'App')
     return utils.handle_entity_with_name_key(entity, 'SynchSubscription',
                                              self.props)
 def HandleEntity(self, entity):
     import_fkname(entity, 'metadata', 'Metadata')
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     import_fkname(entity, 'view_definition', 'ViewDefinition')
     import_fkname(entity, 'parent_viewmap', 'ViewMap')
     import_fkname(entity, 'metadata', 'Metadata')
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     import_fkname(entity, 'admin', 'User')
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     import_fkname_list(entity, 'permissions', 'Permission')
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   import_fkname(entity, 'view_definition', 'ViewDefinition')
   import_fkname(entity, 'parent_viewmap', 'ViewMap')
   import_fkname(entity, 'metadata', 'Metadata')
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   import_fkname(entity, 'metadata', 'Metadata')
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
     import_fkname_list(entity, 'depends_on', 'Metadata')
     return utils.handle_entity_with_name_key(entity, 'Metadata',
                                              self.props)
 def HandleEntity(self, entity):
   import_fkname_list(entity, 'field_mapping', 'EntityPropertyMetadata')
   return utils.handle_entity_with_name_key(entity, self.kind, self.props)
 def HandleEntity(self, entity):
   import_fkname(entity, 'metadata', 'Metadata')
   import_fkname(entity, 'enumeration', 'Enumeration')
   
   return utils.handle_entity_with_name_key(entity, 'EnumerationValue', self.props)
 def HandleEntity(self, entity):
   import_fkname_list(entity, 'depends_on', 'Metadata')
   return utils.handle_entity_with_name_key(entity, 'Metadata', self.props)
    def HandleEntity(self, entity):
        import_fkname(entity, 'metadata', 'Metadata')
        import_fkname(entity, 'enumeration', 'Enumeration')

        return utils.handle_entity_with_name_key(entity, 'EnumerationValue',
                                                 self.props)