class ListenerRepo {

    public void refreshLastCheck(Listener listener, Connection connection) throws DataAccessException {
        try (
                PreparedStatement stmt = connection.prepareStatement(REFRESH_QUERY)
        ) {
            stmt.setLong(1, listener.getId());
            stmt.executeUpdate();
            listener.setLastCheck(findById(listener.getId(), connection).getLastCheck());
        } catch (SQLException e) {
            throw new DataAccessException("Couldn't refresh last check for listener with id " + listener.getId(), e);
        }
    }

}