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

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


        queryGenerator.setParameter(ProjectConstants.PROJECT_NAME, keys[0]);
        Query q = queryGenerator.selectQuery(em);
        List<?> resultList = q.getResultList();
        if (resultList.size() != 0) {
            for (Object result : resultList) {
                Project project = (Project) result;
                ProjectResource projectResource = (ProjectResource)
                        Utils.getResource(ResourceType.PROJECT, project);
                list.add(projectResource);
            }
        }
View Full Code Here


    /**
     * save project to the database
     */
    public void save() {
        EntityManager em = ResourceUtils.getEntityManager();
        Project existingprojectResource = em.find(Project.class, name);
        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Project project = new Project();
        project.setProject_name(name);
        Gateway modelGateway = em.find(Gateway.class, gateway.getGatewayName());
        project.setGateway(modelGateway);
        Users user = em.find(Users.class, worker.getUser());
        project.setUsers(user);

        if(existingprojectResource != null){
           existingprojectResource.setGateway(modelGateway);
            existingprojectResource.setUsers(user);
            project = em.merge(existingprojectResource);
View Full Code Here

        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Experiment experiment = new Experiment();
        Project projectmodel = em.find(Project.class, project.getName());
        experiment.setProject(projectmodel);
        Users user = em.find(Users.class, getWorker().getUser());
        Gateway gateway = em.find(Gateway.class, getGateway().getGatewayName());
        experiment.setProject(projectmodel);
        experiment.setExperiment_ID(getExpID());
View Full Code Here

        queryGenerator.setParameter(ProjectConstants.PROJECT_NAME, keys[0]);
        Query q = queryGenerator.selectQuery(em);
        List<?> resultList = q.getResultList();
        if (resultList.size() != 0) {
            for (Object result : resultList) {
                Project project = (Project) result;
                ProjectResource projectResource = (ProjectResource)
                        Utils.getResource(ResourceType.PROJECT, project);
                list.add(projectResource);
            }
        }
View Full Code Here

    /**
     * save project to the database
     */
    public void save() {
        EntityManager em = ResourceUtils.getEntityManager();
        Project existingprojectResource = em.find(Project.class, name);
        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Project project = new Project();
        project.setProject_name(name);
        Gateway modelGateway = em.find(Gateway.class, gateway.getGatewayName());
        project.setGateway(modelGateway);
        Users user = em.find(Users.class, worker.getUser());
        project.setUsers(user);

        if(existingprojectResource != null){
           existingprojectResource.setGateway(modelGateway);
            existingprojectResource.setUsers(user);
            project = em.merge(existingprojectResource);
View Full Code Here

TOP

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

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.