Package org.apache.aiaravata.application.catalog.data.util

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


      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(JOB_SUBMISSION_INTERFACE);
      Query q;
      if ((fieldName.equals(JobSubmissionInterfaceConstants.JOB_SUBMISSION_INTERFACE_ID)) || (fieldName.equals(JobSubmissionInterfaceConstants.COMPUTE_RESOURCE_ID)) || (fieldName.equals(JobSubmissionInterfaceConstants.JOB_SUBMISSION_PROTOCOL)) || (fieldName.equals(JobSubmissionInterfaceConstants.PRIORITY_ORDER))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          JobSubmissionInterface jobSubmissionInterface = (JobSubmissionInterface) result;
          JobSubmissionInterfaceResource jobSubmissionInterfaceResource = (JobSubmissionInterfaceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.JOB_SUBMISSION_INTERFACE, jobSubmissionInterface);
          jobSubmissionInterfaceResourceIDs.add(jobSubmissionInterfaceResource.getComputeResourceId());
View Full Code Here


            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(LIBRARY_APEND_PATH);
            generator.setParameter(LibraryApendPathConstants.DEPLOYMENT_ID, ids.get(LibraryApendPathConstants.DEPLOYMENT_ID));
            generator.setParameter(LibraryApendPathConstants.NAME, ids.get(LibraryApendPathConstants.NAME));
            Query q = generator.selectQuery(em);
            LibraryApendPath libraryApendPath = (LibraryApendPath) q.getSingleResult();
            LibraryApendPathResource resource =
                    (LibraryApendPathResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.LIBRARY_APEND_PATH, libraryApendPath);
            em.getTransaction().commit();
            em.close();
View Full Code Here

            Query q;
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(LIBRARY_APEND_PATH);
            List results;
            if (fieldName.equals(LibraryApendPathConstants.DEPLOYMENT_ID)) {
                generator.setParameter(LibraryApendPathConstants.DEPLOYMENT_ID, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        LibraryApendPath prepandPath = (LibraryApendPath) result;
                        LibraryApendPathResource resource =
View Full Code Here

                        libApPathList.add(resource);
                    }
                }
            } else if (fieldName.equals(LibraryApendPathConstants.NAME)) {
                generator.setParameter(LibraryApendPathConstants.NAME, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        LibraryApendPath prepandPath = (LibraryApendPath) result;
                        LibraryApendPathResource resource =
View Full Code Here

    try {
      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(RESOURCE_JOB_MANAGER);
      generator.setParameter(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_ID, identifier);
      Query q = generator.selectQuery(em);
      ResourceJobManager resourceJobManager = (ResourceJobManager) q.getSingleResult();
      ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
      em.getTransaction().commit();
      em.close();
      return resourceJobManagerResource;
View Full Code Here

      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(RESOURCE_JOB_MANAGER);
      Query q;
      if ((fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_ID)) || (fieldName.equals(ResourceJobManagerConstants.PUSH_MONITORING_ENDPOINT)) || (fieldName.equals(ResourceJobManagerConstants.JOB_MANAGER_BIN_PATH)) || (fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_TYPE))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          ResourceJobManager resourceJobManager = (ResourceJobManager) result;
          ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
          resourceJobManagerResources.add(resourceJobManagerResource);
View Full Code Here

      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(RESOURCE_JOB_MANAGER);
      Query q;
      if ((fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_ID)) || (fieldName.equals(ResourceJobManagerConstants.PUSH_MONITORING_ENDPOINT)) || (fieldName.equals(ResourceJobManagerConstants.JOB_MANAGER_BIN_PATH)) || (fieldName.equals(ResourceJobManagerConstants.RESOURCE_JOB_MANAGER_TYPE))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          ResourceJobManager resourceJobManager = (ResourceJobManager) result;
          ResourceJobManagerResource resourceJobManagerResource = (ResourceJobManagerResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.RESOURCE_JOB_MANAGER, resourceJobManager);
          resourceJobManagerResourceIDs.add(resourceJobManagerResource.getResourceJobManagerId());
View Full Code Here

    try {
      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(COMPUTE_RESOURCE);
      generator.setParameter(ComputeResourceConstants.RESOURCE_ID, identifier);
      Query q = generator.selectQuery(em);
      ComputeResource computeResource = (ComputeResource) q.getSingleResult();
      ComputeResourceResource computeResourceResource = (ComputeResourceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.COMPUTE_RESOURCE, computeResource);
      em.getTransaction().commit();
      em.close();
      return computeResourceResource;
View Full Code Here

      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(COMPUTE_RESOURCE);
      Query q;
      if ((fieldName.equals(ComputeResourceConstants.RESOURCE_DESCRIPTION)) || (fieldName.equals(ComputeResourceConstants.RESOURCE_ID)) || (fieldName.equals(ComputeResourceConstants.HOST_NAME))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          ComputeResource computeResource = (ComputeResource) result;
          ComputeResourceResource computeResourceResource = (ComputeResourceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.COMPUTE_RESOURCE, computeResource);
          computeResourceResources.add(computeResourceResource);
View Full Code Here

        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(COMPUTE_RESOURCE);
            Query q = generator.selectQuery(em);
            List<?> results = q.getResultList();
            for (Object result : results) {
                ComputeResource computeResource = (ComputeResource) result;
                ComputeResourceResource computeResourceResource = (ComputeResourceResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.COMPUTE_RESOURCE, computeResource);
                computeResourceResources.add(computeResourceResource);
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.