public Job getFirstAcquirableJob() {
Query query = hibernateSession.getSession().getNamedQuery("getFirstAcquirableJob");
query.setTimestamp("now", Clock.getCurrentTime());
query.setMaxResults(1);
return (Job) query.uniqueResult();
}
@SuppressWarnings("unchecked")
public List<Job> findExclusiveJobs(Execution processInstance) {
Query query = hibernateSession.getSession().getNamedQuery("findExclusiveJobs");