Examples of selectQuery()


Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

      case USER_WORKFLOW:
                generator = new QueryGenerator(USER_WORKFLOW);
                generator.setParameter(UserWorkflowConstants.OWNER, getUser());
                generator.setParameter(UserWorkflowConstants.TEMPLATE_NAME, name);
                generator.setParameter(UserWorkflowConstants.GATEWAY_NAME, gateway.getGatewayName());
                q = generator.selectQuery(em);
              User_Workflow userWorkflow = (User_Workflow) q.getSingleResult();
                result= Utils.getResource(ResourceType.USER_WORKFLOW, userWorkflow);
              break;
      case EXPERIMENT:
                generator = new QueryGenerator(EXPERIMENT);
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

              break;
      case EXPERIMENT:
                generator = new QueryGenerator(EXPERIMENT);
                generator.setParameter(ExperimentConstants.USERNAME, getUser());
                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
                q = generator.selectQuery(em);
              Experiment experiment = (Experiment) q.getSingleResult();
                result= Utils.getResource(ResourceType.EXPERIMENT, experiment);
        break;
      case WORKFLOW_DATA:
                generator = new QueryGenerator(WORKFLOW_DATA);
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

                result= Utils.getResource(ResourceType.EXPERIMENT, experiment);
        break;
      case WORKFLOW_DATA:
                generator = new QueryGenerator(WORKFLOW_DATA);
                generator.setParameter(WorkflowDataConstants.WORKFLOW_INSTANCE_ID, name);
                q = generator.selectQuery(em);
                Workflow_Data eworkflowData = (Workflow_Data)q.getSingleResult();
                WorkflowDataResource workflowDataResource = (WorkflowDataResource)Utils.getResource(ResourceType.WORKFLOW_DATA, eworkflowData);
                result= workflowDataResource;
                break;
      default:
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

                Gateway gatewayModel = em.find(Gateway.class, gateway.getGatewayName());
                generator.setParameter("users", users);
                generator.setParameter("gateway", gatewayModel);
//                generator.setParameter(ProjectConstants.USERNAME, getUser());
//                generator.setParameter(ProjectConstants.GATEWAY_NAME, gateway.getGatewayName());
                q = generator.selectQuery(em);
              for (Object o : q.getResultList()) {
                Project project = (Project) o;
                ProjectResource projectResource = (ProjectResource)Utils.getResource(ResourceType.PROJECT, project);
                result.add(projectResource);
        }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

        }
        break;
      case USER_WORKFLOW:
                generator = new QueryGenerator(USER_WORKFLOW);
                generator.setParameter(UserWorkflowConstants.OWNER, getUser());
                q = generator.selectQuery(em);
//              q.setParameter("usr_name", getUser());
              for (Object o : q.getResultList()) {
                User_Workflow userWorkflow = (User_Workflow) o;
                UserWorkflowResource userWorkflowResource = (UserWorkflowResource)Utils.getResource(ResourceType.USER_WORKFLOW, userWorkflow);
                result.add(userWorkflowResource);
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

              break;
      case EXPERIMENT:
                generator = new QueryGenerator(EXPERIMENT);
                generator.setParameter(ExperimentConstants.USERNAME, getUser());
                generator.setParameter(ExperimentConstants.GATEWAY_NAME, gateway.getGatewayName());
                q = generator.selectQuery(em);
              for (Object o : q.getResultList()) {
                Experiment experiment = (Experiment) o;
                ExperimentResource experimentResource = (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
                result.add(experimentResource);
              }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

        switch (type) {
            case USER:
                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();
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

                return workerResource;
            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();
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

                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();
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.utils.QueryGenerator.selectQuery()

                return hostDescriptorResource;
            case EXPERIMENT:
                generator = new QueryGenerator(EXPERIMENT);
                generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
                generator.setParameter(ExperimentConstants.GATEWAY_NAME, gatewayName);
                q = generator.selectQuery(em);
                Experiment experiment = (Experiment)q.getSingleResult();
                ExperimentResource experimentResource =
                        (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
                em.getTransaction().commit();
                em.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.