Cast to operation type in dto convertion

revert-70aa11f8
manoj 10 years ago
parent 245d3706a2
commit 0f7df72167

@ -18,9 +18,7 @@
*/
package org.wso2.carbon.device.mgt.core.operation.mgt.dao.util;
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.CommandOperation;
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.Operation;
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.ProfileOperation;
import org.wso2.carbon.device.mgt.core.dto.operation.mgt.*;
public class OperationDAOUtil {
@ -32,6 +30,10 @@ public class OperationDAOUtil {
dtoOperation = new CommandOperation();
} else if (operation.getType().equals(org.wso2.carbon.device.mgt.common.operation.mgt.Operation.Type.PROFILE)) {
dtoOperation = new ProfileOperation();
}else if(operation.getType().equals(org.wso2.carbon.device.mgt.common.operation.mgt.Operation.Type.POLICY)){
dtoOperation = new PolicyOperation();
}else if(operation.getType().equals(org.wso2.carbon.device.mgt.common.operation.mgt.Operation.Type.CONFIG)) {
dtoOperation = new ConfigOperation();
}else{
dtoOperation = new Operation();
}

Loading…
Cancel
Save