From 7cf5460fe6530b3ac480f0943929e4f9d990011a Mon Sep 17 00:00:00 2001 From: manoj Date: Wed, 1 Apr 2015 18:54:09 +0530 Subject: [PATCH] Set profile operation DAO for profile operations --- .../mgt/core/operation/mgt/OperationManagerImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index f4dae50167..809b6abd65 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -164,12 +164,15 @@ public class OperationManagerImpl implements OperationManager { } private OperationDAO lookupOperationDAO(Operation operation) { + if (operation instanceof CommandOperation) { return commandOperationDAO; + } else if (operation instanceof ProfileOperation) { + return profileOperationDAO; } else if (operation instanceof ConfigOperation) { return configOperationDAO; - } else { - return profileOperationDAO; + }else{ + return operationDAO; } }