/** * Calculate sum of estimated times for tasks in the given list * * @param tasks */ public static long extractEstimatedTime(List tasks) { long rtn = 0L; for (Object task1 : tasks) { Task task = (Task) task1; rtn += ConvertUtils.intVal(task.getEstTime()); } return rtn; }
public static void validateEstimatedTime(Task vo) throws BusinessException { if (vo.getEstTime() == null || vo.getEstTime() <= 0) { throw new BusinessException("Estimated time must be defined and greater than zero"); } }