Remove status field from get next operations query

revert-70aa11f8
manoj 10 years ago
parent 1ed6eec02f
commit 6a1cf1b3f8

@ -230,21 +230,17 @@ public class OperationManagerImpl implements OperationManager {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation dtoOperation = operationDAO
.getNextOperation(device.getId()); .getNextOperation(device.getId());
if (dtoOperation.getType() if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND.equals(dtoOperation.getType())) {
.equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.COMMAND)) {
org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation; org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation commandOperation;
commandOperation = (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO commandOperation = (org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation) commandOperationDAO
.getOperation(dtoOperation.getId()); .getOperation(dtoOperation.getId());
dtoOperation.setEnabled(commandOperation.isEnabled()); dtoOperation.setEnabled(commandOperation.isEnabled());
} else if (dtoOperation.getType() } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG.equals(dtoOperation.getType())) {
.equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.CONFIG)) {
dtoOperation = configOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = configOperationDAO.getOperation(dtoOperation.getId());
} else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type.PROFILE.equals(dtoOperation.getType())) {
.PROFILE)) {
dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = profileOperationDAO.getOperation(dtoOperation.getId());
} else if (dtoOperation.getType().equals(org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type } else if (org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation.Type
.POLICY)) { .POLICY.equals(dtoOperation.getType())) {
dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId()); dtoOperation = policyOperationDAO.getOperation(dtoOperation.getId());
} }

@ -328,7 +328,6 @@ public class OperationDAOImpl implements OperationDAO {
if (rs.next()) { if (rs.next()) {
operation = new Operation(); operation = new Operation();
operation.setType(this.getType(rs.getString("TYPE"))); operation.setType(this.getType(rs.getString("TYPE")));
operation.setStatus(this.getStatus(rs.getString("STATUS")));
operation.setId(rs.getInt("ID")); operation.setId(rs.getInt("ID"));
operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString()); operation.setCreatedTimeStamp(rs.getTimestamp("CREATED_TIMESTAMP").toString());
if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) { if (rs.getTimestamp("RECEIVED_TIMESTAMP") == null) {

Loading…
Cancel
Save