Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package bean;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.sql.SQLException;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import javax.faces.bean.ManagedBean;
- import conexao.ConexaoBD;
- import pessoa.dao.PessoaDao;
- import pessoa.implement.PessoaImplements;
- import edu.Entidade.Pessoa;
- @ManagedBean
- public class PessoaMB {
- private Pessoa pessoa = new Pessoa();
- PessoaDao aDao = new PessoaImplements();
- private List<Pessoa> resul;
- public Pessoa getPessoa() {
- return pessoa;
- }
- public void setPessoa(Pessoa pessoa) {
- this.pessoa = pessoa;
- }
- public void inserir() throws SQLException{
- System.out.println("Gravandooooo");
- aDao.inserir(pessoa);
- }
- public List<Pessoa> getListar() throws SQLException{
- resul = aDao.lista();
- return resul;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement