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

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


        List<?> results;
        switch (type){
            case WORKFLOW_DATA:
                generator = new QueryGenerator(WORKFLOW_DATA);
//                generator.setParameter(WorkflowDataConstants.EXPERIMENT_ID, experimentID);
                Experiment_Data experiment_data = em.find(Experiment_Data.class, experimentID);
                generator.setParameter("experiment_data", experiment_data);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
View Full Code Here


        return resourceList;
    }

    public void save() {
        EntityManager em = ResourceUtils.getEntityManager();
        Experiment_Data existingExpData = em.find(Experiment_Data.class, experimentID);
        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Experiment_Data experimentData = new Experiment_Data();
        experimentData.setExperiment_ID(experimentID);
        experimentData.setName(expName);
        experimentData.setUsername(userName);
        if(existingExpData != null){
            existingExpData.setName(expName);
            existingExpData.setUsername(userName);
            experimentData = em.merge(existingExpData);
        } else{
View Full Code Here

        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Workflow_Data workflowData = new Workflow_Data();
        Experiment_Data expData = em.find(Experiment_Data.class, experimentID);
        workflowData.setExperiment_data(expData);
        workflowData.setWorkflow_instanceID(workflowInstanceID);
        workflowData.setLast_update_time(lastUpdatedTime);
        workflowData.setStart_time(startTime);
        workflowData.setTemplate_name(templateName);
View Full Code Here

        switch (type) {
            case EXPERIMENT_DATA:
                generator = new QueryGenerator(EXPERIMENT_DATA);
                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
                q = generator.selectQuery(em);
                Experiment_Data experimentData = (Experiment_Data)q.getSingleResult();
                ExperimentDataResource experimentDataResource = (ExperimentDataResource)Utils.getResource(ResourceType.EXPERIMENT_DATA, experimentData);
                em.getTransaction().commit();
                em.close();
                return experimentDataResource;
            default:
View Full Code Here

        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        GFac_Job_Data gFacJobData = new GFac_Job_Data();
        Experiment_Data experiment_data = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
        gFacJobData.setExperiment_data(experiment_data);
        gFacJobData.setExperiment_ID(experimentDataResource.getExperimentID());
        Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
        gFacJobData.setWorkflow_Data(workflow_data);
        gFacJobData.setWorkflow_instanceID(workflowDataResource.getWorkflowInstanceID());
        gFacJobData.setNode_id(nodeID);
        gFacJobData.setApplication_descriptor_ID(applicationDescID);
        gFacJobData.setLocal_Job_ID(localJobID);
        gFacJobData.setService_descriptor_ID(serviceDescID);
        gFacJobData.setHost_descriptor_ID(hostDescID);
        gFacJobData.setJob_data(jobData);
        gFacJobData.setSubmitted_time(submittedTime);
        gFacJobData.setStatus_update_time(statusUpdateTime);
        gFacJobData.setStatus(status);
        gFacJobData.setMetadata(metadata);
        if(existingGfacJobData != null){
            Experiment_Data experiment_data1 = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
            existingGfacJobData.setExperiment_data(experiment_data1);
            existingGfacJobData.setExperiment_ID(experimentDataResource.getExperimentID());
            Workflow_Data workflow_data1 = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
            existingGfacJobData.setWorkflow_Data(workflow_data1);
            existingGfacJobData.setWorkflow_instanceID(workflowDataResource.getWorkflowInstanceID());
View Full Code Here

        EntityManager em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();

        Execution_Error execution_error = new Execution_Error();
        execution_error.setNode_id(nodeID);
        Experiment_Data experiment_data = em.find(Experiment_Data.class, experimentDataResource.getExperimentID());
        execution_error.setExperiment_data(experiment_data);
        Workflow_Data workflow_data = em.find(Workflow_Data.class, workflowDataResource.getWorkflowInstanceID());
        execution_error.setExperiment_ID(experiment_data.getExperiment_ID());
        execution_error.setWorkflow_Data(workflow_data);
        execution_error.setWorkflow_instanceID(workflow_data.getWorkflow_instanceID());
        execution_error.setError_code(errorCode);
        execution_error.setError_date(errorTime);
        execution_error.setError_des(errorDes);
View Full Code Here

TOP

Related Classes of org.apache.airavata.persistance.registry.jpa.model.Experiment_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.