Examples of Projeto


Examples of br.ufra.pibid.modelo.entidade.Projeto

    private ProjetoRN rn = new ProjetoRN();

    @Override
    public Object getAsObject(FacesContext fc, UIComponent uic, String string) {
        Projeto projeto = null;
        try {
            projeto = rn.buscar(Integer.valueOf(string));
        } catch (Exception e) {
            System.out.println(e);
        }
View Full Code Here

Examples of br.ufra.pibid.modelo.entidade.Projeto

    public ProjetoRN() {
    }

    public Projeto novo() {
        return new Projeto();
    }
View Full Code Here

Examples of business.Projeto

    @Override
    void doCommand() throws Exception {
        ContainerArvores containerArvores = ((IEditorView) view).getPresenter().getContainerArvores();

        ((IEditorView) view).getPresenter().getProjetoDAO().connect();
        Projeto projeto = ((IEditorView) view).getPresenter().getProjetoDAO().find(containerArvores.getProjeto().getId());
        for (Long idArvore : ((IEditorView) view).getArvoresSelecionadas()) {
            projeto.getCenarioById(containerArvores.getId()).removeArvore(idArvore);
        }
        ((IEditorView) view).getPresenter().getProjetoDAO().update(projeto, true, containerArvores.getProjeto().getId());
    }
View Full Code Here

Examples of business.Projeto

    @Override
    public void doEntry() {
        ProjetoDAO dao = new ProjetoDAO();
        dao.connect();
        Projeto projeto = dao.find(idProjeto);
        view.getTextNomeProj().setText(projeto.getNome());
        view.getTextDescProj().setText(projeto.getDescricao());
        view.getTextAutorProj().setText(projeto.getAutor());
        dao.close();
        projeto = null;
        view.setTitle("Alterar dados básicos do projeto");
    }
View Full Code Here

Examples of business.Projeto

    @Override
    public void salvarProjeto(Main main) throws Exception {
        ProjetoDAO projetoDAO = new ProjetoDAO();
        projetoDAO.connect();
     
        Projeto projeto = projetoDAO.find(main.getProjeto().getId());
        projeto.setNome(view.getTextNomeProj().getText());
        projeto.setDescricao(view.getTextDescProj().getText());
        projeto.setAutor(view.getTextAutorProj().getText());

        projetoDAO.update(projeto, false, projeto.getId());
       
        projetoDAO.close();

        view.setVisible(false);
        projetoDAO.connect();
        main.abreProjeto(projetoDAO.find(projeto.getId()));
        main.getDesktop().closeAll();
        projetoDAO.close();
        view.dispose();
    }
View Full Code Here

Examples of business.Projeto

    @Test
    public void testFindCenario() throws Exception {
        long tempoInicialT = System.currentTimeMillis();
        ProjetoDAO dao = new ProjetoDAO();
        dao.connect();
        Projeto p = dao.find(1);
        CenarioVolume c = p.getCenarioById(1);
        System.out.println(c);
        assertNotNull(c);
        dao.close();
        long tempoFinalT = System.currentTimeMillis();
        System.out.printf("Tempo: %.3f ms%n", (tempoFinalT - tempoInicialT) / 1000d);
View Full Code Here

Examples of business.Projeto

    @Ignore
    @Test
    public void testSaveProjeto() throws Exception {
        ProjetoDAO dao = new ProjetoDAO();
        dao.connect();
        Projeto p = new Projeto();
        p.setNome(JOptionPane.showInputDialog(null, "Entre com o nome do projeto"));
        p.setId(dao.getNewId());
        Arvore a = new Arvore(1);
        a.put("DAP", 18.0);
        a.put("H", 19.0);
        p.addArvore(a);
        dao.save(p);
        dao.close();
    }
View Full Code Here

Examples of business.Projeto

  //  @Ignore
    @Test
    public void testUpdateProjeto() throws Exception {
        final ProjetoDAO dao = new ProjetoDAO();
        dao.connect();
        Projeto projeto = dao.find(1);
        projeto.setDescricao("Uma descrição");
        CenarioVolume cenario = new CenarioVolume(projeto.getNewCenarioVolumeId());
        cenario.setNome("c1");
        projeto.addCenario(cenario);
        System.out.println(projeto);
        //dao.save(projeto);
        dao.update(projeto, true, projeto.getId());
    }
View Full Code Here

Examples of business.Projeto

    @Ignore
    @Test
    public void testeUpdateProjeto2() throws Exception {
        final ProjetoDAO dao = new ProjetoDAO();
        dao.connect();
        Projeto projeto = dao.find(1);
        Arvore arvore = new Arvore(2);
        arvore.put("DAP", 21.0);
        arvore.put("H", 26.0);
        projeto.addArvore(arvore);
        dao.update(projeto, false, projeto.getId());
        dao.close();
        assertNotNull("Nulo", projeto);
    }
View Full Code Here

Examples of business.Projeto

    @Override
    public void doEntry() {
        ProjetoDAO dao = new ProjetoDAO();
        dao.connect();
        Projeto projeto = dao.find(idProjeto);
        CenarioVolume cenario = projeto.getCenarioById(idCenario);

        view.getTxtCenario().setText(cenario.getNome());

        dao.close();
        projeto = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.