throws UnavailableTaskException {
try {
Query q = find_by_id.setParameter(1, taskID);
List resultList = q.getResultList();
if (resultList.size() < 1)
throw new UnavailableTaskException("Task does not exist"
+ taskID);
return (Task) resultList.get(0);
} catch (NoResultException nre) {
throw new UnavailableTaskException("Task does not exist" + taskID);
}
}