use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.
the class BirtReportsUploadActionStrutsTest method removeReport.
private void removeReport(Short reportId) throws PersistenceException {
ReportsPersistence reportPersistence = new ReportsPersistence();
reportPersistence.getSession().clear();
ReportsBO report = reportPersistence.getPersistentObject(ReportsBO.class, reportId);
ActivityEntity activityEntity = legacyRolesPermissionsDao.getPersistentObject(ActivityEntity.class, report.getActivityId());
reportPersistence.delete(report);
LookUpValueEntity anLookUp = activityEntity.getActivityNameLookupValues();
legacyRolesPermissionsDao.delete(activityEntity);
legacyRolesPermissionsDao.delete(anLookUp);
StaticHibernateUtil.flushSession();
}
use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.
the class ReportsCategoryActionStrutsTest method insertActivityForTest.
public ActivityEntity insertActivityForTest(short activityId) throws PersistenceException {
LookUpValueEntity anLookUp = new LookUpValueEntity();
LookUpEntity lookUpEntity = legacyMasterDao.getPersistentObject(LookUpEntity.class, Short.valueOf((short) LookUpEntity.ACTIVITY));
anLookUp.setLookUpEntity(lookUpEntity);
ActivityEntity parent = legacyMasterDao.getPersistentObject(ActivityEntity.class, (short) 13);
ActivityEntity activityEntity = new ActivityEntity(activityId, parent, anLookUp);
legacyRolesPermissionsDao.createOrUpdate(anLookUp);
legacyRolesPermissionsDao.createOrUpdate(activityEntity);
return activityEntity;
}
use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.
the class AddActivityIntegrationTest method testStartFromSystemWithAddedLookupValues.
@Ignore
@Test
public void testStartFromSystemWithAddedLookupValues() throws Exception {
for (int i = 0; i < 10; ++i) {
LookUpValueEntity entity = new LookUpValueEntity();
entity.setLookUpName("test look up value " + i);
LookUpEntity lookUpEntity = new LookUpEntity();
lookUpEntity.setEntityId((short) 87);
entity.setLookUpEntity(lookUpEntity);
session.save(entity);
}
upgradeAndCheck();
}
use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.
the class LegacyRolesPermissionsDaoIntegrationTest method deleteActivityForTest.
private void deleteActivityForTest(ActivityEntity activityEntity) throws PersistenceException {
LookUpValueEntity anLookUp = activityEntity.getActivityNameLookupValues();
legacyRolesPermissionsDao.delete(activityEntity);
legacyRolesPermissionsDao.delete(anLookUp);
}
use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.
the class TestObjectFactory method createOneTimeAmountFee.
public static FeeBO createOneTimeAmountFee(final String feeName, final FeeCategory feeCategory, final String feeAmnt, final FeePayment feePayment, final UserContext userContext, String categoryTypeName) {
GLCodeEntity glCode = (GLCodeEntity) StaticHibernateUtil.getSessionTL().get(GLCodeEntity.class, TestGeneralLedgerCode.FEES);
try {
CategoryTypeEntity categoryType = new CategoryTypeEntity(feeCategory);
LookUpValueEntity lookUpValue = new LookUpValueEntity();
lookUpValue.setLookUpName(categoryTypeName);
categoryType.setLookUpValue(lookUpValue);
FeeBO fee = new AmountFeeBO(userContext, feeName, categoryType, new FeeFrequencyTypeEntity(FeeFrequencyType.ONETIME), glCode, TestUtils.createMoney(feeAmnt), false, new FeePaymentEntity(feePayment));
return testObjectPersistence.createFee(fee);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations