Object o = query.getSingleResult();
return GenericModel.edit(o, name, params, annotations);
} catch (NoResultException e) {
// ok
} catch (Exception e) {
throw new UnexpectedException(e);
}
}
return GenericModel.create(clazz, name, params, annotations);
}
return super.bind(name, clazz, type, annotations, params);