Search in sources :

Example 1 with GroupSearchResultsDto

use of org.mifos.customers.group.struts.action.GroupSearchResultsDto in project head by mifos.

the class CustomerServiceFacadeWebTier method searchGroups.

@Override
public GroupSearchResultsDto searchGroups(boolean searchForAddingClientsToGroup, String normalizedSearchString, Short loggedInUserId) {
    try {
        // FIXME - #000001 - keithw - move search logic off group business service over to customerDAO
        QueryResult searchResults = new GroupBusinessService().search(normalizedSearchString, loggedInUserId);
        QueryResult searchForAddingClientToGroupResults = null;
        if (searchForAddingClientsToGroup) {
            searchForAddingClientToGroupResults = new GroupBusinessService().searchForAddingClientToGroup(normalizedSearchString, loggedInUserId);
        }
        return new GroupSearchResultsDto(searchResults, searchForAddingClientToGroupResults);
    } catch (ServiceException e) {
        throw new MifosRuntimeException(e);
    }
}
Also used : QueryResult(org.mifos.framework.hibernate.helper.QueryResult) ServiceException(org.mifos.framework.exceptions.ServiceException) GroupBusinessService(org.mifos.customers.group.business.service.GroupBusinessService) GroupSearchResultsDto(org.mifos.customers.group.struts.action.GroupSearchResultsDto) MifosRuntimeException(org.mifos.core.MifosRuntimeException)

Aggregations

MifosRuntimeException (org.mifos.core.MifosRuntimeException)1 GroupBusinessService (org.mifos.customers.group.business.service.GroupBusinessService)1 GroupSearchResultsDto (org.mifos.customers.group.struts.action.GroupSearchResultsDto)1 ServiceException (org.mifos.framework.exceptions.ServiceException)1 QueryResult (org.mifos.framework.hibernate.helper.QueryResult)1