Package br.com.benefrancis.controle

Examples of br.com.benefrancis.controle.Endereco


        Collection<Endereco> e = p.getEndereco();
        try {
            tx = session.beginTransaction();
            //Percorrendo a coleção
            for (Iterator iter = e.iterator(); iter.hasNext();) {
                Endereco endereco = (Endereco) iter.next();
                session.save(endereco);
            }
            tx.commit();
            return true;
        } catch (Exception ex) {
View Full Code Here


    }

    public static Endereco consultar(int idEndereco) {
        Session session = ConexaoHibernate.getInstance();
        Transaction tx = null;
        Endereco e = null;
        try {
            Query q;
            tx = session.beginTransaction();
            q = session.createQuery("FROM Endereco as e where e.idEndereco=:id");
            q.setParameter("id", idEndereco);
View Full Code Here

        Collection<Endereco> e = p.getEndereco();
        try {
            tx = session.beginTransaction();
            //Percorrendo a coleção
            for (Iterator iter = e.iterator(); iter.hasNext();) {
                Endereco endereco = (Endereco) iter.next();
                session.delete(endereco);
            }
            tx.commit();
            return true;
        } catch (Exception ex) {
View Full Code Here

            throw new RuntimeException("<br><center><font face='verdana' color='red'   size='2'><br />já existe usuário cadastrado com o CPF ou CNPJ informado</font></center><br>");
        }



        Endereco end = new Endereco();
        end.setBairro("Jd Leni");
        end.setCep("05818250");
        end.setCidade("São Paulo");
        end.setLogradouro("Rua faustino Allende");
        end.setNumero("39");
        end.setUf("SP");
        end.setPessoa(pf);

        Collection<Endereco> e = new ArrayList<Endereco>();
        e.add(end);
        pf.setEndereco(e);
View Full Code Here

TOP

Related Classes of br.com.benefrancis.controle.Endereco

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.