Esempio n. 1
0
 def remove_entity(self, entity):
     try:
         self.remove_rep(entity)
         self.delete_relations(entity)
         gc = GenericCache()
         gc.on_delete_entity(entity.entity_id, entity.type.name)
         DBHelper().delete(entity)
         
     except Exception as e:
         traceback.print_exc()
         raise e
Esempio n. 2
0
    def remove_entity_by_id(self, entityId, entityType=None, parent=None):
        try:
            entity = self.get_entity(entityId, entityType, parent)
            self.remove_rep(entity)
            self.delete_relations(entity)
            gc = GenericCache()
            gc.on_delete_entity(entityId, entity.type.name)
            DBHelper().delete(entity)

        except Exception as e:
            traceback.print_exc()
            raise e