Package org.apache.airavata.persistance.registry.jpa.model

Examples of org.apache.airavata.persistance.registry.jpa.model.Gram_Data


            case GRAM_DATA:
                generator = new QueryGenerator(GRAM_DATA);
                generator.setParameter(GramDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
                generator.setParameter(GramDataConstants.NODE_ID, name);
                q = generator.selectQuery(em);
                Gram_Data egramData = (Gram_Data)q.getSingleResult();
                GramDataResource gramDataResource = (GramDataResource)Utils.getResource(ResourceType.GRAM_DATA, egramData);
                em.getTransaction().commit();
                em.close();
                return gramDataResource;
            default:
View Full Code Here


                generator.setParameter(GramDataConstants.WORKFLOW_INSTANCE_ID, workflowInstanceID);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        Gram_Data gramData = (Gram_Data)result;
                        GramDataResource gramDataResource = (GramDataResource)Utils.getResource(ResourceType.GRAM_DATA, gramData);
                        resourceList.add(gramDataResource);
                    }
                }
                break;
View Full Code Here

        throw new UnsupportedOperationException();
    }

    public void save() {
        EntityManager em = ResourceUtils.getEntityManager();
        Gram_Data existingGramData = em.find(Gram_Data.class, new Gram_DataPK(workflowDataResource.getWorkflowInstanceID(), nodeID));
        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Gram_Data gramData = new Gram_Data();
        gramData.setNode_id(nodeID);
        Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
        gramData.setWorkflow_Data(workflow_data);
        gramData.setNode_id(nodeID);
        gramData.setInvoked_host(invokedHost);
        gramData.setLocal_Job_ID(localJobID);
        byte[] bytes = rsl.getBytes();
        gramData.setRsl(bytes);
        if(existingGramData != null){
            existingGramData.setInvoked_host(invokedHost);
            existingGramData.setLocal_Job_ID(localJobID);
            existingGramData.setRsl(bytes);
            gramData = em.merge(existingGramData);
View Full Code Here

TOP

Related Classes of org.apache.airavata.persistance.registry.jpa.model.Gram_Data

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.