use of org.jaffa.modules.printing.domain.FormEvent in project jaffa-framework by jaffa-projects.
the class FormEventMaintenanceTx method load.
// .//GEN-END:_preprocessUpdate_2_be
// .//GEN-BEGIN:_loadUpdate_1_be
/**
* Retrieve the domain object.
*/
private FormEvent load(UOW uow, FormEventMaintenanceUpdateInDto input) throws FrameworkException, ApplicationExceptions {
FormEvent domain = null;
Criteria criteria = new Criteria();
criteria.setTable(FormEventMeta.getName());
// .//GEN-END:_loadUpdate_1_be
// Add custom criteria//GEN-FIRST:_loadUpdate_1
// .//GEN-LAST:_loadUpdate_1
// .//GEN-BEGIN:_loadUpdate_2_be
criteria.addCriteria(FormEventMeta.EVENT_NAME, input.getEventName());
criteria.setLocking(Criteria.LOCKING_PARANOID);
Iterator itr = uow.query(criteria).iterator();
if (itr.hasNext())
domain = (FormEvent) itr.next();
// .//GEN-BEGIN:_loadUpdate_3_be
if (domain == null) {
ApplicationExceptions appExps = new ApplicationExceptions();
appExps.add(new DomainObjectNotFoundException(FormEventMeta.getLabelToken()));
throw appExps;
}
return domain;
}
Aggregations