@Override public DeployExecution valueOf(Map<String, Object> result) { long id = platform.getLongValue(result.get(idColName)).longValue(); DeployExecutionStatus status = DeployExecutionStatus.IN_PROGRESS.valueOfStatusCode(((String) result.get(statusColName)).charAt(0)); Timestamp deployTime = platform.getTimestampValue(result.get(deployTimeColName)); String executorId = (String) result.get(executorIdColName); String toolVersion = (String) result.get(toolVersionColName); boolean init = platform.getIntegerValue(result.get(initCommandColName)).intValue() == 1; boolean rollback = platform.getIntegerValue(result.get(rollbackCommandColName)).intValue() == 1; String requesterId = (String) result.get(requesterIdColName); String reason = (String) result.get(reasonColName); String productVersion = (String) result.get(productVersionColName); ImmutableSet<DeployExecutionAttribute> deployExecutionAttributes = attrsById.get(id).toSet().toImmutable(); DeployExecutionImpl deployExecution = new DeployExecutionImpl(requesterId, executorId, schema, toolVersion, deployTime, init, rollback, productVersion, reason, deployExecutionAttributes); deployExecution.setId(id); deployExecution.setStatus(status); return deployExecution; } }).toImmutable();
@Override public DeployExecution valueOf(Map<String, Object> result) { long id = platform.getLongValue(result.get(idColName)).longValue(); DeployExecutionStatus status = DeployExecutionStatus.IN_PROGRESS.valueOfStatusCode(((String) result.get(statusColName)).charAt(0)); Timestamp deployTime = platform.getTimestampValue(result.get(deployTimeColName)); String executorId = (String) result.get(executorIdColName); String toolVersion = (String) result.get(toolVersionColName); boolean init = platform.getIntegerValue(result.get(initCommandColName)).intValue() == 1; boolean rollback = platform.getIntegerValue(result.get(rollbackCommandColName)).intValue() == 1; String requesterId = (String) result.get(requesterIdColName); String reason = (String) result.get(reasonColName); String productVersion = (String) result.get(productVersionColName); ImmutableSet<DeployExecutionAttribute> deployExecutionAttributes = attrsById.get(id).toSet().toImmutable(); DeployExecutionImpl deployExecution = new DeployExecutionImpl(requesterId, executorId, schema, toolVersion, deployTime, init, rollback, productVersion, reason, deployExecutionAttributes); deployExecution.setId(id); deployExecution.setStatus(status); return deployExecution; } }).toImmutable();