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

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


            Query q;
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GSISSH_PREJOBCOMMAND);
            List results;
            if (fieldName.equals(GSISSHPreJobCommandConstants.SUBMISSION_ID)) {
                generator.setParameter(GSISSHPreJobCommandConstants.SUBMISSION_ID, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHPreJobCommand gsisshPreJobCommand = (GSISSHPreJobCommand) result;
                        gsiSSHPreJobResourceIDs.add(gsisshPreJobCommand.getSubmissionID());
View Full Code Here


                        gsiSSHPreJobResourceIDs.add(gsisshPreJobCommand.getSubmissionID());
                    }
                }
            } else if (fieldName.equals(GSISSHPreJobCommandConstants.COMMAND)) {
                generator.setParameter(GSISSHPreJobCommandConstants.COMMAND, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHPreJobCommand gsisshPreJobCommand = (GSISSHPreJobCommand) result;
                        gsiSSHPreJobResourceIDs.add(gsisshPreJobCommand.getSubmissionID());
View Full Code Here

      em = AppCatalogJPAUtils.getEntityManager();
      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
      generator.setParameter(BatchQueueConstants.COMPUTE_RESOURCE_ID, ids.get(BatchQueueConstants.COMPUTE_RESOURCE_ID));
      generator.setParameter(BatchQueueConstants.QUEUE_NAME, ids.get(BatchQueueConstants.QUEUE_NAME));
      Query q = generator.selectQuery(em);
      BatchQueue batchQueue = (BatchQueue) q.getSingleResult();
      BatchQueueResource batchQueueResource = (BatchQueueResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.BATCH_QUEUE, batchQueue);
      em.getTransaction().commit();
      em.close();
      return batchQueueResource;
View Full Code Here

      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
      Query q;
      if ((fieldName.equals(BatchQueueConstants.COMPUTE_RESOURCE_ID)) || (fieldName.equals(BatchQueueConstants.MAX_RUNTIME)) || (fieldName.equals(BatchQueueConstants.MAX_JOB_IN_QUEUE)) || (fieldName.equals(BatchQueueConstants.QUEUE_DESCRIPTION)) || (fieldName.equals(BatchQueueConstants.QUEUE_NAME)) || (fieldName.equals(BatchQueueConstants.MAX_PROCESSORS)) || (fieldName.equals(BatchQueueConstants.MAX_NODES))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          BatchQueue batchQueue = (BatchQueue) result;
          BatchQueueResource batchQueueResource = (BatchQueueResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.BATCH_QUEUE, batchQueue);
          batchQueueResources.add(batchQueueResource);
View Full Code Here

      em.getTransaction().begin();
      AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(BATCH_QUEUE);
      Query q;
      if ((fieldName.equals(BatchQueueConstants.COMPUTE_RESOURCE_ID)) || (fieldName.equals(BatchQueueConstants.MAX_RUNTIME)) || (fieldName.equals(BatchQueueConstants.MAX_JOB_IN_QUEUE)) || (fieldName.equals(BatchQueueConstants.QUEUE_DESCRIPTION)) || (fieldName.equals(BatchQueueConstants.QUEUE_NAME)) || (fieldName.equals(BatchQueueConstants.MAX_PROCESSORS)) || (fieldName.equals(BatchQueueConstants.MAX_NODES))) {
        generator.setParameter(fieldName, value);
        q = generator.selectQuery(em);
        List<?> results = q.getResultList();
        for (Object result : results) {
          BatchQueue batchQueue = (BatchQueue) result;
          BatchQueueResource batchQueueResource = (BatchQueueResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.BATCH_QUEUE, batchQueue);
          batchQueueResourceIDs.add(batchQueueResource.getComputeResourceId());
View Full Code Here

        try {
            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GLOBUS_SUBMISSION);
            generator.setParameter(GlobusJobSubmissionConstants.SUBMISSION_ID, identifier);
            Query q = generator.selectQuery(em);
            GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) q.getSingleResult();
            GlobusJobSubmissionResource globusJobSubmissionResource =
                    (GlobusJobSubmissionResource) AppCatalogJPAUtils.getResource(
                            AppCatalogResourceType.GLOBUS_SUBMISSION, globusJobSubmission);
            em.getTransaction().commit();
View Full Code Here

            Query q;
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GLOBUS_SUBMISSION);
            List results;
            if (fieldName.equals(GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER)) {
                generator.setParameter(GlobusJobSubmissionConstants.RESOURCE_JOB_MANAGER, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) result;
                        GlobusJobSubmissionResource globusJobSubmissionResource =
View Full Code Here

                        globusSubmissionResourceList.add(globusJobSubmissionResource);
                    }
                }
            } else if (fieldName.equals(GlobusJobSubmissionConstants.SECURITY_PROTOCAL)) {
                generator.setParameter(GlobusJobSubmissionConstants.SECURITY_PROTOCAL, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) result;
                        GlobusJobSubmissionResource globusJobSubmissionResource =
View Full Code Here

            Query q;
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GLOBUS_SUBMISSION);
            List results;
            if (fieldName.equals(GlobusJobSubmissionConstants.SUBMISSION_ID)) {
                generator.setParameter(GlobusJobSubmissionConstants.SUBMISSION_ID, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) result;
                        globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
View Full Code Here

                        globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
                    }
                }
            } else if (fieldName.equals(GlobusJobSubmissionConstants.GLOBUS_GATEKEEPER_EP)) {
                generator.setParameter(GlobusJobSubmissionConstants.GLOBUS_GATEKEEPER_EP, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GlobusJobSubmission globusJobSubmission = (GlobusJobSubmission) result;
                        globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
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.