Search in sources :

Example 1 with CustomerActivityEntity

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

the class CenterServiceFacadeWebTier method retrieveAllAccountActivity.

@Override
public List<CustomerRecentActivityDto> retrieveAllAccountActivity(String globalCustNum) {
    List<CustomerRecentActivityDto> customerActivityViewList = new ArrayList<CustomerRecentActivityDto>();
    CustomerBO customerBO = this.customerDao.findCustomerBySystemId(globalCustNum);
    List<CustomerActivityEntity> customerActivityDetails = customerBO.getCustomerAccount().getCustomerActivitDetails();
    for (CustomerActivityEntity customerActivityEntity : customerActivityDetails) {
        customerActivityViewList.add(assembleCustomerActivityDto(customerActivityEntity, Locale.getDefault()));
    }
    return customerActivityViewList;
}
Also used : CustomerActivityEntity(org.mifos.customers.business.CustomerActivityEntity) ArrayList(java.util.ArrayList) CustomerBO(org.mifos.customers.business.CustomerBO) CustomerRecentActivityDto(org.mifos.dto.screen.CustomerRecentActivityDto)

Example 2 with CustomerActivityEntity

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

the class CenterServiceFacadeWebTier method retrieveRecentActivities.

@Override
public List<CustomerRecentActivityDto> retrieveRecentActivities(Integer customerId, Integer countOfActivities) {
    CustomerBO customerBO = this.customerDao.findCustomerById(customerId);
    List<CustomerActivityEntity> customerActivityDetails = customerBO.getCustomerAccount().getCustomerActivitDetails();
    List<CustomerRecentActivityDto> customerActivityViewList = new ArrayList<CustomerRecentActivityDto>();
    int count = 0;
    for (CustomerActivityEntity customerActivityEntity : customerActivityDetails) {
        customerActivityViewList.add(getCustomerActivityView(customerActivityEntity));
        if (++count == countOfActivities) {
            break;
        }
    }
    return customerActivityViewList;
}
Also used : CustomerActivityEntity(org.mifos.customers.business.CustomerActivityEntity) ArrayList(java.util.ArrayList) CustomerBO(org.mifos.customers.business.CustomerBO) CustomerRecentActivityDto(org.mifos.dto.screen.CustomerRecentActivityDto)

Aggregations

ArrayList (java.util.ArrayList)2 CustomerActivityEntity (org.mifos.customers.business.CustomerActivityEntity)2 CustomerBO (org.mifos.customers.business.CustomerBO)2 CustomerRecentActivityDto (org.mifos.dto.screen.CustomerRecentActivityDto)2