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

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


                    new GSISSHPreJobCommandPK(submissionID, command));
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            GSISSHSubmission gsisshSubmission = em.find(GSISSHSubmission.class, submissionID);
            if (existingGSIsshPreJobCommand !=  null){
                existingGSIsshPreJobCommand.setSubmissionID(submissionID);
                existingGSIsshPreJobCommand.setCommand(command);
                existingGSIsshPreJobCommand.setGsisshSubmission(gsisshSubmission);
                em.merge(existingGSIsshPreJobCommand);
View Full Code Here


                    new GSISSHPostJobCommandPK(submissionID, command));
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            GSISSHSubmission gsisshSubmission = em.find(GSISSHSubmission.class, submissionID);
            if (existingPostJobCommand !=  null){
                existingPostJobCommand.setSubmissionID(submissionID);
                existingPostJobCommand.setCommand(command);
                existingPostJobCommand.setGsisshSubmission(gsisshSubmission);
                em.merge(existingPostJobCommand);
View Full Code Here

            GSISSHExport existingGSIExport = em.find(GSISSHExport.class, new GSISSHExportPK(submissionID, export));
            em.close();

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            GSISSHSubmission gsisshSubmission = em.find(GSISSHSubmission.class, submissionID);
            if (existingGSIExport != null) {
                existingGSIExport.setSubmissionID(submissionID);
                existingGSIExport.setExport(export);
                existingGSIExport.setGsisshJobSubmission(gsisshSubmission);
                em.merge(existingGSIExport);
View Full Code Here

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GSISSH_SUBMISSION);
            generator.setParameter(GSISSHSubmissionConstants.SUBMISSION_ID, identifier);
            Query q = generator.selectQuery(em);
            GSISSHSubmission gsisshSubmission = (GSISSHSubmission) q.getSingleResult();
            GSISSHSubmissionResource gsisshSubmissionResource =
                    (GSISSHSubmissionResource) AppCatalogJPAUtils.getResource(AppCatalogResourceType.GSISSH_SUBMISSION
                            , gsisshSubmission);
            em.getTransaction().commit();
            em.close();
View Full Code Here

                generator.setParameter(GSISSHSubmissionConstants.MONITOR_MODE, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        GSISSHSubmissionResource gsisshSubmissionResource =
                                (GSISSHSubmissionResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GSISSH_SUBMISSION, gsisshSubmission);
                        gsiSSHSubmissionResourceList.add(gsisshSubmissionResource);
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.INSTALLED_PATH)) {
                generator.setParameter(GSISSHSubmissionConstants.INSTALLED_PATH, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        GSISSHSubmissionResource gsisshSubmissionResource =
                                (GSISSHSubmissionResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GSISSH_SUBMISSION, gsisshSubmission);
                        gsiSSHSubmissionResourceList.add(gsisshSubmissionResource);
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.SSH_PORT)) {
                generator.setParameter(GSISSHSubmissionConstants.SSH_PORT, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        GSISSHSubmissionResource gsisshSubmissionResource =
                                (GSISSHSubmissionResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GSISSH_SUBMISSION, gsisshSubmission);
                        gsiSSHSubmissionResourceList.add(gsisshSubmissionResource);
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER)) {
                generator.setParameter(GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        GSISSHSubmissionResource gsisshSubmissionResource =
                                (GSISSHSubmissionResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GSISSH_SUBMISSION, gsisshSubmission);
                        gsiSSHSubmissionResourceList.add(gsisshSubmissionResource);
                    }
View Full Code Here

                generator.setParameter(GSISSHSubmissionConstants.SUBMISSION_ID, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.SSH_PORT)) {
                generator.setParameter(GSISSHSubmissionConstants.SSH_PORT, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.MONITOR_MODE)) {
                generator.setParameter(GSISSHSubmissionConstants.MONITOR_MODE, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER)) {
                generator.setParameter(GSISSHSubmissionConstants.RESOURCE_JOB_MANAGER, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
                    }
                }
            } else if (fieldName.equals(GSISSHSubmissionConstants.INSTALLED_PATH)) {
                generator.setParameter(GSISSHSubmissionConstants.INSTALLED_PATH, value);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        GSISSHSubmission gsisshSubmission = (GSISSHSubmission) result;
                        gsiSSHSubmissionResourceIDs.add(gsisshSubmission.getSubmissionID());
                    }
                }
            } else {
                em.getTransaction().commit();
                em.close();
View Full Code Here

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

            em = AppCatalogJPAUtils.getEntityManager();
            em.getTransaction().begin();
            if (existingGSISSHSubmission != null) {
                existingGSISSHSubmission.setSubmissionID(submissionID);
                existingGSISSHSubmission.setSshPort(sshPort);
                existingGSISSHSubmission.setResourceJobManager(resourceJobManager);
                existingGSISSHSubmission.setInstalledPath(installedPath);
                existingGSISSHSubmission.setMonitorMode(monitorMode);
                em.merge(existingGSISSHSubmission);
            } else {
                GSISSHSubmission gsisshSubmission = new GSISSHSubmission();
                gsisshSubmission.setSubmissionID(submissionID);
                gsisshSubmission.setSshPort(sshPort);
                gsisshSubmission.setResourceJobManager(resourceJobManager);
                gsisshSubmission.setInstalledPath(installedPath);
                gsisshSubmission.setMonitorMode(monitorMode);
                em.persist(gsisshSubmission);
            }
            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();
            GSISSHSubmission gsisshSubmission = em.find(GSISSHSubmission.class, identifier);
            em.close();
            return gsisshSubmission != 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.GSISSHSubmission

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.