protected function getGerritPatchsetByIdentifier($changeSetId, $number, $revision, $createdOn)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`, `changeset`, `number`, `revision`, `ref`, `uploader`, `created_on`
                  FROM ' . Database::TABLE_PATCHSET . '
                  WHERE `changeset` = :changeset
                        AND `number` = :number
                        AND `revision` = :revision
                        AND `created_on` = :created_on';
        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':changeset', $changeSetId, \PDO::PARAM_INT);
        $statement->bindParam(':number', $number, \PDO::PARAM_INT);
        $statement->bindParam(':revision', $revision, \PDO::PARAM_STR);
        $statement->bindParam(':created_on', $createdOn, \PDO::PARAM_INT);
        $executeResult = $statement->execute();

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