use of org.mifos.accounts.productdefinition.business.ProductTypeEntity in project head by mifos.
the class BirtAdminDocumentUploadAction method getBirtAdminDocumentUploadPage.
@TransactionDemarcate(saveToken = true)
public ActionForward getBirtAdminDocumentUploadPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
BirtAdminDocumentUploadActionForm uploadForm = (BirtAdminDocumentUploadActionForm) form;
uploadForm.clear();
List<ProductTypeEntity> productTypes = getProductTypes();
SessionUtils.setCollectionAttribute(ProductDefinitionConstants.PRODUCTTYPELIST, productTypes, request);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.accounts.productdefinition.business.ProductTypeEntity in project head by mifos.
the class ProductCategoryPersistenceIntegrationTest method testGetProductTypesByType.
@Test
public void testGetProductTypesByType() throws Exception {
ProductTypeEntity productTypeEntity = legacyProductCategoryDao.getProductTypes(ProductType.LOAN.getValue());
Assert.assertNotNull(productTypeEntity);
if (productTypeEntity.getType() == ProductType.LOAN) {
Assert.assertEquals("Loan", productTypeEntity.getName());
} else {
Assert.assertEquals("", productTypeEntity.getName());
}
}
use of org.mifos.accounts.productdefinition.business.ProductTypeEntity 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