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

Examples of org.apache.aiaravata.application.catalog.data.model.GlobusJobSubmission


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


                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 =
                                (GlobusJobSubmissionResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GLOBUS_SUBMISSION, globusJobSubmission);
                        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 =
                                (GlobusJobSubmissionResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GLOBUS_SUBMISSION, globusJobSubmission);
                        globusSubmissionResourceList.add(globusJobSubmissionResource);
                    }
View Full Code Here

                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());
                    }
                }
            } 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());
                    }
                }
            }
            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;
                        globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
                    }
                }
            } else 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;
                        globusSubmissionResourceIDs.add(globusJobSubmission.getSubmissionID());
                    }
                }
            } else {
                em.getTransaction().commit();
                em.close();
View Full Code Here

    public void save() throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            GlobusJobSubmission existingGlobusSubmission = em.find(GlobusJobSubmission.class, submissionID);
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            if (existingGlobusSubmission != null) {
                existingGlobusSubmission.setSubmissionID(submissionID);
                existingGlobusSubmission.setResourceJobManager(resourceJobManager);
                existingGlobusSubmission.setSecurityProtocol(securityProtocol);
                em.merge(existingGlobusSubmission);
            } else {
                GlobusJobSubmission globusJobSubmission = new GlobusJobSubmission();
                globusJobSubmission.setSubmissionID(submissionID);
                globusJobSubmission.setSecurityProtocol(securityProtocol);
                globusJobSubmission.setResourceJobManager(resourceJobManager);
                em.persist(globusJobSubmission);
            }
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
View Full Code Here

    public boolean isExists(Object identifier) throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            GlobusJobSubmission globusJobSubmission = em.find(GlobusJobSubmission.class, identifier);
            em.close();
            return globusJobSubmission != null;
        } catch (ApplicationSettingsException e) {
            logger.error(e.getMessage(), e);
            throw new AppCatalogException(e);
View Full Code Here

TOP

Related Classes of org.apache.aiaravata.application.catalog.data.model.GlobusJobSubmission

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.