import org.springframework.data.domain.Pageable;
public class UserMapper {
public UserUI toUIBean(User user) {
UserUI uiBean = null;
if (user != null) {
uiBean = new UserUI();
uiBean.setFirstName(user.getFirstName());
uiBean.setId(user.getId());
uiBean.setLastName(user.getLastName());
uiBean.setPassword(user.getPassword());
uiBean.setUsername(user.getUsername());
uiBean.setAccountType(user.getAccountType());
uiBean.setBillingAddress(user.getBillingAddress());
uiBean.setCreateadBy(user.getCreateadBy());
uiBean.setCreatedDate(user.getCreatedDate());
uiBean.setDescription(user.getDescription());
uiBean.setEmail(user.getEmail());
uiBean.setLastLoggedIn(user.getLastLoggedIn());
uiBean.setMobilePhone(user.getMobilePhone());
uiBean.setModifiedBy(user.getModifiedBy());
uiBean.setModifiedDate(user.getModifiedDate());
uiBean.setNotes(user.getNotes());
uiBean.setOfficePhone(user.getOfficePhone());
if (user.getBalance() != null) {
uiBean.setBalance(user.getBalance().getAmount());
}
}
return uiBean;
}