Search in sources :

Example 6 with CustomerStatusFlagEntity

use of org.mifos.customers.business.CustomerStatusFlagEntity in project head by mifos.

the class CustomerPersistence method retrieveAllCustomerStatusList.

public List<CustomerStatusEntity> retrieveAllCustomerStatusList(final Short levelId) throws PersistenceException {
    Map<String, Object> queryParameters = new HashMap<String, Object>();
    queryParameters.put("LEVEL_ID", levelId);
    List<CustomerStatusEntity> queryResult = executeNamedQuery(NamedQueryConstants.GET_CUSTOMER_STATUS_LIST, queryParameters);
    for (CustomerStatusEntity customerStatus : queryResult) {
        for (CustomerStatusFlagEntity customerStatusFlagEntity : customerStatus.getFlagSet()) {
            Hibernate.initialize(customerStatusFlagEntity);
            Hibernate.initialize(customerStatusFlagEntity.getNames());
        }
        Hibernate.initialize(customerStatus.getLookUpValue());
    }
    return queryResult;
}
Also used : HashMap(java.util.HashMap) CustomerStatusFlagEntity(org.mifos.customers.business.CustomerStatusFlagEntity) CustomerStatusEntity(org.mifos.customers.business.CustomerStatusEntity)

Aggregations

CustomerStatusFlagEntity (org.mifos.customers.business.CustomerStatusFlagEntity)6 AccountException (org.mifos.accounts.exceptions.AccountException)3 InvalidDateException (org.mifos.application.admin.servicefacade.InvalidDateException)3 MeetingException (org.mifos.application.meeting.exceptions.MeetingException)3 MifosRuntimeException (org.mifos.core.MifosRuntimeException)3 CustomerStatusEntity (org.mifos.customers.business.CustomerStatusEntity)3 CustomerException (org.mifos.customers.exceptions.CustomerException)3 ApplicationException (org.mifos.framework.exceptions.ApplicationException)3 PersistenceException (org.mifos.framework.exceptions.PersistenceException)3 BusinessRuleException (org.mifos.service.BusinessRuleException)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 CustomerBO (org.mifos.customers.business.CustomerBO)2 List (java.util.List)1 DateTime (org.joda.time.DateTime)1 MessageLookup (org.mifos.application.master.MessageLookup)1 CalendarEvent (org.mifos.calendar.CalendarEvent)1 ClientBO (org.mifos.customers.client.business.ClientBO)1 PersonnelBO (org.mifos.customers.personnel.business.PersonnelBO)1 EditCustomerStatusActionForm (org.mifos.customers.struts.actionforms.EditCustomerStatusActionForm)1