Examples of TimesheetTemplateObject


Examples of org.projectforge.rest.objects.TimesheetTemplateObject

  {
    final List<UserPrefDO> list = userPrefDao.getUserPrefs(UserPrefArea.TIMESHEET_TEMPLATE);
    final List<TimesheetTemplateObject> result = new ArrayList<TimesheetTemplateObject>();
    if (list != null) {
      for (final UserPrefDO userPref : list) {
        final TimesheetTemplateObject template = TimesheetTemplateConverter.getTimesheetTemplateObject(userPref);
        if (template != null) {
          result.add(template);
        }
      }
    }
View Full Code Here

Examples of org.projectforge.rest.objects.TimesheetTemplateObject

  public static TimesheetTemplateObject getTimesheetTemplateObject(final UserPrefDO userPrefDO)
  {
    if (userPrefDO == null) {
      return null;
    }
    final TimesheetTemplateObject template = new TimesheetTemplateObject();
    final UserPrefDao userPrefDao = Registry.instance().getDao(UserPrefDao.class);
    final TimesheetDO timesheet = new TimesheetDO();
    userPrefDao.fillFromUserPrefParameters(userPrefDO, timesheet);
    template.setName(userPrefDO.getName());
    template.setDescription(timesheet.getDescription());
    template.setLocation(timesheet.getLocation());
    final UserObject user = PFUserDOConverter.getUserObject(timesheet.getUser());
    if (user != null) {
      template.setUser(user);
    }
    final TaskObject task = TaskDOConverter.getTaskObject(timesheet.getTask());
    if (task != null) {
      template.setTask(task);
    }
    final Cost2Object cost2 = Kost2DOConverter.getCost2Object(timesheet.getKost2());
    if (cost2 != null) {
      template.setCost2(cost2);
    }
    return template;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.