Examples of selectQuery()


Examples of org.apache.aiaravata.application.catalog.data.util.AppCatalogQueryGenerator.selectQuery()

      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(DATA_MOVEMENT_INTERFACE);
      generator.setParameter(DataMovementInterfaceConstants.COMPUTE_RESOURCE_ID, ids.get(DataMovementInterfaceConstants.COMPUTE_RESOURCE_ID));
      generator.setParameter(DataMovementInterfaceConstants.DATA_MOVEMENT_INTERFACE_ID, ids.get(DataMovementInterfaceConstants.DATA_MOVEMENT_INTERFACE_ID));
      Query q = generator.selectQuery(em);
      DataMovementInterface dataMovementInterface = (DataMovementInterface) q.getSingleResult();
      DataMovementInterfaceResource dataMovementInterfaceResource = (DataMovementInterfaceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.DATA_MOVEMENT_INTERFACE, dataMovementInterface);
      em.getTransaction().commit();
      em.close();
      return dataMovementInterfaceResource;
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

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

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

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

                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

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

        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 =
View Full Code Here

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

                }
                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 =
View Full Code Here

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

                }
                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 =
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.