public Map<String, Object> toUpdateObject() { final Map<String, Object> updatedNodeMap = new HashMap<>(); updatedNodeMap.put(ID_PARAM, getId()); updatedNodeMap.put(STATUS_PARAM, getStatus().getNumVal()); updatedNodeMap.put(STARTTIME_PARAM, getStartTime()); updatedNodeMap.put(ENDTIME_PARAM, getEndTime()); updatedNodeMap.put(UPDATETIME_PARAM, getUpdateTime()); updatedNodeMap.put(ATTEMPT_PARAM, getAttempt()); if (getAttempt() > 0) { final ArrayList<Map<String, Object>> pastAttempts = new ArrayList<>(); for (final ExecutionAttempt attempt : getPastAttemptList()) { pastAttempts.add(attempt.toObject()); } updatedNodeMap.put(PASTATTEMPTS_PARAM, pastAttempts); } return updatedNodeMap; }
public Map<String, Object> toUpdateObject() { Map<String, Object> updatedNodeMap = new HashMap<String,Object>(); updatedNodeMap.put(ID_PARAM, getId()); updatedNodeMap.put(STATUS_PARAM, getStatus().getNumVal()); updatedNodeMap.put(STARTTIME_PARAM, getStartTime()); updatedNodeMap.put(ENDTIME_PARAM, getEndTime()); updatedNodeMap.put(UPDATETIME_PARAM, getUpdateTime()); updatedNodeMap.put(ATTEMPT_PARAM, getAttempt()); if (getAttempt() > 0) { ArrayList<Map<String,Object>> pastAttempts = new ArrayList<Map<String,Object>>(); for (ExecutionAttempt attempt: getPastAttemptList()) { pastAttempts.add(attempt.toObject()); } updatedNodeMap.put(PASTATTEMPTS_PARAM, pastAttempts); } return updatedNodeMap; }
public Map<String, Object> toUpdateObject() { final Map<String, Object> updatedNodeMap = new HashMap<>(); updatedNodeMap.put(ID_PARAM, getId()); updatedNodeMap.put(STATUS_PARAM, getStatus().getNumVal()); updatedNodeMap.put(STARTTIME_PARAM, getStartTime()); updatedNodeMap.put(ENDTIME_PARAM, getEndTime()); updatedNodeMap.put(UPDATETIME_PARAM, getUpdateTime()); updatedNodeMap.put(ATTEMPT_PARAM, getAttempt()); if (getAttempt() > 0) { final ArrayList<Map<String, Object>> pastAttempts = new ArrayList<>(); for (final ExecutionAttempt attempt : getPastAttemptList()) { pastAttempts.add(attempt.toObject()); } updatedNodeMap.put(PASTATTEMPTS_PARAM, pastAttempts); } return updatedNodeMap; }