diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java index 809b3ef5ead..79c9a7f0013 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/operation/mgt/Operation.java @@ -37,7 +37,6 @@ public class Operation { private Properties properties; private Type type; private int id; - private String payLoad; private Status status; private String receivedTimeStamp; private String createdTimeStamp; @@ -78,14 +77,6 @@ public class Operation { this.id = id; } - public String getPayLoad() { - return payLoad; - } - - public void setPayLoad(String payLoad) { - this.payLoad = payLoad; - } - public Status getStatus() { return status; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java index 49871ca1dec..8e813709826 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ProfileOperationDAOImpl.java @@ -51,7 +51,7 @@ public class ProfileOperationDAOImpl extends OperationDAOImpl { oos = new ObjectOutputStream(bao); oos.writeObject(profileOp); - stmt = conn.prepareStatement("INSERT INTO DM_PROFILE_OPERATION(OPERATION_ID, OPERATIONDETAILS) " + + stmt = conn.prepareStatement("INSERT INTO DM_PROFILE_OPERATION(OPERATION_ID, OPERATION_DETAILS) " + "VALUES(?, ?)"); stmt.setInt(1, operationId); stmt.setBytes(2, bao.toByteArray()); @@ -89,7 +89,7 @@ public class ProfileOperationDAOImpl extends OperationDAOImpl { ByteArrayInputStream bais = null; ObjectInputStream ois = null; try { - stmt = conn.prepareStatement("SELECT OPERATIONDETAILS FROM DM_PROFILE_OPERATION WHERE OPERATION_ID = ?"); + stmt = conn.prepareStatement("SELECT OPERATION_DETAILS FROM DM_PROFILE_OPERATION WHERE OPERATION_ID = ?"); stmt.setInt(1, operationId); rs = stmt.executeQuery(); @@ -138,7 +138,7 @@ public class ProfileOperationDAOImpl extends OperationDAOImpl { try { Connection connection = OperationManagementDAOFactory.openConnection(); stmt = connection.prepareStatement( - "SELECT po.OPERATIONDETAILS AS OPERATIONDETAILS " + + "SELECT po.OPERATION_DETAILS AS OPERATIONDETAILS " + "FROM DM_OPERATION o " + "INNER JOIN DM_PROFILE_OPERATION po ON o.ID = po.OPERATION_ID AND o.ID IN (" + "SELECT dom.OPERATION_ID FROM (SELECT d.ID FROM DM_DEVICE d INNER JOIN " + @@ -181,7 +181,7 @@ public class ProfileOperationDAOImpl extends OperationDAOImpl { try { Connection connection = OperationManagementDAOFactory.openConnection(); - stmt = connection.prepareStatement("UPDATE DM_PROFILE_OPERATION O SET O.OPERATIONDETAILS=? " + + stmt = connection.prepareStatement("UPDATE DM_PROFILE_OPERATION O SET O.OPERATION_DETAILS=? " + "WHERE O.OPERATION_ID=?"); bao = new ByteArrayOutputStream(); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql index 19bf54c5b64..8964e01b32c 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/dbscripts/cdm/h2.sql @@ -27,7 +27,6 @@ CREATE TABLE IF NOT EXISTS DM_OPERATION ( CREATED_TIMESTAMP TIMESTAMP NOT NULL, RECEIVED_TIMESTAMP TIMESTAMP NULL, STATUS VARCHAR(50) NULL, - PAYLOAD CLOB NULL, OPERATIONCODE VARCHAR(25) NOT NULL, PRIMARY KEY (ID) ); @@ -50,7 +49,7 @@ CREATE TABLE IF NOT EXISTS DM_COMMAND_OPERATION ( CREATE TABLE IF NOT EXISTS DM_PROFILE_OPERATION ( OPERATION_ID INTEGER NOT NULL, ENABLED INTEGER NOT NULL DEFAULT 0, - OPERATIONDETAILS BLOB DEFAULT NULL, + OPERATION_DETAILS BLOB DEFAULT NULL, PRIMARY KEY (OPERATION_ID), CONSTRAINT fk_dm_operation_profile FOREIGN KEY (OPERATION_ID) REFERENCES DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION