Extracts task enterprise column values.

@param id task unique ID
@param task task instance
@param taskVarData task var data
@param metaData2 task meta data
371
private void processTaskEnterpriseColumns(Integer id, Task task, Var2Data taskVarData, byte[] metaData2)
   {
      if (metaData2 != null)
      {
         int bits = MPPUtility.getInt(metaData2, 29);
         task.set(TaskField.ENTERPRISE_FLAG1, Boolean.valueOf((bits & 0x0000800) != 0));
         task.set(TaskField.ENTERPRISE_FLAG2, Boolean.valueOf((bits & 0x0001000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG3, Boolean.valueOf((bits & 0x0002000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG4, Boolean.valueOf((bits & 0x0004000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG5, Boolean.valueOf((bits & 0x0008000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG6, Boolean.valueOf((bits & 0x0001000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG7, Boolean.valueOf((bits & 0x0002000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG8, Boolean.valueOf((bits & 0x0004000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG9, Boolean.valueOf((bits & 0x0008000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG10, Boolean.valueOf((bits & 0x0010000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG11, Boolean.valueOf((bits & 0x0020000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG12, Boolean.valueOf((bits & 0x0040000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG13, Boolean.valueOf((bits & 0x0080000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG14, Boolean.valueOf((bits & 0x0100000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG15, Boolean.valueOf((bits & 0x0200000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG16, Boolean.valueOf((bits & 0x0400000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG17, Boolean.valueOf((bits & 0x0800000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG18, Boolean.valueOf((bits & 0x1000000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG19, Boolean.valueOf((bits & 0x2000000) != 0));
         task.set(TaskField.ENTERPRISE_FLAG20, Boolean.valueOf((bits & 0x4000000) != 0));
      }
   }
487632
public List<TaskExecLog> getTaskLogs(String taskId) {
        Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank");
        return getForEntity("tasks/{taskId}/log", null, taskExecLogList, taskId);
    }
1251613
protected AuditTaskImpl getAuditTask(TaskEvent event, TaskPersistenceContext persistenceContext, Task ti) {
        AuditTaskImpl auditTaskImpl = persistenceContext.queryWithParametersInTransaction("getAuditTaskById", true, 
                persistenceContext.addParametersToMap("taskId", ti.getId()),
                ClassUtil.<AuditTaskImpl>castClass(AuditTaskImpl.class));
        
        return auditTaskImpl;
    }
841192
public void processTasks(List<Row> wbs, List<Row> tasks)
   {
      ProjectProperties projectProperties = m_project.getProjectProperties();
      String projectName = projectProperties.getName();
      Set<Integer> uniqueIDs = new HashSet<Integer>();
      Set<Task> wbsTasks = new HashSet<Task>();

      //
      // We set the project name when we read the project properties, but that's just
      // the short name. The full project name lives on the first WBS item. Rather than
      // querying twice, we'll just set it here where we have access to the WBS items.
      // I haven't changed what's in the project name attribute as that's the value
      // MPXJ users are used to receiving in that attribute, so we'll use the title
      // attribute instead.
      //
      if (!wbs.isEmpty())
      {
         projectProperties.setProjectTitle(wbs.get(0).getString("wbs_name"));
      }

      //
      // Read WBS entries and create tasks.
      // Note that the wbs list is supplied to us in the correct order.
      //
      for (Row row : wbs)
      {
         Task task = m_project.addTask();
         task.setProject(projectName); // P6 task always belongs to project
         task.setSummary(true);
         processFields(m_wbsFields, row, task);
         populateUserDefinedFieldValues("PROJWBS", FieldTypeClass.TASK, task, task.getUniqueID());
         uniqueIDs.add(task.getUniqueID());
         wbsTasks.add(task);
         m_eventManager.fireTaskReadEvent(task);
      }

      //
      // Create hierarchical structure
      //
      FieldType activityIDField = getActivityIDField(m_wbsFields);
      m_project.getChildTasks().clear();
      for (Row row : wbs)
      {
         Task task = m_project.getTaskByUniqueID(row.getInteger("wbs_id"));
         Task parentTask = m_project.getTaskByUniqueID(row.getInteger("parent_wbs_id"));
         if (parentTask == null)
         {
            m_project.getChildTasks().add(task);
         }
         else
         {
            m_project.getChildTasks().remove(task);
            parentTask.getChildTasks().add(task);
            task.setWBS(parentTask.getWBS() + "." + task.getWBS());
            if (activityIDField != null)
            {
               task.set(activityIDField, task.getWBS());
            }
         }
      }

      //
      // Read Task entries and create tasks
      //
      int nextID = 1;
      m_clashMap.clear();
      for (Row row : tasks)
      {
         Task task;
         Integer parentTaskID = row.getInteger("wbs_id");
         Task parentTask = m_project.getTaskByUniqueID(parentTaskID);
         if (parentTask == null)
         {
            task = m_project.addTask();
         }
         else
         {
            task = parentTask.addTask();
         }
         task.setProject(projectName); // P6 task always belongs to project

         processFields(m_taskFields, row, task);

         task.setMilestone(BooleanHelper.getBoolean(MILESTONE_MAP.get(row.getString("task_type"))));

         // Only "Resource Dependent" activities consider resource calendars during scheduling in P6.
         task.setIgnoreResourceCalendar(!"TT_Rsrc".equals(row.getString("task_type")));

         task.setPercentageComplete(calculatePercentComplete(row));

         if (m_matchPrimaveraWBS && parentTask != null)
         {
            task.setWBS(parentTask.getWBS());
         }

         Integer uniqueID = task.getUniqueID();

         // Add User Defined Fields - before we handle ID clashes
         populateUserDefinedFieldValues("TASK", FieldTypeClass.TASK, task, uniqueID);

         populateActivityCodes(task);

         if (uniqueIDs.contains(uniqueID))
         {
            while (uniqueIDs.contains(Integer.valueOf(nextID)))
            {
               ++nextID;
            }
            Integer newUniqueID = Integer.valueOf(nextID);
            m_clashMap.put(uniqueID, newUniqueID);
            uniqueID = newUniqueID;
            task.setUniqueID(uniqueID);
         }
         uniqueIDs.add(uniqueID);

         Integer calId = row.getInteger("clndr_id");
         ProjectCalendar cal = m_calMap.get(calId);
         task.setCalendar(cal);

         Date startDate = row.getDate("act_start_date") == null ? row.getDate("restart_date") : row.getDate("act_start_date");
         task.setStart(startDate);
         Date endDate = row.getDate("act_end_date") == null ? row.getDate("reend_date") : row.getDate("act_end_date");
         task.setFinish(endDate);

         Duration work = Duration.add(task.getActualWork(), task.getRemainingWork(), projectProperties);
         task.setWork(work);

         m_eventManager.fireTaskReadEvent(task);
      }

      new ActivitySorter(TaskField.TEXT1, wbsTasks).sort(m_project);

      updateStructure();
      updateDates();
      updateWork();
   }
784320
public List<TaskInstance> getSubtaskInstances(Long masterTaskInstId) throws DataAccessException {
        try {
            db.openConnection();
            String query = "select " + getTaskInstanceSelect() +
                    " from TASK_INSTANCE ti where TASK_INST_SECONDARY_OWNER = ? and TASK_INST_SECONDARY_OWNER_ID = ?";
            Object[] args = new Object[2];
            args[0] = OwnerType.TASK_INSTANCE;
            args[1] = masterTaskInstId;
            ResultSet rs = db.runSelect(query, args);
            List<TaskInstance> taskInsts = new ArrayList<TaskInstance>();
            while (rs.next()) {
                taskInsts.add(getTaskInstanceSub(rs, false));
            }
            return taskInsts;
        } catch (Exception e) {
            throw new DataAccessException(0, "failed to get task instances", e);
        } finally {
            db.closeConnection();
        }
    }
645383
public void setActiveLogId(String id, String activeLogId) {
        Integer value = null;
        if (activeLogId != null) {
            value = Integer.parseInt(activeLogId);
        }
        db.update("UPDATE Tasks SET activeLogId = ? WHERE id = ?",
                value, Integer.parseInt(id));
    }
653512
def get_row_by_task_id(self, task_id):
        ''''''
        for row in self.liststore:
            if row and row[TASKID_COL] == task_id:
                return row
        return None
1284180
public function getByTask($task_id, array $params = [])
    {
        $task_id = (int) $task_id;
        if ($task_id <= 0) {
            throw new Exception('Invalid param task_id');
        }
        return $this->rest->get("todo_items/$task_id/$this->action", $params);
    }
549948
@Override
    public TaskInstance findTaskByWorkItemId(Long workItemId) {
        if( config.isRest() ) {
            Map<String, Object> valuesMap = new HashMap<String, Object>();
            valuesMap.put(WORK_ITEM_ID, workItemId);

            return makeHttpGetRequestAndCreateCustomResponse(
                    build(loadBalancer.getUrl(), QUERY_URI + "/" + TASK_BY_WORK_ITEM_ID_GET_URI, valuesMap), TaskInstance.class);


        } else {
            CommandScript script = new CommandScript( Collections.singletonList( (KieServerCommand) new DescriptorCommand( "QueryService", "getTaskByWorkItemId", new Object[]{workItemId}) ) );
            ServiceResponse<TaskInstance> response = (ServiceResponse<TaskInstance>) executeJmsCommand( script, DescriptorCommand.class.getName(), "BPM" ).getResponses().get(0);

            throwExceptionOnFailure(response);
            if (shouldReturnWithNullResponse(response)) {
                return null;
            }
            return response.getResult();
        }
    }
935922
public TimerTaskData getTimerTaskData(Serializable taskID) {
		TimerTaskCacheData timerTaskCacheData = new TimerTaskCacheData(taskID, baseFqn, cluster);
		if (timerTaskCacheData.exists()) {
			return timerTaskCacheData.getTaskData();
		}
		else {
			return null;
		}
	}
507843
private static void processTaskFilter(ProjectFile project, Filter filter)
   {
      for (Task task : project.getTasks())
      {
         if (filter.evaluate(task, null))
         {
            System.out.println(task.getID() + "," + task.getUniqueID() + "," + task.getName());
         }
      }
   }
819564
public OvhTaskFilter domain_task_filter_id_GET(String domain, Long id) throws IOException {
		String qPath = "/email/domain/{domain}/task/filter/{id}";
		StringBuilder sb = path(qPath, domain, id);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhTaskFilter.class);
	}
1183615
public OvhOfferTask billingAccount_service_serviceName_offerTask_taskId_GET(String billingAccount, String serviceName, Long taskId) throws IOException {
		String qPath = "/telephony/{billingAccount}/service/{serviceName}/offerTask/{taskId}";
		StringBuilder sb = path(qPath, billingAccount, serviceName, taskId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhOfferTask.class);
	}
747697
private void processTasks()
   {
      int uniqueID = 0;

      FastTrackTable activities = m_data.getTable(FastTrackTableType.ACTIVITIES);
      for (MapRow row : activities)
      {
         ++uniqueID;

         Integer id = row.getInteger(ActivityField.ACTIVITY_ROW_ID);
         if (id == null || id.intValue() < 1)
         {
            continue;
         }

         Task task = m_project.addTask();
         task.setName(row.getString(ActivityField.ACTIVITY_NAME));
         task.setID(id);
         task.setUniqueID(Integer.valueOf(uniqueID));
         //  Activity Row Number
         task.setFlag(1, row.getBoolean(ActivityField.FLAG_1));
         task.setFlag(2, row.getBoolean(ActivityField.FLAG_2));
         task.setFlag(3, row.getBoolean(ActivityField.FLAG_3));
         task.setFlag(4, row.getBoolean(ActivityField.FLAG_4));
         task.setFlag(5, row.getBoolean(ActivityField.FLAG_5));
         task.setFlag(6, row.getBoolean(ActivityField.FLAG_6));
         task.setFlag(7, row.getBoolean(ActivityField.FLAG_7));
         task.setFlag(8, row.getBoolean(ActivityField.FLAG_8));
         task.setFlag(9, row.getBoolean(ActivityField.FLAG_9));
         task.setFlag(10, row.getBoolean(ActivityField.FLAG_10));
         task.setFlag(11, row.getBoolean(ActivityField.FLAG_11));
         task.setFlag(12, row.getBoolean(ActivityField.FLAG_12));
         task.setFlag(13, row.getBoolean(ActivityField.FLAG_13));
         task.setFlag(14, row.getBoolean(ActivityField.FLAG_14));
         task.setFlag(15, row.getBoolean(ActivityField.FLAG_15));
         task.setFlag(16, row.getBoolean(ActivityField.FLAG_16));
         task.setFlag(17, row.getBoolean(ActivityField.FLAG_17));
         task.setFlag(18, row.getBoolean(ActivityField.FLAG_18));
         task.setFlag(19, row.getBoolean(ActivityField.FLAG_19));
         task.setFlag(20, row.getBoolean(ActivityField.FLAG_20));
         //   Parent Tree
         task.setText(1, row.getString(ActivityField.TEXT_1));
         task.setText(2, row.getString(ActivityField.TEXT_2));
         task.setText(3, row.getString(ActivityField.TEXT_3));
         task.setText(4, row.getString(ActivityField.TEXT_4));
         task.setText(5, row.getString(ActivityField.TEXT_5));
         task.setText(6, row.getString(ActivityField.TEXT_6));
         task.setText(7, row.getString(ActivityField.TEXT_7));
         task.setText(8, row.getString(ActivityField.TEXT_8));
         task.setText(9, row.getString(ActivityField.TEXT_9));
         task.setText(10, row.getString(ActivityField.TEXT_10));
         task.setText(11, row.getString(ActivityField.TEXT_11));
         task.setText(12, row.getString(ActivityField.TEXT_12));
         task.setText(13, row.getString(ActivityField.TEXT_13));
         task.setText(14, row.getString(ActivityField.TEXT_14));
         task.setText(15, row.getString(ActivityField.TEXT_15));
         task.setText(16, row.getString(ActivityField.TEXT_16));
         task.setText(17, row.getString(ActivityField.TEXT_17));
         task.setText(18, row.getString(ActivityField.TEXT_18));
         task.setText(19, row.getString(ActivityField.TEXT_19));
         task.setText(20, row.getString(ActivityField.TEXT_20));
         task.setText(21, row.getString(ActivityField.TEXT_21));
         task.setText(22, row.getString(ActivityField.TEXT_22));
         task.setText(23, row.getString(ActivityField.TEXT_23));
         task.setText(24, row.getString(ActivityField.TEXT_24));
         task.setText(25, row.getString(ActivityField.TEXT_25));
         task.setText(26, row.getString(ActivityField.TEXT_26));
         task.setText(27, row.getString(ActivityField.TEXT_27));
         task.setText(28, row.getString(ActivityField.TEXT_28));
         task.setText(29, row.getString(ActivityField.TEXT_29));
         task.setText(30, row.getString(ActivityField.TEXT_30));

         task.setWBS(row.getString(ActivityField.WBS));
         task.setGUID(row.getUUID(ActivityField._ACTIVITY_GUID));
         task.setOutlineLevel(getOutlineLevel(task));
         m_eventManager.fireTaskReadEvent(task);
      }

      FastTrackTable table = m_data.getTable(FastTrackTableType.ACTBARS);
      Set<Task> tasksWithBars = new HashSet<Task>();

      for (MapRow row : table)
      {
         if (row.getInt(ActBarField.BAR_ID) < 1)
         {
            continue;
         }

         Task task = m_project.getTaskByUniqueID(row.getInteger(ActBarField._ACTIVITY));
         if (task == null || tasksWithBars.contains(task))
         {
            continue;
         }
         tasksWithBars.add(task);

         // % Used
         task.setActualDuration(row.getDuration(ActBarField.ACTUAL_DURATION));
         task.setActualFinish(row.getTimestamp(ActBarField.ACTUAL_FINISH_DATE, ActBarField.ACTUAL_FINISH_TIME));
         task.setActualStart(row.getTimestamp(ActBarField.ACTUAL_START_DATE, ActBarField.ACTUAL_START_TIME));
         // Attendees
         task.setBaselineCost(1, row.getCurrency(ActBarField.BASELINE_COST_1));
         task.setBaselineCost(2, row.getCurrency(ActBarField.BASELINE_COST_2));
         task.setBaselineCost(3, row.getCurrency(ActBarField.BASELINE_COST_3));
         task.setBaselineCost(4, row.getCurrency(ActBarField.BASELINE_COST_4));
         task.setBaselineCost(5, row.getCurrency(ActBarField.BASELINE_COST_5));
         task.setBaselineCost(6, row.getCurrency(ActBarField.BASELINE_COST_6));
         task.setBaselineCost(7, row.getCurrency(ActBarField.BASELINE_COST_7));
         task.setBaselineCost(8, row.getCurrency(ActBarField.BASELINE_COST_8));
         task.setBaselineCost(9, row.getCurrency(ActBarField.BASELINE_COST_9));
         task.setBaselineCost(10, row.getCurrency(ActBarField.BASELINE_COST_10));
         task.setBaselineDuration(1, row.getDuration(ActBarField.BASELINE_DURATION_1));
         task.setBaselineDuration(2, row.getDuration(ActBarField.BASELINE_DURATION_2));
         task.setBaselineDuration(3, row.getDuration(ActBarField.BASELINE_DURATION_3));
         task.setBaselineDuration(4, row.getDuration(ActBarField.BASELINE_DURATION_4));
         task.setBaselineDuration(5, row.getDuration(ActBarField.BASELINE_DURATION_5));
         task.setBaselineDuration(6, row.getDuration(ActBarField.BASELINE_DURATION_6));
         task.setBaselineDuration(7, row.getDuration(ActBarField.BASELINE_DURATION_7));
         task.setBaselineDuration(8, row.getDuration(ActBarField.BASELINE_DURATION_8));
         task.setBaselineDuration(9, row.getDuration(ActBarField.BASELINE_DURATION_9));
         task.setBaselineDuration(10, row.getDuration(ActBarField.BASELINE_DURATION_10));
         task.setBaselineFinish(1, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_1, ActBarField.BASELINE_FINISH_TIME_1));
         task.setBaselineFinish(2, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_2, ActBarField.BASELINE_FINISH_TIME_2));
         task.setBaselineFinish(3, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_3, ActBarField.BASELINE_FINISH_TIME_3));
         task.setBaselineFinish(4, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_4, ActBarField.BASELINE_FINISH_TIME_4));
         task.setBaselineFinish(5, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_5, ActBarField.BASELINE_FINISH_TIME_5));
         task.setBaselineFinish(6, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_6, ActBarField.BASELINE_FINISH_TIME_6));
         task.setBaselineFinish(7, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_7, ActBarField.BASELINE_FINISH_TIME_7));
         task.setBaselineFinish(8, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_8, ActBarField.BASELINE_FINISH_TIME_8));
         task.setBaselineFinish(9, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_9, ActBarField.BASELINE_FINISH_TIME_9));
         task.setBaselineFinish(10, row.getTimestamp(ActBarField.BASELINE_FINISH_DATE_10, ActBarField.BASELINE_FINISH_TIME_10));
         task.setBaselineFinish(1, row.getTimestamp(ActBarField.BASELINE_START_DATE_1, ActBarField.BASELINE_START_TIME_1));
         task.setBaselineFinish(2, row.getTimestamp(ActBarField.BASELINE_START_DATE_2, ActBarField.BASELINE_START_TIME_2));
         task.setBaselineFinish(3, row.getTimestamp(ActBarField.BASELINE_START_DATE_3, ActBarField.BASELINE_START_TIME_3));
         task.setBaselineFinish(4, row.getTimestamp(ActBarField.BASELINE_START_DATE_4, ActBarField.BASELINE_START_TIME_4));
         task.setBaselineFinish(5, row.getTimestamp(ActBarField.BASELINE_START_DATE_5, ActBarField.BASELINE_START_TIME_5));
         task.setBaselineFinish(6, row.getTimestamp(ActBarField.BASELINE_START_DATE_6, ActBarField.BASELINE_START_TIME_6));
         task.setBaselineFinish(7, row.getTimestamp(ActBarField.BASELINE_START_DATE_7, ActBarField.BASELINE_START_TIME_7));
         task.setBaselineFinish(8, row.getTimestamp(ActBarField.BASELINE_START_DATE_8, ActBarField.BASELINE_START_TIME_8));
         task.setBaselineFinish(9, row.getTimestamp(ActBarField.BASELINE_START_DATE_9, ActBarField.BASELINE_START_TIME_9));
         task.setBaselineFinish(10, row.getTimestamp(ActBarField.BASELINE_START_DATE_10, ActBarField.BASELINE_START_TIME_10));
         task.setBaselineWork(1, row.getWork(ActBarField.BASELINE_WORK_1));
         task.setBaselineWork(2, row.getWork(ActBarField.BASELINE_WORK_2));
         task.setBaselineWork(3, row.getWork(ActBarField.BASELINE_WORK_3));
         task.setBaselineWork(4, row.getWork(ActBarField.BASELINE_WORK_4));
         task.setBaselineWork(5, row.getWork(ActBarField.BASELINE_WORK_5));
         task.setBaselineWork(6, row.getWork(ActBarField.BASELINE_WORK_6));
         task.setBaselineWork(7, row.getWork(ActBarField.BASELINE_WORK_7));
         task.setBaselineWork(8, row.getWork(ActBarField.BASELINE_WORK_8));
         task.setBaselineWork(9, row.getWork(ActBarField.BASELINE_WORK_9));
         task.setBaselineWork(10, row.getWork(ActBarField.BASELINE_WORK_10));
         task.setConstraintDate(row.getTimestamp(ActBarField.CONSTRAINT_DATE, ActBarField.CONSTRAINT_TIME));
         task.setCost(1, row.getCurrency(ActBarField.COST_1));
         task.setCost(2, row.getCurrency(ActBarField.COST_2));
         task.setCost(3, row.getCurrency(ActBarField.COST_3));
         task.setCost(4, row.getCurrency(ActBarField.COST_4));
         task.setCost(5, row.getCurrency(ActBarField.COST_5));
         task.setCost(6, row.getCurrency(ActBarField.COST_6));
         task.setCost(7, row.getCurrency(ActBarField.COST_7));
         task.setCost(8, row.getCurrency(ActBarField.COST_8));
         task.setCost(9, row.getCurrency(ActBarField.COST_9));
         task.setCost(10, row.getCurrency(ActBarField.COST_10));
         // Created
         task.setCritical(row.getBoolean(ActBarField.CRITICAL));
         task.setDate(1, row.getDate(ActBarField.DATE_1));
         task.setDate(2, row.getDate(ActBarField.DATE_2));
         task.setDate(3, row.getDate(ActBarField.DATE_3));
         task.setDate(4, row.getDate(ActBarField.DATE_4));
         task.setDate(5, row.getDate(ActBarField.DATE_5));
         task.setDate(6, row.getDate(ActBarField.DATE_6));
         task.setDate(7, row.getDate(ActBarField.DATE_7));
         task.setDate(8, row.getDate(ActBarField.DATE_8));
         task.setDate(9, row.getDate(ActBarField.DATE_9));
         task.setDate(10, row.getDate(ActBarField.DATE_10));
         task.setDuration(row.getDuration(ActBarField.DURATION));
         task.setDuration(1, row.getDuration(ActBarField.DURATION_1));
         task.setDuration(2, row.getDuration(ActBarField.DURATION_2));
         task.setDuration(3, row.getDuration(ActBarField.DURATION_3));
         task.setDuration(4, row.getDuration(ActBarField.DURATION_4));
         task.setDuration(5, row.getDuration(ActBarField.DURATION_5));
         task.setDuration(6, row.getDuration(ActBarField.DURATION_6));
         task.setDuration(7, row.getDuration(ActBarField.DURATION_7));
         task.setDuration(8, row.getDuration(ActBarField.DURATION_8));
         task.setDuration(9, row.getDuration(ActBarField.DURATION_9));
         task.setDuration(10, row.getDuration(ActBarField.DURATION_10));
         task.setEarlyFinish(row.getTimestamp(ActBarField.EARLY_FINISH_DATE, ActBarField.EARLY_FINISH_TIME));
         task.setEarlyStart(row.getTimestamp(ActBarField.EARLY_START_DATE, ActBarField.EARLY_START_TIME));
         task.setEffortDriven(row.getBoolean(ActBarField.EFFORT_DRIVEN));
         task.setFinish(row.getTimestamp(ActBarField.FINISH_DATE, ActBarField.FINISH_TIME));
         task.setFinish(1, row.getTimestamp(ActBarField.FINISH_DATE_1, ActBarField.FINISH_TIME_1));
         task.setFinish(2, row.getTimestamp(ActBarField.FINISH_DATE_2, ActBarField.FINISH_TIME_2));
         task.setFinish(3, row.getTimestamp(ActBarField.FINISH_DATE_3, ActBarField.FINISH_TIME_3));
         task.setFinish(4, row.getTimestamp(ActBarField.FINISH_DATE_4, ActBarField.FINISH_TIME_4));
         task.setFinish(5, row.getTimestamp(ActBarField.FINISH_DATE_5, ActBarField.FINISH_TIME_5));
         task.setFinish(6, row.getTimestamp(ActBarField.FINISH_DATE_6, ActBarField.FINISH_TIME_6));
         task.setFinish(7, row.getTimestamp(ActBarField.FINISH_DATE_7, ActBarField.FINISH_TIME_7));
         task.setFinish(8, row.getTimestamp(ActBarField.FINISH_DATE_8, ActBarField.FINISH_TIME_8));
         task.setFinish(9, row.getTimestamp(ActBarField.FINISH_DATE_9, ActBarField.FINISH_TIME_9));
         task.setFinish(10, row.getTimestamp(ActBarField.FINISH_DATE_10, ActBarField.FINISH_TIME_10));
         // Finish Slack
         // Fixed Cost
         // Fixed Duration
         // Free Float
         task.setIgnoreResourceCalendar(row.getBoolean(ActBarField.IGNORE_RESOURCE_CALENDARS));
         task.setLateFinish(row.getTimestamp(ActBarField.LATE_FINISH_DATE, ActBarField.LATE_FINISH_TIME));
         task.setLateStart(row.getTimestamp(ActBarField.LATE_START_DATE, ActBarField.LATE_START_TIME));
         task.setNumber(1, row.getDouble(ActBarField.NUMBER_1));
         task.setNumber(2, row.getDouble(ActBarField.NUMBER_2));
         task.setNumber(3, row.getDouble(ActBarField.NUMBER_3));
         task.setNumber(4, row.getDouble(ActBarField.NUMBER_4));
         task.setNumber(5, row.getDouble(ActBarField.NUMBER_5));
         task.setNumber(6, row.getDouble(ActBarField.NUMBER_6));
         task.setNumber(7, row.getDouble(ActBarField.NUMBER_7));
         task.setNumber(8, row.getDouble(ActBarField.NUMBER_8));
         task.setNumber(9, row.getDouble(ActBarField.NUMBER_9));
         task.setNumber(10, row.getDouble(ActBarField.NUMBER_10));
         task.setNumber(11, row.getDouble(ActBarField.NUMBER_11));
         task.setNumber(12, row.getDouble(ActBarField.NUMBER_12));
         task.setNumber(13, row.getDouble(ActBarField.NUMBER_13));
         task.setNumber(14, row.getDouble(ActBarField.NUMBER_14));
         task.setNumber(15, row.getDouble(ActBarField.NUMBER_15));
         task.setNumber(16, row.getDouble(ActBarField.NUMBER_16));
         task.setNumber(17, row.getDouble(ActBarField.NUMBER_17));
         task.setNumber(18, row.getDouble(ActBarField.NUMBER_18));
         task.setNumber(19, row.getDouble(ActBarField.NUMBER_19));
         task.setNumber(20, row.getDouble(ActBarField.NUMBER_20));
         task.setPercentageComplete(row.getDouble(ActBarField.PERCENT_COMPLETE));
         // Priority
         // Resource Cost
         task.setResourceNames(row.getString(ActBarField.RESOURCES_ASSIGNED));
         // Revised Duration
         // Revised Finish Date
         // Revised Finish Time
         // Revised Start Date
         // Revised Start Time
         task.setStart(row.getTimestamp(ActBarField.START_DATE, ActBarField.START_TIME));
         // Start Float
         task.setStart(1, row.getTimestamp(ActBarField.START_DATE_1, ActBarField.START_TIME_1));
         task.setStart(2, row.getTimestamp(ActBarField.START_DATE_2, ActBarField.START_TIME_2));
         task.setStart(3, row.getTimestamp(ActBarField.START_DATE_3, ActBarField.START_TIME_3));
         task.setStart(4, row.getTimestamp(ActBarField.START_DATE_4, ActBarField.START_TIME_4));
         task.setStart(5, row.getTimestamp(ActBarField.START_DATE_5, ActBarField.START_TIME_5));
         task.setStart(6, row.getTimestamp(ActBarField.START_DATE_6, ActBarField.START_TIME_6));
         task.setStart(7, row.getTimestamp(ActBarField.START_DATE_7, ActBarField.START_TIME_7));
         task.setStart(8, row.getTimestamp(ActBarField.START_DATE_8, ActBarField.START_TIME_8));
         task.setStart(9, row.getTimestamp(ActBarField.START_DATE_9, ActBarField.START_TIME_9));
         task.setStart(10, row.getTimestamp(ActBarField.START_DATE_10, ActBarField.START_TIME_10));
         // Task Calendar
         // Total Cost
         // Total Float
         // Total Resource Duration
         task.setWork(row.getWork(ActBarField.WORK));
         // _Activity
         // _BarBits
         // _BarStl
         // _yOffset
      }

      m_project.updateStructure();
   }
211863
@Override
	public Task findTask(Long taskId) {
		check();
		Task task = null;
		if( this.pessimisticLocking ) {
			return this.em.find( TaskImpl.class, taskId, lockMode );
        }
		task = this.em.find( TaskImpl.class, taskId );
		return task;
	}
979105
public void task_domain_id_accelerate_POST(Long id) throws IOException {
		String qPath = "/me/task/domain/{id}/accelerate";
		StringBuilder sb = path(qPath, id);
		exec(qPath, "POST", sb.toString(), null);
	}
921400
public Long createAndExecuteTask(String taskName, String data, String key1, String key2, boolean inChannel) {
		FieldValidator.validateTaskData(data);
		FieldValidator.validateTaskKey1(key1);
		FieldValidator.validateTaskKey2(key2);
		TaskConfig tc = context.registry.getTaskConfig(taskName);
		if (tc == null)
			throw new IllegalArgumentException("Task '" + taskName + "' is not known for TED");
		Long taskId = context.tedDao.createTaskWithWorkStatus(taskName, tc.channel, data, key1, key2);
		TaskRec taskRec = new TaskRec();
		taskRec.taskId = taskId;
		taskRec.batchId = null;
		taskRec.system = context.config.systemId();
		taskRec.name = taskName;
		taskRec.status = TedStatus.WORK.toString();
		taskRec.channel = tc.channel;
		taskRec.nextTs = new Date();
		taskRec.retries = 0;
		taskRec.key1 = key1;
		taskRec.key2 = key2;
		taskRec.data = data;
		taskRec.createTs = new Date();
		taskRec.startTs = new Date();
		taskRec.finishTs = null;
		if (inChannel) {
			// in separate thread
			context.taskManager.sendTaskListToChannels(Collections.singletonList(taskRec));
		} else {
			// in this thread
			context.taskManager.processTask(taskRec);
		}
		return taskId;
	}