protected function getGerritProjectsByName($serverId, array $names)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();
        $nameList = implode(',', $names);

        $query = 'SELECT `id`, `name` FROM ' . Database::TABLE_PROJECT . '
                  WHERE `server_id` = :server_id AND FIND_IN_SET(BINARY `name`, :names) > 0';
        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':server_id', $serverId, \PDO::PARAM_INT);
        $statement->bindParam(':names', $nameList, \PDO::PARAM_STR);
        $executeResult = $statement->execute();

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult);
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }