Search in sources :

Example 1 with CustomerSearchResultsDto

use of org.mifos.dto.screen.CustomerSearchResultsDto in project head by mifos.

the class LoanAccountController method searchCustomers.

public CustomerSearchResultsDto searchCustomers(CustomerSearchFormBean formBean, boolean isNewGLIMCreation) {
    // Search result cap. This is needed until ajax search is implemented.
    Integer searchCap = 1000;
    CustomerSearchDto customerSearchDto = new CustomerSearchDto(formBean.getSearchString(), Integer.valueOf(1), searchCap);
    List<CustomerSearchResultDto> pagedDetails = this.loanAccountServiceFacade.retrieveCustomersThatQualifyForLoans(customerSearchDto, isNewGLIMCreation);
    //int firstResult = formBean.getPage() * formBean.getPageSize() - (formBean.getPageSize()-1);
    // FIXME selected pageNumber and pageSize info should be passed in on bean.
    SearchDetailsDto searchDetails = new SearchDetailsDto(pagedDetails.size(), 1, 1, searchCap);
    return new CustomerSearchResultsDto(searchDetails, pagedDetails);
}
Also used : SearchDetailsDto(org.mifos.dto.screen.SearchDetailsDto) CustomerSearchDto(org.mifos.dto.domain.CustomerSearchDto) CustomerSearchResultDto(org.mifos.dto.domain.CustomerSearchResultDto) CustomerSearchResultsDto(org.mifos.dto.screen.CustomerSearchResultsDto)

Example 2 with CustomerSearchResultsDto

use of org.mifos.dto.screen.CustomerSearchResultsDto in project head by mifos.

the class LoanAccountController method searchPossibleGuarantors.

public CustomerSearchResultsDto searchPossibleGuarantors(CustomerSearchFormBean formBean, boolean isNewGLIMCreation, Integer clientId, Integer loanId) {
    //As above, same issues occur (@searchCustomers)
    Integer searchCap = 1000;
    CustomerSearchDto customerSearchDto = new CustomerSearchDto(formBean.getSearchString(), Integer.valueOf(1), searchCap);
    List<CustomerSearchResultDto> pagedDetails = this.loanAccountServiceFacade.retrievePossibleGuarantors(customerSearchDto, isNewGLIMCreation, clientId, loanId);
    SearchDetailsDto searchDetails = new SearchDetailsDto(pagedDetails.size(), 1, 1, searchCap);
    return new CustomerSearchResultsDto(searchDetails, pagedDetails);
}
Also used : SearchDetailsDto(org.mifos.dto.screen.SearchDetailsDto) CustomerSearchDto(org.mifos.dto.domain.CustomerSearchDto) CustomerSearchResultDto(org.mifos.dto.domain.CustomerSearchResultDto) CustomerSearchResultsDto(org.mifos.dto.screen.CustomerSearchResultsDto)

Example 3 with CustomerSearchResultsDto

use of org.mifos.dto.screen.CustomerSearchResultsDto in project head by mifos.

the class CreateSavingsAccountController method searchCustomers.

public CustomerSearchResultsDto searchCustomers(CreateSavingsAccountFormBean formBean) {
    // Search result cap. This is needed until ajax search is implemented.
    Integer searchCap = 1000;
    // FIXME - keithw - selected pageNumber and pageSize info should be passed in on bean.
    CustomerSearchDto customerSearchDto = new CustomerSearchDto(formBean.getSearchString(), Integer.valueOf(1), searchCap);
    List<CustomerSearchResultDto> pagedDetails = this.savingsServiceFacade.retrieveCustomerThatQualifyForSavings(customerSearchDto);
    SearchDetailsDto searchDetails = new SearchDetailsDto(pagedDetails.size(), 1, 1, searchCap);
    return new CustomerSearchResultsDto(searchDetails, pagedDetails);
}
Also used : SearchDetailsDto(org.mifos.dto.screen.SearchDetailsDto) CustomerSearchDto(org.mifos.dto.domain.CustomerSearchDto) CustomerSearchResultDto(org.mifos.dto.domain.CustomerSearchResultDto) CustomerSearchResultsDto(org.mifos.dto.screen.CustomerSearchResultsDto)

Example 4 with CustomerSearchResultsDto

use of org.mifos.dto.screen.CustomerSearchResultsDto in project head by mifos.

the class FundTransferController method searchCustomers.

// All methods are called by Spring Webflow
public CustomerSearchResultsDto searchCustomers(CustomerSearchFormBean formBean) {
    Integer searchCap = 1000;
    CustomerSearchDto customerSearchDto = new CustomerSearchDto(formBean.getSearchString(), Integer.valueOf(1), searchCap);
    List<CustomerSearchResultDto> pagedDetails = this.savingsServiceFacade.retrieveCustomersThatQualifyForTransfer(customerSearchDto);
    SearchDetailsDto searchDetails = new SearchDetailsDto(pagedDetails.size(), 1, 1, searchCap);
    return new CustomerSearchResultsDto(searchDetails, pagedDetails);
}
Also used : SearchDetailsDto(org.mifos.dto.screen.SearchDetailsDto) CustomerSearchDto(org.mifos.dto.domain.CustomerSearchDto) CustomerSearchResultDto(org.mifos.dto.domain.CustomerSearchResultDto) CustomerSearchResultsDto(org.mifos.dto.screen.CustomerSearchResultsDto)

Aggregations

CustomerSearchDto (org.mifos.dto.domain.CustomerSearchDto)4 CustomerSearchResultDto (org.mifos.dto.domain.CustomerSearchResultDto)4 CustomerSearchResultsDto (org.mifos.dto.screen.CustomerSearchResultsDto)4 SearchDetailsDto (org.mifos.dto.screen.SearchDetailsDto)4