@Override
    public int setJobsEnabled(final String nodeName,
                              final boolean enabled,
                              final Set<String> includeJobs,
                              final Set<String> excludeJobs) {
        return JooqUtil.contextResult(jobDbConnProvider, context -> context
                .update(JOB_NODE)
                .set(JOB_NODE.ENABLED, enabled)
                .where(JOB_NODE.NODE_NAME.eq(nodeName)
                        .and(JOB_NODE.JOB_ID.in(
                                select(JOB.ID).from(JOB)
                                        .where(JOB.NAME.in(includeJobs)
                                                .or(DSL.condition(includeJobs.size() == 0)))
                        )).and(JOB_NODE.JOB_ID.notIn(
                                select(JOB.ID).from(JOB)
                                        .where(JOB.NAME.in(excludeJobs)
                                                .and(DSL.condition(excludeJobs.size() > 0)))
                        )))
                .execute()
        );
    }
This class is very slim because it uses the GenericDao.
Why event use this class? Why not use the GenericDao directly in the service class?
Some reasons:
1. Hides knowledge of Jooq classes from the service
2. Hides connection provider and GenericDao instantiation -- the service class just gets a working thing injected.
3. It allows the DAO to be easily extended.
<p>
//TODO gh-1072 Maybe the interface could implement the standard methods below? Then this would be even slimmer.
stroom-job/stroom-job-impl-db/src/main/java/stroom/job/impl/db/JobDaoImpl.java