示例#1
0
 @Override
 public PreparedStatement getSqlLocalizar() {
   try {
     stmt =
         (PreparedStatement)
             ConexaoBd.getConexao().prepareStatement("select pais.*" + " from tb_pais as pais");
   } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   return stmt;
 }
示例#2
0
 public PreparedStatement getSqlEfetuarLogin() {
   try {
     stmt =
         (PreparedStatement)
             ConexaoBd.getConexao()
                 .prepareStatement(
                     "select usuario.*, pessoa.*, endereco.*"
                         + " from tb_usuario as usuario"
                         + " inner join tb_pessoa as pessoa on (usuario.idPessoa = pessoa.idPessoa)"
                         + " left join tb_endereco as endereco on (pessoa.idEndereco = endereco.idEndereco)"
                         + " where usuario.dsEmailAcesso like ?"
                         + " and usuario.dsSenhaAcesso like ?");
     stmt.setString(1, usuario.getDsEmailAcesso());
     stmt.setString(2, usuario.getDsSenhaAcesso());
   } catch (SQLException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
   return stmt;
 }