Package org.apache.airavata.persistance.registry.jpa.utils

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator


        EntityManager em = null;
        try {
            if (type == ResourceType.EXPERIMENT) {
                em = ResourceUtils.getEntityManager();
                em.getTransaction().begin();
                QueryGenerator generator = new QueryGenerator(EXPERIMENT);
                generator.setParameter(ExperimentConstants.PROJECT_ID, id);
                Query q = generator.selectQuery(em);
                List<?> results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        Experiment experiment = (Experiment) result;
                        ExperimentResource experimentResource = (ExperimentResource)
                                Utils.getResource(ResourceType.EXPERIMENT, experiment);
                        resourceList.add(experimentResource);
                    }
                }
                em.getTransaction().commit();
                em.close();
            } else if (type == ResourceType.PROJECT_USER) {
                em = ResourceUtils.getEntityManager();
                em.getTransaction().begin();
                QueryGenerator generator = new QueryGenerator(PROJECT_USER);
                generator.setParameter(ProjectUserConstants.PROJECT_ID, id);
                Query q = generator.selectQuery(em);
                List<?> results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        ProjectUser projectUser = (ProjectUser) result;
                        ProjectUserResource pr = (ProjectUserResource)
View Full Code Here


        EntityManager em = null;
        try {
            if (type == ResourceType.APPLICATION_DESCRIPTOR) {
                em = ResourceUtils.getEntityManager();
                em.getTransaction().begin();
                QueryGenerator generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
                generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
                generator.setParameter(ApplicationDescriptorConstants.HOST_DESC_ID, getHostDescName());
                Query q = generator.selectQuery(em);
                List results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        Application_Descriptor applicationDescriptor = (Application_Descriptor) result;
                        ApplicationDescriptorResource applicationDescriptorResource =
View Full Code Here

        EntityManager em = null;
        try {
            em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
            Query q;
            QueryGenerator generator;
            switch (type) {
                case USER:
                    generator = new QueryGenerator(USERS);
                    generator.setParameter(UserConstants.USERNAME, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case PUBLISHED_WORKFLOW:
                    generator = new QueryGenerator(PUBLISHED_WORKFLOW);
                    generator.setParameter(PublishedWorkflowConstants.PUBLISH_WORKFLOW_NAME, name);
                    generator.setParameter(PublishedWorkflowConstants.GATEWAY_NAME, gatewayName);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case HOST_DESCRIPTOR:
                    generator = new QueryGenerator(HOST_DESCRIPTOR);
                    generator.setParameter(HostDescriptorConstants.HOST_DESC_ID, name);
                    generator.setParameter(HostDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case SERVICE_DESCRIPTOR:
                    generator = new QueryGenerator(SERVICE_DESCRIPTOR);
                    generator.setParameter(ServiceDescriptorConstants.SERVICE_DESC_ID, name);
                    generator.setParameter(ServiceDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case EXPERIMENT:
                    generator = new QueryGenerator(EXPERIMENT);
                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case APPLICATION_DESCRIPTOR:
                    generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
                    generator.setParameter(ApplicationDescriptorConstants.APPLICATION_DESC_ID, name);
                    generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                default:
                    logger.error("Unsupported resource type for gateway resource.", new IllegalArgumentException());
                    break;
View Full Code Here

    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 GATEWAY_WORKER:
                    generator = new QueryGenerator(GATEWAY_WORKER);
                    generator.setParameter(GatewayWorkerConstants.USERNAME, name);
                    generator.setParameter(GatewayWorkerConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    Gateway_Worker worker = (Gateway_Worker) q.getSingleResult();
                    WorkerResource workerResource =
                            (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, worker);
                    em.getTransaction().commit();
                    em.close();
                    return workerResource;
                case USER:
                    generator = new QueryGenerator(USERS);
                    generator.setParameter(UserConstants.USERNAME, name);
                    q = generator.selectQuery(em);
                    Users user = (Users) q.getSingleResult();
                    UserResource userResource =
                            (UserResource) Utils.getResource(ResourceType.USER, user);
                    em.getTransaction().commit();
                    em.close();
                    return userResource;
                case PUBLISHED_WORKFLOW:
                    generator = new QueryGenerator(PUBLISHED_WORKFLOW);
                    generator.setParameter(PublishedWorkflowConstants.PUBLISH_WORKFLOW_NAME, name);
                    generator.setParameter(PublishedWorkflowConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    Published_Workflow ePub_workflow = (Published_Workflow) q.getSingleResult();
                    PublishWorkflowResource publishWorkflowResource =
                            (PublishWorkflowResource) Utils.getResource(ResourceType.PUBLISHED_WORKFLOW, ePub_workflow);
                    em.getTransaction().commit();
                    em.close();
                    return publishWorkflowResource;
                case HOST_DESCRIPTOR:
                    generator = new QueryGenerator(HOST_DESCRIPTOR);
                    generator.setParameter(HostDescriptorConstants.HOST_DESC_ID, name);
                    generator.setParameter(HostDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    Host_Descriptor eHostDesc = (Host_Descriptor) q.getSingleResult();
                    HostDescriptorResource hostDescriptorResource =
                            (HostDescriptorResource) Utils.getResource(ResourceType.HOST_DESCRIPTOR, eHostDesc);
                    em.getTransaction().commit();
                    em.close();
                    return hostDescriptorResource;
                case EXPERIMENT:
                    generator = new QueryGenerator(EXPERIMENT);
                    generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
                    q = generator.selectQuery(em);
                    Experiment experiment = (Experiment) q.getSingleResult();
                    ExperimentResource experimentResource =
                            (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
                    em.getTransaction().commit();
                    em.close();
                    return experimentResource;
                case SERVICE_DESCRIPTOR:
                    generator = new QueryGenerator(SERVICE_DESCRIPTOR);
                    generator.setParameter(ServiceDescriptorConstants.SERVICE_DESC_ID, name);
                    generator.setParameter(ServiceDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    Service_Descriptor eServiceDesc = (Service_Descriptor) q.getSingleResult();
                    ServiceDescriptorResource serviceDescriptorResource =
                            (ServiceDescriptorResource) Utils.getResource(ResourceType.SERVICE_DESCRIPTOR, eServiceDesc);
                    em.getTransaction().commit();
                    em.close();
                    return serviceDescriptorResource;
                case APPLICATION_DESCRIPTOR:
                    generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
                    generator.setParameter(ApplicationDescriptorConstants.APPLICATION_DESC_ID, name);
                    generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    Application_Descriptor eAppDesc = (Application_Descriptor) q.getSingleResult();
                    ApplicationDescriptorResource applicationDescriptorResource =
                            (ApplicationDescriptorResource) Utils.getResource(ResourceType.APPLICATION_DESCRIPTOR, eAppDesc);
                    em.getTransaction().commit();
                    em.close();
View Full Code Here

        EntityManager em = null;
        try {
            em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
            Query q;
            QueryGenerator generator;
            List results;
            switch (type) {
                case PROJECT:
                    generator = new QueryGenerator(PROJECT);
                    Gateway gatewayModel = em.find(Gateway.class, gatewayName);
                    generator.setParameter("gateway", gatewayModel);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Project project = (Project) result;
                            ProjectResource projectResource =
                                    (ProjectResource) Utils.getResource(ResourceType.PROJECT, project);
                            resourceList.add(projectResource);
                        }
                    }
                    break;
                case GATEWAY_WORKER:
                    generator = new QueryGenerator(GATEWAY_WORKER);
                    generator.setParameter(GatewayWorkerConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Gateway_Worker gatewayWorker = (Gateway_Worker) result;
                            WorkerResource workerResource =
                                    (WorkerResource) Utils.getResource(ResourceType.GATEWAY_WORKER, gatewayWorker);
                            resourceList.add(workerResource);
                        }
                    }
                    break;
                case PUBLISHED_WORKFLOW:
                    generator = new QueryGenerator(PUBLISHED_WORKFLOW);
                    generator.setParameter(PublishedWorkflowConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Published_Workflow publishedWorkflow = (Published_Workflow) result;
                            PublishWorkflowResource publishWorkflowResource =
                                    (PublishWorkflowResource) Utils.getResource(ResourceType.PUBLISHED_WORKFLOW, publishedWorkflow);
                            resourceList.add(publishWorkflowResource);
                        }
                    }
                    break;
                case HOST_DESCRIPTOR:
                    generator = new QueryGenerator(HOST_DESCRIPTOR);
                    generator.setParameter(HostDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Host_Descriptor hostDescriptor = (Host_Descriptor) result;
                            HostDescriptorResource hostDescriptorResource =
                                    (HostDescriptorResource) Utils.getResource(ResourceType.HOST_DESCRIPTOR, hostDescriptor);
                            resourceList.add(hostDescriptorResource);
                        }
                    }
                    break;
                case SERVICE_DESCRIPTOR:
                    generator = new QueryGenerator(SERVICE_DESCRIPTOR);
                    generator.setParameter(ServiceDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Service_Descriptor serviceDescriptor = (Service_Descriptor) result;
                            ServiceDescriptorResource serviceDescriptorResource =
                                    (ServiceDescriptorResource) Utils.getResource(ResourceType.SERVICE_DESCRIPTOR, serviceDescriptor);
                            resourceList.add(serviceDescriptorResource);
                        }
                    }
                    break;
                case APPLICATION_DESCRIPTOR:
                    generator = new QueryGenerator(APPLICATION_DESCRIPTOR);
                    generator.setParameter(ApplicationDescriptorConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Application_Descriptor applicationDescriptor = (Application_Descriptor) result;
                            ApplicationDescriptorResource applicationDescriptorResource =
                                    (ApplicationDescriptorResource) Utils.getResource(ResourceType.APPLICATION_DESCRIPTOR, applicationDescriptor);
                            resourceList.add(applicationDescriptorResource);
                        }
                    }
                    break;
                case EXPERIMENT:
                    generator = new QueryGenerator(EXPERIMENT);
                    generator.setParameter(ExperimentConstants.GATEWAY_NAME, gatewayName);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Experiment experiment = (Experiment) result;
                            ExperimentResource experimentResource =
                                    (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);
                            resourceList.add(experimentResource);
                        }
                    }
                    break;
                case USER:
                    generator = new QueryGenerator(USERS);
                    q = generator.selectQuery(em);
                    for (Object o : q.getResultList()) {
                        Users user = (Users) o;
                        UserResource userResource =
                                (UserResource) Utils.getResource(ResourceType.USER, user);
                        resourceList.add(userResource);
View Full Code Here

        EntityManager em = null;
        try {
            em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
            Query q;
            QueryGenerator generator;
            switch (type) {
                case TASK_DETAIL:
                    generator = new QueryGenerator(TASK_DETAIL);
                    generator.setParameter(TaskDetailConstants.TASK_ID, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case ERROR_DETAIL:
                    generator = new QueryGenerator(ERROR_DETAIL);
                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case NODE_INPUT:
                    generator = new QueryGenerator(NODE_INPUT);
                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case NODE_OUTPUT:
                    generator = new QueryGenerator(NODE_OUTPUT);
                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                case STATUS:
                    generator = new QueryGenerator(STATUS);
                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, name);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                default:
                    logger.error("Unsupported resource type for experiment resource.", new IllegalArgumentException());
                    break;
View Full Code Here

        EntityManager em = null;
        try {
            em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
            Query q;
            QueryGenerator generator;
            List results;
            switch (type) {
                case EXPERIMENT_INPUT:
                    generator = new QueryGenerator(EXPERIMENT_INPUT);
                    generator.setParameter(ExperimentInputConstants.EXPERIMENT_ID, expID);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Experiment_Input exInput = (Experiment_Input) result;
                            ExperimentInputResource inputResource =
                                    (ExperimentInputResource) Utils.getResource(ResourceType.EXPERIMENT_INPUT, exInput);
                            resourceList.add(inputResource);
                        }
                    }
                    break;
                case EXPERIMENT_OUTPUT:
                    generator = new QueryGenerator(EXPERIMENT_OUTPUT);
                    generator.setParameter(ExperimentOutputConstants.EXPERIMENT_ID, expID);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Experiment_Output output = (Experiment_Output) result;
                            ExperimentOutputResource outputResource =
                                    (ExperimentOutputResource) Utils.getResource(ResourceType.EXPERIMENT_OUTPUT, output);
                            resourceList.add(outputResource);
                        }
                    }
                    break;
                case WORKFLOW_NODE_DETAIL:
                    generator = new QueryGenerator(WORKFLOW_NODE_DETAIL);
                    generator.setParameter(WorkflowNodeDetailsConstants.EXPERIMENT_ID, expID);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            WorkflowNodeDetail nodeDetail = (WorkflowNodeDetail) result;
                            WorkflowNodeDetailResource nodeDetailResource =
                                    (WorkflowNodeDetailResource) Utils.getResource(ResourceType.WORKFLOW_NODE_DETAIL, nodeDetail);
                            resourceList.add(nodeDetailResource);
                        }
                    }
                    break;
                case ERROR_DETAIL:
                    generator = new QueryGenerator(ERROR_DETAIL);
                    generator.setParameter(ErrorDetailConstants.EXPERIMENT_ID, expID);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            ErrorDetail errorDetail = (ErrorDetail) result;
                            ErrorDetailResource errorDetailResource =
                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
                            resourceList.add(errorDetailResource);
                        }
                    }
                    break;
                case STATUS:
                    generator = new QueryGenerator(STATUS);
                    generator.setParameter(StatusConstants.EXPERIMENT_ID, expID);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Status status = (Status) result;
                            StatusResource statusResource =
View Full Code Here

    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 TASK_DETAIL:
                    generator = new QueryGenerator(TASK_DETAIL);
                    generator.setParameter(TaskDetailConstants.TASK_ID, name);
                    q = generator.selectQuery(em);
                    TaskDetail taskDetail = (TaskDetail) q.getSingleResult();
                    TaskDetailResource taskDetailResource = (TaskDetailResource) Utils.getResource(ResourceType.TASK_DETAIL, taskDetail);
                    em.getTransaction().commit();
                    em.close();
                    return taskDetailResource;
                case ERROR_DETAIL:
                    generator = new QueryGenerator(ERROR_DETAIL);
                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, name);
                    q = generator.selectQuery(em);
                    ErrorDetail errorDetail = (ErrorDetail) q.getSingleResult();
                    ErrorDetailResource errorDetailResource = (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
                    em.getTransaction().commit();
                    em.close();
                    return errorDetailResource;
                case NODE_INPUT:
                    generator = new QueryGenerator(NODE_INPUT);
                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, name);
                    q = generator.selectQuery(em);
                    NodeInput nodeInput = (NodeInput) q.getSingleResult();
                    NodeInputResource nodeInputResource = (NodeInputResource) Utils.getResource(ResourceType.NODE_INPUT, nodeInput);
                    em.getTransaction().commit();
                    em.close();
                    return nodeInputResource;
                case NODE_OUTPUT:
                    generator = new QueryGenerator(NODE_OUTPUT);
                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, name);
                    q = generator.selectQuery(em);
                    NodeOutput nodeOutput = (NodeOutput) q.getSingleResult();
                    NodeOutputResource nodeOutputResource = (NodeOutputResource) Utils.getResource(ResourceType.NODE_OUTPUT, nodeOutput);
                    em.getTransaction().commit();
                    em.close();
                    return nodeOutputResource;
                case STATUS:
                    generator = new QueryGenerator(STATUS);
                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, name);
                    q = generator.selectQuery(em);
                    Status status = (Status) q.getSingleResult();
                    StatusResource statusResource = (StatusResource) Utils.getResource(ResourceType.STATUS, status);
                    em.getTransaction().commit();
                    em.close();
                    return statusResource;
