http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
deleted file mode 100644
index 7c0327f..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ComputationSchedulingResource.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import 
org.apache.airavata.persistance.registry.jpa.model.Computational_Resource_Scheduling;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.sql.Timestamp;
-import java.util.List;
-
-public class ComputationSchedulingResource extends AbstractResource {
-    private static final Logger logger = 
LoggerFactory.getLogger(ComputationSchedulingResource.class);
-    private int schedulingId = 0;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private String resourceHostId;
-    private int cpuCount;
-    private int nodeCount;
-    private int numberOfThreads;
-    private String queueName;
-    private int walltimeLimit;
-    private Timestamp jobStartTime;
-    private int physicalMemory;
-    private String projectName;
-    private String chessisName;
-
-    public String getChessisName() {
-        return chessisName;
-    }
-
-    public void setChessisName(String chessisName) {
-        this.chessisName = chessisName;
-    }
-
-    public int getSchedulingId() {
-        return schedulingId;
-    }
-
-    public void setSchedulingId(int schedulingId) {
-        this.schedulingId = schedulingId;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public String getResourceHostId() {
-        return resourceHostId;
-    }
-
-    public void setResourceHostId(String resourceHostId) {
-        this.resourceHostId = resourceHostId;
-    }
-
-    public int getCpuCount() {
-        return cpuCount;
-    }
-
-    public void setCpuCount(int cpuCount) {
-        this.cpuCount = cpuCount;
-    }
-
-    public int getNodeCount() {
-        return nodeCount;
-    }
-
-    public void setNodeCount(int nodeCount) {
-        this.nodeCount = nodeCount;
-    }
-
-    public int getNumberOfThreads() {
-        return numberOfThreads;
-    }
-
-    public void setNumberOfThreads(int numberOfThreads) {
-        this.numberOfThreads = numberOfThreads;
-    }
-
-    public String getQueueName() {
-        return queueName;
-    }
-
-    public void setQueueName(String queueName) {
-        this.queueName = queueName;
-    }
-
-    public int getWalltimeLimit() {
-        return walltimeLimit;
-    }
-
-    public void setWalltimeLimit(int walltimeLimit) {
-        this.walltimeLimit = walltimeLimit;
-    }
-
-    public Timestamp getJobStartTime() {
-        return jobStartTime;
-    }
-
-    public void setJobStartTime(Timestamp jobStartTime) {
-        this.jobStartTime = jobStartTime;
-    }
-
-    public int getPhysicalMemory() {
-        return physicalMemory;
-    }
-
-    public void setPhysicalMemory(int physicalMemory) {
-        this.physicalMemory = physicalMemory;
-    }
-
-    public String getProjectName() {
-        return projectName;
-    }
-
-    public void setProjectName(String projectName) {
-        this.projectName = projectName;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for computational scheduling 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws 
RegistryException{
-        logger.error("Unsupported resource type for computational scheduling 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws 
RegistryException{
-        logger.error("Unsupported resource type for computational scheduling 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for computational scheduling 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Computational_Resource_Scheduling scheduling;
-            if (schedulingId != 0) {
-                scheduling = em.find(Computational_Resource_Scheduling.class, 
schedulingId);
-                scheduling.setSchedulingId(schedulingId);
-            } else {
-                scheduling = new Computational_Resource_Scheduling();
-            }
-            Experiment experiment = em.find(Experiment.class, 
experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, 
taskDetailResource.getTaskId());
-                scheduling.setTask(taskDetail);
-                scheduling.setTaskId(taskDetailResource.getTaskId());
-            }
-            scheduling.setExpId(experimentResource.getExpID());
-            scheduling.setExperiment(experiment);
-            scheduling.setResourceHostId(resourceHostId);
-            scheduling.setCpuCount(cpuCount);
-            scheduling.setNodeCount(nodeCount);
-            scheduling.setNumberOfThreads(numberOfThreads);
-            scheduling.setQueueName(queueName);
-            scheduling.setWallTimeLimit(walltimeLimit);
-            scheduling.setJobStartTime(jobStartTime);
-            scheduling.setTotalPhysicalmemory(physicalMemory);
-            scheduling.setProjectName(projectName);
-            scheduling.setChessisName(chessisName);
-            em.persist(scheduling);
-            schedulingId = scheduling.getSchedulingId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
deleted file mode 100644
index c45ba07..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigDataResource.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.ExperimentConfigData;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ConfigDataResource extends AbstractResource {
-    private static final Logger logger = 
LoggerFactory.getLogger(ConfigDataResource.class);
-    private ExperimentResource experimentResource;
-    private boolean airavataAutoSchedule;
-    private boolean overrideManualParams;
-    private boolean shareExp;
-    private String userDn;
-    private boolean generateCert;
-
-    public String getUserDn() {
-        return userDn;
-    }
-
-    public void setUserDn(String userDn) {
-        this.userDn = userDn;
-    }
-
-    public boolean isGenerateCert() {
-        return generateCert;
-    }
-
-    public void setGenerateCert(boolean generateCert) {
-        this.generateCert = generateCert;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public boolean isAiravataAutoSchedule() {
-        return airavataAutoSchedule;
-    }
-
-    public void setAiravataAutoSchedule(boolean airavataAutoSchedule) {
-        this.airavataAutoSchedule = airavataAutoSchedule;
-    }
-
-    public boolean isOverrideManualParams() {
-        return overrideManualParams;
-    }
-
-    public void setOverrideManualParams(boolean overrideManualParams) {
-        this.overrideManualParams = overrideManualParams;
-    }
-
-    public boolean isShareExp() {
-        return shareExp;
-    }
-
-    public void setShareExp(boolean shareExp) {
-        this.shareExp = shareExp;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for config data resource.", 
new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws 
RegistryException{
-        logger.error("Unsupported resource type for config data resource.", 
new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws 
RegistryException{
-        logger.error("Unsupported resource type for config data resource.", 
new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for config data resource.", 
new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            ExperimentConfigData existingConfig = 
em.find(ExperimentConfigData.class, experimentResource.getExpID());
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ExperimentConfigData configData = new ExperimentConfigData();
-            Experiment experiment = em.find(Experiment.class, 
experimentResource.getExpID());
-            configData.setExpId(experimentResource.getExpID());
-            configData.setExperiment(experiment);
-            configData.setAiravataAutoSchedule(airavataAutoSchedule);
-            configData.setOverrideManualParams(overrideManualParams);
-            configData.setShareExp(shareExp);
-            configData.setUserDn(userDn);
-            configData.setGenerateCert(generateCert);
-            if (existingConfig != null) {
-                existingConfig.setExpId(experimentResource.getExpID());
-                existingConfig.setExperiment(experiment);
-                existingConfig.setAiravataAutoSchedule(airavataAutoSchedule);
-                existingConfig.setOverrideManualParams(overrideManualParams);
-                existingConfig.setShareExp(shareExp);
-                existingConfig.setUserDn(userDn);
-                existingConfig.setGenerateCert(generateCert);
-                configData = em.merge(existingConfig);
-            } else {
-                em.persist(configData);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
deleted file mode 100644
index 1214e47..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ConfigurationResource.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.locks.Lock;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Configuration;
-import org.apache.airavata.persistance.registry.jpa.model.Configuration_PK;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConfigurationResource extends AbstractResource {
-    private final static Logger logger = 
LoggerFactory.getLogger(ConfigurationResource.class);
-    private String configKey;
-    private String configVal;
-    private Timestamp expireDate;
-    private String categoryID = 
ConfigurationConstants.CATEGORY_ID_DEFAULT_VALUE;
-
-    public ConfigurationResource() {
-    }
-
-    /**
-     * @param configKey configuration key
-     * @param configVal configuration value
-     */
-    public ConfigurationResource(String configKey, String configVal) {
-        this.configKey = configKey;
-        this.configVal = configVal;
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @return UnsupportedOperationException
-     */
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration 
resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @param name name of the child resource
-     *             throws UnsupportedOperationException
-     */
-    public void remove(ResourceType type, Object name) throws 
RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration 
resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @param name name of the child resource
-     * @return UnsupportedOperationException
-     */
-    public Resource get(ResourceType type, Object name) throws 
RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration 
resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @return UnsupportedOperationException
-     */
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration 
resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * @param expireDate expire date of the configuration
-     */
-    public void setExpireDate(Timestamp expireDate) {
-        this.expireDate = expireDate;
-    }
-
-    /**
-     * saveExperiment configuration to database
-     */
-    public synchronized void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            //whether existing
-            Configuration existing = em.find(Configuration.class, new 
Configuration_PK(configKey, configVal, categoryID));
-            em.close();
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Configuration configuration = new Configuration();
-            configuration.setConfig_key(configKey);
-            configuration.setConfig_val(configVal);
-            configuration.setExpire_date(expireDate);
-            configuration.setCategory_id(categoryID);
-            if (existing != null) {
-                existing.setExpire_date(expireDate);
-                existing.setCategory_id(categoryID);
-                configuration = em.merge(existing);
-            } else {
-                em.persist(configuration);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    /**
-     * Since Configuration does not depend on any other data structures at the
-     * system, this method is not valid
-     *
-     * @param type child resource types
-     * @param name of the child resource
-     * @return UnsupportedOperationException
-     */
-    public boolean isExists(ResourceType type, Object name) {
-        logger.error("Unsupported operation for configuration resource " +
-                "since there are no child resources generated by configuration 
resource.. ",
-                new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * @return configuration value
-     */
-    public String getConfigVal() {
-        return configVal;
-    }
-
-    /**
-     * @param configKey configuration key
-     */
-    public void setConfigKey(String configKey) {
-        this.configKey = configKey;
-    }
-
-    /**
-     * @param configVal configuration value
-     */
-    public void setConfigVal(String configVal) {
-        this.configVal = configVal;
-    }
-
-    public String getCategoryID() {
-        return categoryID;
-    }
-
-    public void setCategoryID(String categoryID) {
-        this.categoryID = categoryID;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
deleted file mode 100644
index ab1b49e..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/DataTransferDetailResource.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.DataTransferDetail;
-import org.apache.airavata.persistance.registry.jpa.model.Status;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.utils.StatusType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-public class DataTransferDetailResource extends AbstractResource {
-    private static final Logger logger = 
LoggerFactory.getLogger(DataTransferDetailResource.class);
-    private String transferId;
-    private TaskDetailResource taskDetailResource;
-    private Timestamp creationTime;
-    private String transferDescription;
-
-    public String getTransferId() {
-        return transferId;
-    }
-
-    public void setTransferId(String transferId) {
-        this.transferId = transferId;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getTransferDescription() {
-        return transferDescription;
-    }
-
-    public void setTransferDescription(String transferDescription) {
-        this.transferDescription = transferDescription;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        switch (type){
-            case STATUS:
-                StatusResource statusResource = new StatusResource();
-                statusResource.setDataTransferDetail(this);
-                return statusResource;
-            default:
-                logger.error("Unsupported resource type for data transfer 
details data resource.", new UnsupportedOperationException());
-                throw new UnsupportedOperationException();
-        }
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws 
RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TRANSFER_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, 
StatusType.DATA_TRANSFER);
-                    q = generator.deleteQuery(em);
-                    q.executeUpdate();
-                    break;
-                default:
-                    logger.error("Unsupported resource type for data transfer 
details resource.", new IllegalArgumentException());
-                    break;
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws 
RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            QueryGenerator generator;
-            Query q;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TRANSFER_ID, name);
-                    generator.setParameter(StatusConstants.STATUS_TYPE, 
StatusType.DATA_TRANSFER);
-                    q = generator.selectQuery(em);
-                    Status status = (Status) q.getSingleResult();
-                    StatusResource statusResource = (StatusResource) 
Utils.getResource(ResourceType.STATUS, status);
-                    em.getTransaction().commit();
-                    em.close();
-                    return statusResource;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for data transfer 
details resource.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Unsupported resource 
type for data transfer details resource.");
-            }
-        } catch (Exception e) {
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        List<Resource> resourceList = new ArrayList<Resource>();
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Query q;
-            QueryGenerator generator;
-            List results;
-            switch (type) {
-                case STATUS:
-                    generator = new QueryGenerator(STATUS);
-                    generator.setParameter(StatusConstants.TRANSFER_ID, 
transferId);
-                    q = generator.selectQuery(em);
-                    results = q.getResultList();
-                    if (results.size() != 0) {
-                        for (Object result : results) {
-                            Status status = (Status) result;
-                            StatusResource statusResource =
-                                    (StatusResource) 
Utils.getResource(ResourceType.STATUS, status);
-                            resourceList.add(statusResource);
-                        }
-                    }
-                    break;
-                default:
-                    em.getTransaction().commit();
-                    em.close();
-                    logger.error("Unsupported resource type for workflow node 
details resource.", new UnsupportedOperationException());
-                    throw new UnsupportedOperationException();
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-        return resourceList;
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            DataTransferDetail existingDF = em.find(DataTransferDetail.class, 
transferId);
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            DataTransferDetail dataTransferDetail = new DataTransferDetail();
-            TaskDetail taskDetail = em.find(TaskDetail.class, 
taskDetailResource.getTaskId());
-            dataTransferDetail.setTransferId(transferId);
-            dataTransferDetail.setTask(taskDetail);
-            dataTransferDetail.setTaskId(taskDetailResource.getTaskId());
-            dataTransferDetail.setCreationTime(creationTime);
-            if (transferDescription != null) {
-                
dataTransferDetail.setTransferDesc(transferDescription.toCharArray());
-            }
-            if (existingDF != null) {
-                existingDF.setTransferId(transferId);
-                existingDF.setTask(taskDetail);
-                existingDF.setTaskId(taskDetailResource.getTaskId());
-                existingDF.setCreationTime(creationTime);
-                if (transferDescription != null) {
-                    
existingDF.setTransferDesc(transferDescription.toCharArray());
-                }
-                dataTransferDetail = em.merge(existingDF);
-            } else {
-                em.persist(dataTransferDetail);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-
-    public StatusResource getDataTransferStatus () throws RegistryException{
-        List<Resource> resources = get(ResourceType.STATUS);
-        for (Resource resource : resources) {
-            StatusResource dataTransferStatus = (StatusResource) resource;
-            
if(dataTransferStatus.getStatusType().equals(StatusType.DATA_TRANSFER.toString())){
-                if (dataTransferStatus.getState() == null || 
dataTransferStatus.getState().equals("") ){
-                    dataTransferStatus.setState("UNKNOWN");
-                }
-                return dataTransferStatus;
-            }
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
deleted file mode 100644
index 56a4e57..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ErrorDetailResource.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.ErrorDetail;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.TaskDetail;
-import org.apache.airavata.persistance.registry.jpa.model.WorkflowNodeDetail;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.sql.Timestamp;
-import java.util.List;
-
-public class ErrorDetailResource extends AbstractResource {
-    private static final Logger logger = 
LoggerFactory.getLogger(ErrorDetailResource.class);
-    private int errorId;
-    private ExperimentResource experimentResource;
-    private TaskDetailResource taskDetailResource;
-    private WorkflowNodeDetailResource nodeDetail;
-    private Timestamp creationTime;
-    private String actualErrorMsg;
-    private String userFriendlyErrorMsg;
-    private boolean transientPersistent;
-    private String errorCategory;
-    private String correctiveAction;
-    private String actionableGroup;
-    private String jobId;
-
-    public int getErrorId() {
-        return errorId;
-    }
-
-    public void setErrorId(int errorId) {
-        this.errorId = errorId;
-    }
-
-    public Timestamp getCreationTime() {
-        return creationTime;
-    }
-
-    public void setCreationTime(Timestamp creationTime) {
-        this.creationTime = creationTime;
-    }
-
-    public String getActualErrorMsg() {
-        return actualErrorMsg;
-    }
-
-    public void setActualErrorMsg(String actualErrorMsg) {
-        this.actualErrorMsg = actualErrorMsg;
-    }
-
-    public String getUserFriendlyErrorMsg() {
-        return userFriendlyErrorMsg;
-    }
-
-    public void setUserFriendlyErrorMsg(String userFriendlyErrorMsg) {
-        this.userFriendlyErrorMsg = userFriendlyErrorMsg;
-    }
-
-    public boolean isTransientPersistent() {
-        return transientPersistent;
-    }
-
-    public void setTransientPersistent(boolean transientPersistent) {
-        this.transientPersistent = transientPersistent;
-    }
-
-    public String getErrorCategory() {
-        return errorCategory;
-    }
-
-    public void setErrorCategory(String errorCategory) {
-        this.errorCategory = errorCategory;
-    }
-
-    public String getCorrectiveAction() {
-        return correctiveAction;
-    }
-
-    public void setCorrectiveAction(String correctiveAction) {
-        this.correctiveAction = correctiveAction;
-    }
-
-    public String getActionableGroup() {
-        return actionableGroup;
-    }
-
-    public void setActionableGroup(String actionableGroup) {
-        this.actionableGroup = actionableGroup;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public TaskDetailResource getTaskDetailResource() {
-        return taskDetailResource;
-    }
-
-    public void setTaskDetailResource(TaskDetailResource taskDetailResource) {
-        this.taskDetailResource = taskDetailResource;
-    }
-
-    public WorkflowNodeDetailResource getNodeDetail() {
-        return nodeDetail;
-    }
-
-    public void setNodeDetail(WorkflowNodeDetailResource nodeDetail) {
-        this.nodeDetail = nodeDetail;
-    }
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(String jobId) {
-        this.jobId = jobId;
-    }
-
-    
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for error details data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void remove(ResourceType type, Object name) throws 
RegistryException {
-        logger.error("Unsupported resource type for error details data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public Resource get(ResourceType type, Object name) throws 
RegistryException{
-        logger.error("Unsupported resource type for error details data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public List<Resource> get(ResourceType type) throws RegistryException{
-        logger.error("Unsupported resource type for error details data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            ErrorDetail errorDetail;
-            if (errorId != 0) {
-                errorDetail = em.find(ErrorDetail.class, errorId);
-                errorDetail.setErrorId(errorId);
-            } else {
-                errorDetail = new ErrorDetail();
-            }
-            errorDetail.setErrorId(errorId);
-            Experiment experiment = em.find(Experiment.class, 
experimentResource.getExpID());
-            errorDetail.setExperiment(experiment);
-            errorDetail.setExpId(experimentResource.getExpID());
-            if (taskDetailResource != null) {
-                TaskDetail taskDetail = em.find(TaskDetail.class, 
taskDetailResource.getTaskId());
-                errorDetail.setTask(taskDetail);
-                errorDetail.setTaskId(taskDetail.getTaskId());
-            }
-
-            if (nodeDetail != null) {
-                WorkflowNodeDetail workflowNodeDetail = 
em.find(WorkflowNodeDetail.class, nodeDetail.getNodeInstanceId());
-                errorDetail.setNodeDetails(workflowNodeDetail);
-                errorDetail.setNodeId(workflowNodeDetail.getNodeId());
-            }
-            errorDetail.setCreationTime(creationTime);
-            if (actualErrorMsg != null){
-                errorDetail.setActualErrorMsg(actualErrorMsg.toCharArray());
-            }
-
-            errorDetail.setUserFriendlyErrorMsg(userFriendlyErrorMsg);
-            errorDetail.setTransientPersistent(transientPersistent);
-            errorDetail.setErrorCategory(errorCategory);
-            errorDetail.setCorrectiveAction(correctiveAction);
-            errorDetail.setActionableGroup(actionableGroup);
-            errorDetail.setJobId(jobId);
-            em.persist(errorDetail);
-            errorId = errorDetail.getErrorId();
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
deleted file mode 100644
index 1466522..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentInputResource.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Input;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Input_PK;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ExperimentInputResource extends AbstractResource {
-    private static final Logger logger = 
LoggerFactory.getLogger(ExperimentInputResource.class);
-
-    private ExperimentResource experimentResource;
-    private String experimentKey;
-    private String value;
-    private String metadata;
-    private String dataType;
-    private String appArgument;
-    private boolean standardInput;
-    private String userFriendlyDesc;
-    private int inputOrder;
-    private boolean isRequired;
-    private boolean requiredToCMD;
-    private boolean dataStaged;
-
-    public boolean getRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean required) {
-        this.isRequired = required;
-    }
-
-    public boolean getRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean isDataStaged() {
-        return dataStaged;
-    }
-
-    public void setDataStaged(boolean dataStaged) {
-        this.dataStaged = dataStaged;
-    }
-
-    public int getInputOrder() {
-        return inputOrder;
-    }
-
-    public void setInputOrder(int inputOrder) {
-        this.inputOrder = inputOrder;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-    public boolean isStandardInput() {
-        return standardInput;
-    }
-
-    public void setStandardInput(boolean standardInput) {
-        this.standardInput = standardInput;
-    }
-
-    public String getUserFriendlyDesc() {
-        return userFriendlyDesc;
-    }
-
-    public void setUserFriendlyDesc(String userFriendlyDesc) {
-        this.userFriendlyDesc = userFriendlyDesc;
-    }
-
-    public String getExperimentKey() {
-        return experimentKey;
-    }
-
-    public void setExperimentKey(String experimentKey) {
-        this.experimentKey = experimentKey;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public String getMetadata() {
-        return metadata;
-    }
-
-    public void setMetadata(String metadata) {
-        this.metadata = metadata;
-    }
-
-    public Resource create(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void remove(ResourceType type, Object name) throws 
RegistryException{
-        logger.error("Unsupported resource type for experiment input data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public Resource get(ResourceType type, Object name) throws 
RegistryException {
-        logger.error("Unsupported resource type for experiment input data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment input data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void save() throws RegistryException{
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Experiment_Input existingInput = em.find(Experiment_Input.class, 
new Experiment_Input_PK(experimentResource.getExpID(), experimentKey));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Experiment_Input exInput = new Experiment_Input();
-            exInput.setEx_key(experimentKey);
-            Experiment experiment = em.find(Experiment.class, 
experimentResource.getExpID());
-            exInput.setExperiment(experiment);
-            exInput.setExperiment_id(experiment.getExpId());
-            if (value != null){
-                exInput.setValue(value.toCharArray());
-            }
-            exInput.setDataType(dataType);
-            exInput.setMetadata(metadata);
-            exInput.setAppArgument(appArgument);
-            exInput.setStandardInput(standardInput);
-            exInput.setUserFriendlyDesc(userFriendlyDesc);
-            exInput.setInputOrder(inputOrder);
-            exInput.setRequiredToCMD(requiredToCMD);
-            exInput.setRequired(isRequired);
-            exInput.setDataStaged(dataStaged);
-            if (existingInput != null) {
-                existingInput.setEx_key(experimentKey);
-                existingInput.setExperiment(experiment);
-                existingInput.setExperiment_id(experiment.getExpId());
-                if (value != null){
-                    existingInput.setValue(value.toCharArray());
-                }
-                existingInput.setDataType(dataType);
-                existingInput.setMetadata(metadata);
-                existingInput.setAppArgument(appArgument);
-                existingInput.setStandardInput(standardInput);
-                existingInput.setUserFriendlyDesc(userFriendlyDesc);
-                existingInput.setInputOrder(inputOrder);
-                existingInput.setRequiredToCMD(requiredToCMD);
-                existingInput.setRequired(isRequired);
-                existingInput.setDataStaged(dataStaged);
-                exInput = em.merge(existingInput);
-            } else {
-                em.persist(exInput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/801489bf/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
----------------------------------------------------------------------
diff --git 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
 
b/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
deleted file mode 100644
index 17bd23a..0000000
--- 
a/modules/registry/airavata-mongo-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentOutputResource.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-package org.apache.airavata.persistance.registry.jpa.resources;
-
-import org.apache.airavata.persistance.registry.jpa.Resource;
-import org.apache.airavata.persistance.registry.jpa.ResourceType;
-import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Output;
-import org.apache.airavata.persistance.registry.jpa.model.Experiment_Output_PK;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.persistence.EntityManager;
-import java.util.List;
-
-public class ExperimentOutputResource extends AbstractResource {
-    private static final Logger logger = 
LoggerFactory.getLogger(ExperimentOutputResource.class);
-
-    private ExperimentResource experimentResource;
-    private String experimentKey;
-    private String value;
-    private String dataType;
-    private boolean isRequired;
-    private boolean dataMovement;
-    private String dataNameLocation;
-    private boolean requiredToCMD;
-    private String searchQuery;
-    private String appArgument;
-
-    public String getSearchQuery() {
-        return searchQuery;
-    }
-
-    public void setSearchQuery(String searchQuery) {
-        this.searchQuery = searchQuery;
-    }
-
-    public String getAppArgument() {
-        return appArgument;
-    }
-
-    public void setAppArgument(String appArgument) {
-        this.appArgument = appArgument;
-    }
-
-
-    public boolean getRequiredToCMD() {
-        return requiredToCMD;
-    }
-
-    public void setRequiredToCMD(boolean requiredToCMD) {
-        this.requiredToCMD = requiredToCMD;
-    }
-
-    public boolean getRequired() {
-        return isRequired;
-    }
-
-    public void setRequired(boolean required) {
-        this.isRequired = required;
-    }
-
-    public boolean isDataMovement() {
-        return dataMovement;
-    }
-
-    public void setDataMovement(boolean dataMovement) {
-        this.dataMovement = dataMovement;
-    }
-
-    public String getDataNameLocation() {
-        return dataNameLocation;
-    }
-
-    public void setDataNameLocation(String dataNameLocation) {
-        this.dataNameLocation = dataNameLocation;
-    }
-
-    public String getExperimentKey() {
-        return experimentKey;
-    }
-
-    public void setExperimentKey(String experimentKey) {
-        this.experimentKey = experimentKey;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public ExperimentResource getExperimentResource() {
-        return experimentResource;
-    }
-
-    public void setExperimentResource(ExperimentResource experimentResource) {
-        this.experimentResource = experimentResource;
-    }
-
-    public String getDataType() {
-        return dataType;
-    }
-
-    public void setDataType(String dataType) {
-        this.dataType = dataType;
-    }
-
-    public Resource create(ResourceType type)  throws RegistryException {
-        logger.error("Unsupported resource type for experiment output data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void remove(ResourceType type, Object name)  throws 
RegistryException{
-        logger.error("Unsupported resource type for experiment output data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public Resource get(ResourceType type, Object name)  throws 
RegistryException{
-        logger.error("Unsupported resource type for experiment output data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public List<Resource> get(ResourceType type) throws RegistryException {
-        logger.error("Unsupported resource type for experiment output data 
resource.", new UnsupportedOperationException());
-        throw new UnsupportedOperationException();
-    }
-
-    public void save() throws RegistryException {
-        EntityManager em = null;
-        try {
-            em = ResourceUtils.getEntityManager();
-            Experiment_Output existingOutput = 
em.find(Experiment_Output.class, new 
Experiment_Output_PK(experimentResource.getExpID(), experimentKey));
-            em.close();
-
-            em = ResourceUtils.getEntityManager();
-            em.getTransaction().begin();
-            Experiment_Output exOutput = new Experiment_Output();
-            exOutput.setEx_key(experimentKey);
-            Experiment experiment = em.find(Experiment.class, 
experimentResource.getExpID());
-            exOutput.setExperiment(experiment);
-            exOutput.setExperiment_id(experiment.getExpId());
-            if (value != null){
-                exOutput.setValue(value.toCharArray());
-            }
-            exOutput.setDataType(dataType);
-            exOutput.setRequired(isRequired);
-            exOutput.setRequiredToCMD(requiredToCMD);
-            exOutput.setDataMovement(dataMovement);
-            exOutput.setDataNameLocation(dataNameLocation);
-            exOutput.setApplicationArgument(appArgument);
-            exOutput.setSearchQuery(searchQuery);
-
-            if (existingOutput != null) {
-                existingOutput.setEx_key(experimentKey);
-                existingOutput.setExperiment(experiment);
-                if (value != null){
-                    existingOutput.setValue(value.toCharArray());
-                }
-                existingOutput.setExperiment_id(experiment.getExpId());
-                existingOutput.setDataType(dataType);
-                existingOutput.setRequired(isRequired);
-                existingOutput.setRequiredToCMD(requiredToCMD);
-                existingOutput.setDataMovement(dataMovement);
-                existingOutput.setDataNameLocation(dataNameLocation);
-                existingOutput.setApplicationArgument(appArgument);
-                existingOutput.setSearchQuery(searchQuery);
-                exOutput = em.merge(existingOutput);
-            } else {
-                em.persist(exOutput);
-            }
-            em.getTransaction().commit();
-            em.close();
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-            throw new RegistryException(e);
-        } finally {
-            if (em != null && em.isOpen()) {
-                if (em.getTransaction().isActive()){
-                    em.getTransaction().rollback();
-                }
-                em.close();
-            }
-        }
-    }
-}

Reply via email to