Package labsis.usuario.model

Examples of labsis.usuario.model.Operacao


  private boolean addLog(String username, int operacaoid)
      throws SQLException, ClassNotFoundException {
    DaoLogUsuario dl = null;
    dl = new DaoLogUsuario();
    boolean b = dl.create(new LogUsuario(0, new Operacao(operacaoid, null,null),
        new Usuario(username, null, null, null), null));
    dl.close();
    return b;
  }
View Full Code Here


          .prepareStatement("select o.id, o.descricao, o.comando from tipousuariooperacoes uo join operacao o on uo.operacaoId = o.id where uo.tipousuarioId = ?");
      st.setString(1, r.getString(4));
      ResultSet op = st.executeQuery();
      HashSet<Operacao> operacoes = new HashSet<Operacao>();
      while (op.next()) {
        operacoes.add(new Operacao(op.getInt(1), op.getString(2),r.getString(3)));
      }
      l.add(new Usuario(r.getString(1), r.getString(2), r.getString(3),
          new TipoUsuario(r.getInt(4), r.getString(5), operacoes)));
    }
    return l;
View Full Code Here

          .prepareStatement("select o.id, o.descricao, o.comando from tipousuariooperacoes uo join operacao o on uo.operacaoId = o.id where uo.tipousuarioId = ?");
      st.setInt(1, r.getInt(4));
      ResultSet op = st.executeQuery();
      HashSet<Operacao> operacoes = new HashSet<Operacao>();
      while (op.next()) {
        operacoes.add(new Operacao(op.getInt(1), op.getString(2),op.getString(3)));
      }
      u = new Usuario(r.getString(1), r.getString(2), r.getString(3),
          new TipoUsuario(r.getInt(4), r.getString(5), operacoes));
    }
    return u;
View Full Code Here

          .prepareStatement("select o.id, o.descricao, o.comando from tipousuariooperacoes uo join operacao o on uo.operacaoId = o.id where uo.tipousuarioId = ?");
      st.setString(1, r.getString(5));
      ResultSet op = st.executeQuery();
      HashSet<Operacao> operacoes = new HashSet<Operacao>();
      while (op.next()) {
        operacoes.add(new Operacao(op.getInt(1), op.getString(2),r.getString(3)));
      }
      l.add(new Usuario(r.getString(2), r.getString(3), r.getString(4),
          new TipoUsuario(r.getInt(5), r.getString(6), operacoes)));
    }
    st = conn
View Full Code Here

    List<Object> l = new ArrayList<Object>();
    PreparedStatement st = conn
        .prepareStatement("select l.id, o.descricao, u.nome, l.data, o.comando from logusuario l join operacao o on l.operacaoId=o.id join usuario u on l.username = u.username");
    ResultSet r = st.executeQuery();
    while (r.next()) {
      l.add(new LogUsuario(r.getInt(1), new Operacao(0, r.getString(2),r.getString(5)),
          new Usuario("", "", r.getString(3), null), r.getTimestamp(4)));
    }
    return l;
  }
View Full Code Here

    st.setInt(2, rowsPerPage);
    st.setInt(3, pageNum);
    st.setInt(4, rowsPerPage);
    ResultSet r = st.executeQuery();
    while (r.next()) {
      l.add(new LogUsuario(r.getInt(2), new Operacao(0, r.getString(3),r.getString(6)),
          new Usuario("", "", r.getString(4), null), r.getTimestamp(5)));
    }
    st = conn.prepareStatement("select ((count(*) - 1) / ? ) + 1 from logusuario");
    st.setInt(1, rowsPerPage);
    ResultSet t = st.executeQuery();
View Full Code Here

TOP

Related Classes of labsis.usuario.model.Operacao

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.