@@ -0,0 +1,1472 @@
+import java.sql.Connection;%0Aimport java.sql.PreparedStatement;%0Aimport java.sql.SQLException;%0A%0Aimport projeto.beans.Cliente;%0A%0A%0Apublic class ClienteDAO %7B%0A%09%0A%09public void inserir(Cliente cliente) throws SQLException%7B%0A%09%09%0A%09%09Connection conn = null;%0A%09%09%0A%09%09try%7B%0A%09%09%09%0A%09%09%09conn = ConnectionManager.getInstance().getConnection();%0A%09%09%09%0A%09%09%09PreparedStatement insert = conn.prepareStatement(%22INSERT INTO cliente(nome) VALUES (?)%22); %0A%09%09%09%0A%09%09%09insert.setString(1, cliente.getNome());%0A%09%09%09insert.executeUpdate();%0A%09%09%7D%0A%09%09catch (SQLException e)%7B%0A%09%09%09e.printStackTrace();%0A%09%09%09throw new SQLException(%22Erro ao manipular o banco%22);%0A%09%09%7D finally %7B%0A%09%09%09if (conn != null)%7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09conn.close();%0A%09%09%09%09%7Dcatch (SQLException e)%7B%0A%09%09%09%09%09e.printStackTrace();%0A%09%09%09%09%09throw new SQLException(%22Erro ao fechar a conex%C3%A3o com o banco!%22, e);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%7D%0A%09%0Apublic void buscar(Cliente cliente) throws SQLException%7B%0A%09%09%0A%09%09Connection conn = null;%0A%09%09%0A%09%09try%7B%0A%09%09%09%0A%09%09%09conn = ConnectionManager.getInstance().getConnection();%0A%09%09%09%0A%09%09%09PreparedStatement select = conn.prepareStatement(%22SELECT * FROM cliente WHERE NOME = ?%22); %0A%09%09%09%0A%09%09%09select.setString(1, cliente.getNome());%0A%09%09%09select.executeQuery();%0A%09%09%7D%0A%09%09catch (SQLException e)%7B%0A%09%09%09e.printStackTrace();%0A%09%09%09throw new SQLException(%22Erro ao manipular o banco%22);%0A%09%09%7D finally %7B%0A%09%09%09if (conn != null)%7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09conn.close();%0A%09%09%09%09%7Dcatch (SQLException e)%7B%0A%09%09%09%09%09e.printStackTrace();%0A%09%09%09%09%09throw new SQLException(%22Erro ao fechar a conex%C3%A3o com o banco!%22, e);%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09%0A%09%7D%0A%09%0A%0A%7D%0A

Create ClienteDAO.java