use of org.mifos.framework.hibernate.helper.Transactional in project head by mifos.
the class LegacyMasterDao method getLookUpEntity.
/**
* Only two non-test usages, one that may never be called and one for getting labels.
*/
@Transactional
public CustomValueDto getLookUpEntity(final String entityName) throws SystemException {
Session session = getSession();
Query queryEntity = session.getNamedQuery("masterdata.entityvalue");
queryEntity.setString("entityType", entityName);
CustomValueDto entity = (CustomValueDto) queryEntity.uniqueResult();
entity.setCustomValueListElements(lookUpValue(entityName, session));
return entity;
}
use of org.mifos.framework.hibernate.helper.Transactional in project head by mifos.
the class AspectJApprovalInterceptorTest method testRESTCallExecution.
@Test
@Transactional
public void testRESTCallExecution() throws Exception {
Assert.assertEquals(0, approvalService.getAllWaiting().size());
try {
stubRestController.createCall("HELLO");
Assert.fail("should throw interrupt exception");
} catch (RESTCallInterruptException e) {
}
Assert.assertEquals(1, approvalService.getAllWaiting().size());
RESTApprovalEntity entity = approvalService.getAllWaiting().get(0);
Assert.assertEquals("arg", entity.getApprovalMethod().getArgsHolder().getNames()[0]);
}
Aggregations