Package dao

Examples of dao.DaoUser


  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("json");
    PrintWriter out = response.getWriter();
    DaoUser dao = new DaoUser();
    List<User> users = dao.getTopTenRatio();
    if(users != null) {
      System.out.println("\t\t\t\tS_TopTenRatio\n" + JsonWriter.objectToJson(users));
      out.print(JsonWriter.objectToJson(users));
    }
    else {
View Full Code Here


  //@SuppressWarnings("unchecked")
  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("json");
    PrintWriter out = response.getWriter();
    DaoUser dao = new DaoUser();
    List<User> friends = dao.getFriends(((User) request.getSession().getAttribute("user")).getMail());
    if(friends != null && !friends.isEmpty()) {
      System.out.println("\t\t\t\tS_Friends\n" + JsonWriter.objectToJson(friends));
      out.print(JsonWriter.objectToJson(friends));
    }
    else {
View Full Code Here

  }

  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("html");
    DaoUser dao = new DaoUser();
    User user = dao.login(request.getParameter("mail"), request.getParameter("password"));
    if(user != null) {
      request.getSession().setAttribute("user", user);
    }
    else {
      response.setStatus(599);
View Full Code Here

  }

  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("html");
    DaoUser dao = new DaoUser();
    User user = dao.subscribe(request.getParameter("mail"), request.getParameter("pseudo"), request.getParameter("password"));
    if(user != null) {
      request.getSession().setAttribute("user", user);
    }
    else {
      response.setStatus(599);
View Full Code Here

  }

  public void update(List<GareSelection> gs, PariHistorique p) {
    if(p != null) {
      user_id = p.getId_owner();
      User u = new DaoUser().findWithId(user_id);
     
     
      mise = p.getMontant();
      min_retard = p.getMinRetard();
      gain_potentiel = p.getGain();
View Full Code Here

    if (trainsInStation != null) {
     
      List<TheoricalTrainData> new_theoricalDataList = new ArrayList<TheoricalTrainData>();
     
      DaoTheoricalTrainData daoTheoricalTrainData = new DaoTheoricalTrainData();
      DaoUser daoUser = new DaoUser();
     
      for (RealTrainData tmp_real_data : trainsInStation.datas) {
       
        // TODO: faire le -1 sur le id_RealTrainData
       
        TheoricalTrainData tmp_theorical_data = daoTheoricalTrainData.findWithNumGare(tmp_real_data.id_RealTrainData, stationDUA);
       
        if (tmp_theorical_data != null) {
       
          // Pari possible ? (au moins 10 minutes avant l'arriv�e th�orique du train)
          if (TimeTester.compareTimes(trainsInStation.time, tmp_theorical_data.arrivalTime) >= 10) {
           
            tmp_theorical_data.destinationUIC = tmp_real_data.destinationId;
            tmp_theorical_data.trainName = tmp_real_data.name;
            daoTheoricalTrainData.update(tmp_theorical_data);
           
            new_theoricalDataList.add(tmp_theorical_data);
          }
         
         
          // Train en gare ?
          if (tmp_real_data.datePassage.equals(trainsInStation.time)) {
            // TODO: Donner aussi le retard du train (sinon �a sert � rien ...)
            daoUser.validBetOnTheorical(tmp_theorical_data);
          }
        }
      }
     
     
View Full Code Here

  @Override
  public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("json");
    PrintWriter out = response.getWriter();
    DaoUser dao = new DaoUser();
    List<User> users = dao.getTopTenScore();
    if(users != null) {
      System.out.println("\t\t\t\tS_TopTenScore\n" + JsonWriter.objectToJson(users));
      out.print(JsonWriter.objectToJson(users));
    }
    else {
View Full Code Here

*
* @author GuillermoLuis
*/
public class ControllerLogIn {
    public boolean LogIn(String user, String pass){
        DaoUser daoUser = new DaoUser();
        for(User u: daoUser.FindAllUser()){
            if(u.getUser().equals(user)&& u.getPass().equals(pass)){
                return true;
            }
        }
        return false;
View Full Code Here

        }
        return false;
    }
   
    public User getUsuario(String user, String pass){
        DaoUser daoUser = new DaoUser();
        for(User u: daoUser.FindAllUser()){
            if(u.getUser().equals(user)&& u.getPass().equals(pass)){
                return u;
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of dao.DaoUser

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.