public EmployeeEntry toEmployee(EmployeeViewModel entry) { EmployeeEntry employee = new EmployeeEntry(); employee.setName(entry.getName()); employee.setEmail(entry.getEmail()); employee.setHashedPassword("default"); // employee.setRateHour(Double.parseDouble(entry.getRateHour())); // employee.setCompany(entry.getCompany()); // employee.setDepartment(entry.getDepartment()); return employee; }
public EmployeeViewModel toEmployeeViewModel(EmployeeEntry entry) { EmployeeViewModel viewModel = new EmployeeViewModel(); viewModel.name = entry.getName(); viewModel.email = entry.getEmail(); viewModel.hashedPassword = entry.getHashedPassword(); viewModel.rateHour = entry.getRateHour().toString(); viewModel.roleUser = entry.getRole().toString(); viewModel.companyName = entry.getCompany(); viewModel.departmentName = entry.getDepartment(); viewModel.tasks = entry.getTasksString(); return viewModel; }