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

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


            AppCatalogQueryGenerator generator = new AppCatalogQueryGenerator(GSISSH_PREJOBCOMMAND);
            generator.setParameter(GSISSHPreJobCommandConstants.SUBMISSION_ID,
                    ids.get(GSISSHPreJobCommandConstants.SUBMISSION_ID));
            generator.setParameter(GSISSHPreJobCommandConstants.COMMAND, ids.get(GSISSHPreJobCommandConstants.COMMAND));
            Query q = generator.selectQuery(em);
            GSISSHPreJobCommand gsisshPreJobCommand = (GSISSHPreJobCommand) q.getSingleResult();
            GSISSHPreJobCommandResource gsisshPreJobCommandResource =
                    (GSISSHPreJobCommandResource) AppCatalogJPAUtils.getResource(
                            AppCatalogResourceType.GSISSH_PREJOBCOMMAND, gsisshPreJobCommand);
            em.getTransaction().commit();
            em.close();
View Full Code Here


                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;
                        GSISSHPreJobCommandResource gsisshPreJobCommandResource =
                                (GSISSHPreJobCommandResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GSISSH_PREJOBCOMMAND, gsisshPreJobCommand);
                        gsiSSHPreJobResources.add(gsisshPreJobCommandResource);
                    }
                }
            } 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;
                        GSISSHPreJobCommandResource gsisshPreJobCommandResource =
                                (GSISSHPreJobCommandResource) AppCatalogJPAUtils.getResource(
                                        AppCatalogResourceType.GSISSH_PREJOBCOMMAND, gsisshPreJobCommand);
                        gsiSSHPreJobResources.add(gsisshPreJobCommandResource);
                    }
View Full Code Here

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

    public void save() throws AppCatalogException {
        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            GSISSHPreJobCommand existingGSIsshPreJobCommand = em.find(GSISSHPreJobCommand.class,
                    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);
            }else {
                GSISSHPreJobCommand gsisshPreJobCommand = new GSISSHPreJobCommand();
                gsisshPreJobCommand.setSubmissionID(submissionID);
                gsisshPreJobCommand.setCommand(command);
                gsisshPreJobCommand.setGsisshSubmission(gsisshSubmission);
                em.persist(gsisshPreJobCommand);
            }
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
View Full Code Here

        }

        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            GSISSHPreJobCommand gsisshPreJobCommand = em.find(GSISSHPreJobCommand.class, new GSISSHPreJobCommandPK(
                    ids.get(GSISSHPreJobCommandConstants.SUBMISSION_ID),
                    ids.get(GSISSHPreJobCommandConstants.COMMAND)));

            em.close();
            return gsisshPreJobCommand != null;
View Full Code Here

TOP

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

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.