use of org.mifos.customers.checklist.business.AccountCheckListBO in project head by mifos.
the class IntegrationTestObjectMother method createAccountChecklist.
public static AccountCheckListBO createAccountChecklist(Short prdTypeId, AccountState accountState, Short checklistStatus, List<String> details) {
try {
StaticHibernateUtil.startTransaction();
ProductTypeEntity productTypeEntity = (ProductTypeEntity) StaticHibernateUtil.getSessionTL().get(ProductTypeEntity.class, prdTypeId);
AccountStateEntity accountStateEntity = new AccountStateEntity(accountState);
AccountCheckListBO accountChecklist = new AccountCheckListBO(productTypeEntity, accountStateEntity, "productchecklist", checklistStatus, details, Short.valueOf("1"), PersonnelConstants.SYSTEM_USER);
customerDao.save(accountChecklist);
StaticHibernateUtil.commitTransaction();
return accountChecklist;
} catch (Exception e) {
StaticHibernateUtil.rollbackTransaction();
throw new RuntimeException(e);
} finally {
StaticHibernateUtil.closeSession();
}
}
Aggregations