Package br.com.moonjava.flight.model.base

Examples of br.com.moonjava.flight.model.base.VooModel


      }

      status = modelPassagem.efetuarCancelamento(passagem);

      if (status) {
        new VooModel().incrementarAssento(passagem.getVoo().getId());
        messageReembolso();
        messageOK();
      } else {
        messageDbOff();
      }
View Full Code Here


      request.set("partida", dataPartida);
      request.set("chegada", dataChegada);
      request.set("status", _status);

      // Exibe os vôos
      list = new VooModel().consultar(request);
      boolean isEmpty = showList(list);

      if (isEmpty) {
        messageFailed();
      } else {
View Full Code Here

        request.set("id", pojo.getId());
        request.set("partida", _partida);
        request.set("chegada", _chegada);

        Voo pojo = new VooUpdate(request).createInstance();
        boolean executed = new VooModel().atualizar(pojo);
        if (executed) {
          messageOK();
          refresh();
        } else {
          messageTimeException();
View Full Code Here

      UIManager.put("OptionPane.cancelButtonText", bundle.getString("cancelar"));
      String status = (String) JOptionPane.showInputDialog(null, "Status:", "Status", 1, null,
          nomes, Status.DISPONIVEL);

      Voo vooModel = new VooModel();

      if (status != null) {
        int[] rows = tabela.getSelectedRows();
        for (int i = 0; i < rows.length; i++) {
          Voo pojo = list.get(rows[i]);
          vooModel.controlarStatus(pojo.getId(), Status.fromString(status));
        }

        JOptionPane.showMessageDialog(null, bundle.getString("status.voo.joption.ok"));

        conteudo.removeAll();
View Full Code Here

  @Override
  public Voo createInstance() {
    if (getDataDePartida().isBefore(getDataDeChegada()) &&
        getDataDePartida().isAfter(System.currentTimeMillis())) {
      return new VooModel(this);
    } else {
      return null;
    }
  }
View Full Code Here

      this.rs = rs;
    }

    @Override
    public Voo createInstance() {
      VooModel impl = new VooModel(this);
      impl.setId(rs.getInt("ID"));
      return impl;
    }
View Full Code Here

TOP

Related Classes of br.com.moonjava.flight.model.base.VooModel

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.