def do_copy(self, new_ids=False, id_scope=None, id_remap=None):
        cp = DBAction()
        if self._db_operations is None:
            cp._db_operations = []
        else:
            cp._db_operations = [v.do_copy(new_ids, id_scope, id_remap) for v in self._db_operations]
        cp._db_id = self._db_id
        cp._db_prevId = self._db_prevId
        cp._db_date = self._db_date
        cp._db_session = self._db_session
        cp._db_user = self._db_user
        cp._db_prune = self._db_prune
        if self._db_annotations is None:
            cp._db_annotations = []
        else:
            cp._db_annotations = [v.do_copy(new_ids, id_scope, id_remap) for v in self._db_annotations]
        
        # set new ids
        if new_ids:
            new_id = id_scope.getNewId(self.vtType)
            if self.vtType in id_scope.remap:
                id_remap[(id_scope.remap[self.vtType], self._db_id)] = new_id
            else:
                id_remap[(self.vtType, self._db_id)] = new_id
            cp._db_id = new_id
        
        # recreate indices and set flags
        for v in cp._db_operations:
            cp.db_operations_id_index[v._db_id] = v
        for v in cp._db_annotations:
            cp.db_annotations_id_index[v._db_id] = v
            cp.db_annotations_key_index[v._db_key] = v
        cp.is_dirty = self.is_dirty
        cp.is_new = self.is_new
        return cp
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_9_1/domain/auto_gen.py/DBAction.do_copy/original