protected function isNewRecord(DeliveryMonitoringDataInterface $deliveryMonitoring)
    {
        $data = $deliveryMonitoring->get();
        $deliveryExecutionId = $data[self::COLUMN_DELIVERY_EXECUTION_ID];

        $sql = "SELECT EXISTS( " . PHP_EOL .
            "SELECT " . self::COLUMN_DELIVERY_EXECUTION_ID . PHP_EOL .
            "FROM " . self::TABLE_NAME . PHP_EOL .
            "WHERE " . self::COLUMN_DELIVERY_EXECUTION_ID . "=?)";
        $exists = $this->getPersistence()->query($sql, [$deliveryExecutionId])->fetch(\PDO::FETCH_COLUMN);

        return !((boolean) $exists);
    }