Search in sources :

Example 36 with LookUpValueEntity

use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.

the class LegacyRolesPermissionsDao method updateLookUpValue.

public void updateLookUpValue(Short activityId, String inputCategoryName) {
    ActivityEntity activityEntity = null;
    try {
        activityEntity = getPersistentObject(ActivityEntity.class, activityId);
    } catch (Exception ex) {
        throw new RuntimeException(ex.getMessage());
    }
    if (activityEntity != null) {
        LookUpValueEntity lookUpValueEntity = activityEntity.getDescriptionLookupValues();
        ApplicationContextProvider.getBean(MessageLookup.class).updateLookupValue(lookUpValueEntity, inputCategoryName);
    }
}
Also used : ActivityEntity(org.mifos.security.rolesandpermission.business.ActivityEntity) MifosRuntimeException(org.mifos.core.MifosRuntimeException) MessageLookup(org.mifos.application.master.MessageLookup) SystemException(org.mifos.framework.exceptions.SystemException) ActivityGeneratorException(org.mifos.security.activity.ActivityGeneratorException) ServiceException(org.mifos.framework.exceptions.ServiceException) SecurityException(org.mifos.framework.exceptions.SecurityException) MifosRuntimeException(org.mifos.core.MifosRuntimeException) HibernateProcessException(org.mifos.framework.exceptions.HibernateProcessException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) HibernateException(org.hibernate.HibernateException) ApplicationException(org.mifos.framework.exceptions.ApplicationException) LookUpValueEntity(org.mifos.application.master.business.LookUpValueEntity)

Example 37 with LookUpValueEntity

use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.

the class LegacyRolesPermissionsDao method createActivityEntity.

private ActivityEntity createActivityEntity(short parentActivity, int lookUpId) throws ServiceException, ActivityGeneratorException, PersistenceException {
    ActivityEntity parentActivityEntity;
    if (parentActivity != 0) {
        parentActivityEntity = getPersistentObject(ActivityEntity.class, parentActivity);
    } else {
        parentActivityEntity = null;
    }
    LookUpValueEntity lookupValueEntity = getPersistentObject(LookUpValueEntity.class, lookUpId);
    ActivityEntity activityEntity = new ActivityEntity((short) calculateDynamicActivityId(), parentActivityEntity, lookupValueEntity);
    createOrUpdate(activityEntity);
    return activityEntity;
}
Also used : ActivityEntity(org.mifos.security.rolesandpermission.business.ActivityEntity) LookUpValueEntity(org.mifos.application.master.business.LookUpValueEntity)

Example 38 with LookUpValueEntity

use of org.mifos.application.master.business.LookUpValueEntity in project head by mifos.

the class ReportsPersistence method updateLookUpValue.

public void updateLookUpValue(Short activityId, String inputCategoryName) {
    ActivityEntity activityEntity = null;
    try {
        activityEntity = getPersistentObject(ActivityEntity.class, activityId);
    } catch (Exception ex) {
        throw new RuntimeException(ex.getMessage());
    }
    if (activityEntity != null) {
        LookUpValueEntity lookUpValueEntity = activityEntity.getDescriptionLookupValues();
        ApplicationContextProvider.getBean(MessageLookup.class).updateLookupValue(lookUpValueEntity, inputCategoryName);
    }
}
Also used : ActivityEntity(org.mifos.security.rolesandpermission.business.ActivityEntity) MessageLookup(org.mifos.application.master.MessageLookup) SystemException(org.mifos.framework.exceptions.SystemException) ReportException(org.mifos.reports.exceptions.ReportException) HibernateProcessException(org.mifos.framework.exceptions.HibernateProcessException) PersistenceException(org.mifos.framework.exceptions.PersistenceException) HibernateException(org.hibernate.HibernateException) ApplicationException(org.mifos.framework.exceptions.ApplicationException) LookUpValueEntity(org.mifos.application.master.business.LookUpValueEntity)

Aggregations

LookUpValueEntity (org.mifos.application.master.business.LookUpValueEntity)38 Test (org.junit.Test)11 ActivityEntity (org.mifos.security.rolesandpermission.business.ActivityEntity)9 LookUpEntity (org.mifos.application.master.business.LookUpEntity)8 MessageLookup (org.mifos.application.master.MessageLookup)7 MifosRuntimeException (org.mifos.core.MifosRuntimeException)7 PersistenceException (org.mifos.framework.exceptions.PersistenceException)7 ApplicationException (org.mifos.framework.exceptions.ApplicationException)5 SystemException (org.mifos.framework.exceptions.SystemException)5 LookUpValueLocaleEntity (org.mifos.application.master.business.LookUpValueLocaleEntity)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 AmountFeeBO (org.mifos.accounts.fees.business.AmountFeeBO)3 CategoryTypeEntity (org.mifos.accounts.fees.business.CategoryTypeEntity)3 FeeBO (org.mifos.accounts.fees.business.FeeBO)3 FeeFrequencyTypeEntity (org.mifos.accounts.fees.business.FeeFrequencyTypeEntity)3 RateFeeBO (org.mifos.accounts.fees.business.RateFeeBO)3 FeeActionForm (org.mifos.accounts.fees.struts.actionforms.FeeActionForm)3 GLCodeEntity (org.mifos.accounts.financial.business.GLCodeEntity)3 ProductDefinitionException (org.mifos.accounts.productdefinition.exceptions.ProductDefinitionException)3