protected function get_mapping($itemname, $itemid) {
        // Check restoreid is set
        if (!$this->restoreid) {
            throw new restore_decode_rule_exception('decode_rule_restoreid_not_set');
        }
        if (!$found = restore_dbops::get_backup_ids_record($this->restoreid, $itemname, $itemid)) {
            return false;
        }
        return $found->newitemid;
    }