130131132133134135136137
public int getNroTicketEspFuncionario(String func) throws NegocioException { try{ return dao.getNroTicketEspFuncionario(func); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
140141142143144145146147
public boolean podeLiberar(String user, String cartao) throws NegocioException { try{ return dao.podeLiberar(user, cartao); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
150151152153154155156157
public void registrarEntrada(String Cartao, String user) throws NegocioException { try{ dao.registrarEntrada(Cartao, user); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
160161162163164165166167
public boolean podeLiberar(String ticket_cartao) throws NegocioException { try{ return dao.podeLiberar(ticket_cartao); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
170171172173174175176177
public String gerarFuncionario(String nome) throws NegocioException { try{ return dao.gerarFuncionario(nome); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
180181182183184185186187
public String getLastTicket() throws NegocioException { try{ return dao.getLastTicket(); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
191192193194195196197198
try{ return convercao.toViewFuncs(dao.getFuncs()); } catch(DAOSQLExcep e) { throw new NegocioException(e.getMessage()); } }
201202203204205206207208
public void pagou(Ticket t, double total) throws NegocioException{ try{ dao.pagou(convercao.toModel(t), total); } catch(DAOSQLExcep e){ throw new NegocioException(e.getMessage()); } }
210211212213214215216217
@Override public void createCartaoEsp(Funcionario funcionario) throws NegocioException { try { dao.createCartaoEsp(convercao.toModelFunc(funcionario)); } catch (DAOSQLExcep ex) { throw new NegocioException(ex.getMessage(), ex); } }
5152535455565758596061
validarContaValor(conta, valor); conta = getConta(conta); validarSenhaTipoDeConta(conta, senha); if (conta.getSaldo() < valor) throw new NegocioException("Saldo insuficiente"); conta.setSaldo( conta.getSaldo() - valor); salvarTransacao(