public static TimesheetObject getTimesheetObject(final TimesheetDO timesheetDO)
{
if (timesheetDO == null) {
return null;
}
final TimesheetObject timesheet = new TimesheetObject();
DOConverter.copyFields(timesheet, timesheetDO);
timesheet.setDescription(timesheetDO.getDescription());
timesheet.setLocation(timesheetDO.getLocation());
timesheet.setStartTime(timesheetDO.getStartTime());
timesheet.setStopTime(timesheetDO.getStopTime());
final TaskObject task = TaskDOConverter.getTaskObject(timesheetDO.getTask());
timesheet.setTask(task);
final UserObject user = PFUserDOConverter.getUserObject(timesheetDO.getUser());
timesheet.setUser(user);
final Cost2Object cost2 = Kost2DOConverter.getCost2Object(timesheetDO.getKost2());
timesheet.setCost2(cost2);
return timesheet;
}