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

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


                return workflowDataResource;
            case EXPERIMENT_METADATA:
                generator = new QueryGenerator(EXPERIMENT_METADATA);
                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, name);
                q = generator.selectQuery(em);
                Experiment_Metadata expMetadata = (Experiment_Metadata)q.getSingleResult();
                ExperimentMetadataResource experimentMetadataResource = (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, expMetadata);
                em.getTransaction().commit();
                em.close();
                return experimentMetadataResource;
            default:
View Full Code Here


                generator.setParameter(ExperimentDataConstants.EXPERIMENT_ID, experimentID);
                q = generator.selectQuery(em);
                results = q.getResultList();
                if (results.size() != 0) {
                    for (Object result : results) {
                        Experiment_Metadata expMetadata = (Experiment_Metadata) result;
                        ExperimentMetadataResource experimentMetadataResource = (ExperimentMetadataResource)Utils.getResource(ResourceType.EXPERIMENT_METADATA, expMetadata);
                        resourceList.add(experimentMetadataResource);
                    }
                }
                break;
View Full Code Here

        throw new UnsupportedOperationException();
    }

    public void save() {
        EntityManager em = ResourceUtils.getEntityManager();
        Experiment_Metadata existingExpMetaData = em.find(Experiment_Metadata.class, expID);
        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Experiment_Metadata experimentMetadata = new Experiment_Metadata();
        experimentMetadata.setExperiment_ID(expID);
        byte[] contentBytes = metadata.getBytes();
        experimentMetadata.setMetadata(contentBytes);

        if (existingExpMetaData != null) {
            existingExpMetaData.setMetadata(contentBytes);
            existingExpMetaData.setExperiment_ID(expID);
            experimentMetadata = em.merge(existingExpMetaData);
View Full Code Here

TOP

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

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.