Package labsis.usuario.dao

Examples of labsis.usuario.dao.DaoLogUsuario


    }
    return msg;
  }

  public List<LogUsuario> retrieveLogs(int pageNum) {
    DaoLogUsuario dl = null;
    List<LogUsuario> l = new ArrayList<LogUsuario>();
    try {
      dl = new DaoLogUsuario();
      List<Object> list = dl.retrieve(pageNum, 15);
      Integer totalPages = (Integer) list.remove(list.size() - 1);
      for (Object o : list) {
        LogUsuario lu = (LogUsuario) o;
        l.add(lu);
      }
      l.add(new LogUsuario(totalPages, null, null, null));
    } catch (SQLException e) {
      e.printStackTrace();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } finally {
      try {
        dl.close();
      } catch (SQLException e) {
        e.printStackTrace();
      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here


  // metodo usado apenas para registrar log de usuarios

  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

TOP

Related Classes of labsis.usuario.dao.DaoLogUsuario

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.