Remove paylooad property from Operation

revert-70aa11f8
manoj 10 years ago
parent 0f55d86b08
commit 1c80fcd124

@ -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;
}

@ -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();

@ -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

Loading…
Cancel
Save