* the workreportLine
* @return timeRegistration DTO
*/
private TimeRegistrationDTO createExportTimeRegistration(String productCode,
WorkReportLine workReportLine) {
Worker worker;
String workerCode = workReportLine.getResource().getCode();
try {
worker = workerDAO.findByCode(workerCode);
} catch (InstanceNotFoundException e) {
LOG.warn("Worker '" + workerCode + "' not found");
synchronizationInfo.addFailedReason(_("Worker \"{0}\" not found",
workerCode));
return null;
}
PersonDTO personDTO = new PersonDTO();
personDTO.setName(worker.getName());
personDTO.setOptions(TimOptions.UPDATE_OR_INSERT);
ProductDTO productDTO = new ProductDTO();
productDTO.setOptions(TimOptions.UPDATE_OR_INSERT);
productDTO.setCode(productCode);