View Full Code Here

        EntityManager em = null;
        try {
            em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
            Query q;
            QueryGenerator generator;
            List results;
            switch (type) {
                case TASK_DETAIL:
                    generator = new QueryGenerator(TASK_DETAIL);
                    generator.setParameter(TaskDetailConstants.NODE_INSTANCE_ID, nodeInstanceId);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            TaskDetail taskDetail = (TaskDetail) result;
                            TaskDetailResource taskDetailResource =
                                    (TaskDetailResource) Utils.getResource(ResourceType.TASK_DETAIL, taskDetail);
                            resourceList.add(taskDetailResource);
                        }
                    }
                    break;
                case ERROR_DETAIL:
                    generator = new QueryGenerator(ERROR_DETAIL);
                    generator.setParameter(ErrorDetailConstants.NODE_INSTANCE_ID, nodeInstanceId);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            ErrorDetail errorDetail = (ErrorDetail) result;
                            ErrorDetailResource errorDetailResource =
                                    (ErrorDetailResource) Utils.getResource(ResourceType.ERROR_DETAIL, errorDetail);
                            resourceList.add(errorDetailResource);
                        }
                    }
                    break;
                case NODE_INPUT:
                    generator = new QueryGenerator(NODE_INPUT);
                    generator.setParameter(NodeInputConstants.NODE_INSTANCE_ID, nodeInstanceId);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            NodeInput nodeInput = (NodeInput) result;
                            NodeInputResource nodeInputResource =
                                    (NodeInputResource) Utils.getResource(ResourceType.NODE_INPUT, nodeInput);
                            resourceList.add(nodeInputResource);
                        }
                    }
                    break;
                case NODE_OUTPUT:
                    generator = new QueryGenerator(NODE_OUTPUT);
                    generator.setParameter(NodeOutputConstants.NODE_INSTANCE_ID, nodeInstanceId);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            NodeOutput nodeOutput = (NodeOutput) result;
                            NodeOutputResource nodeOutputResource =
                                    (NodeOutputResource) Utils.getResource(ResourceType.NODE_OUTPUT, nodeOutput);
                            resourceList.add(nodeOutputResource);
                        }
                    }
                    break;
                case STATUS:
                    generator = new QueryGenerator(STATUS);
                    generator.setParameter(StatusConstants.NODE_INSTANCE_ID, nodeInstanceId);
                    q = generator.selectQuery(em);
                    results = q.getResultList();
                    if (results.size() != 0) {
                        for (Object result : results) {
                            Status status = (Status) result;
                            StatusResource statusResource =
View Full Code Here

        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);
                    q = generator.deleteQuery(em);
                    q.executeUpdate();
                    break;
                default:
                    logger.error("Unsupported resource type for data transfer details resource.", new IllegalArgumentException());
                    break;
View Full Code Here

TOP

Related Classes of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.