in service/src/main/java/org/apache/fineract/cn/customer/internal/mapper/CustomerMapper.java [66:95]
public static Customer map(final CustomerEntity customerEntity) {
final Customer customer = new Customer();
customer.setIdentifier(customerEntity.getIdentifier());
customer.setType(customerEntity.getType());
customer.setGivenName(customerEntity.getGivenName());
customer.setMiddleName(customerEntity.getMiddleName());
customer.setSurname(customerEntity.getSurname());
if(customerEntity.getDateOfBirth() != null)
customer.setDateOfBirth(DateOfBirth.fromLocalDate(customerEntity.getDateOfBirth().toLocalDate()));
customer.setMember(customerEntity.getMember());
customer.setAccountBeneficiary(customerEntity.getAccountBeneficiary());
customer.setReferenceCustomer(customerEntity.getReferenceCustomer());
customer.setAssignedOffice(customerEntity.getAssignedOffice());
customer.setAssignedEmployee(customerEntity.getAssignedEmployee());
customer.setCurrentState(customerEntity.getCurrentState());
if (customerEntity.getApplicationDate() != null) {
final String editedApplicationDate =
DateConverter.toIsoString(customerEntity.getApplicationDate()).substring(0, 10);
customer.setApplicationDate(editedApplicationDate);
}
customer.setCreatedBy(customerEntity.getCreatedBy());
customer.setCreatedOn(DateConverter.toIsoString(customerEntity.getCreatedOn()));
if (customerEntity.getLastModifiedBy() != null) {
customer.setLastModifiedBy(customerEntity.getLastModifiedBy());
customer.setLastModifiedOn(DateConverter.toIsoString(customerEntity.getLastModifiedOn()));
}
return customer;
}