Package data

Examples of data.UserController


        readDictionary(NounDictionary);
        return NounDictionary;
    }

     public VerbDictionary createVerbDictionary(int userID) {
        UserController _uc = new UserController();
        BufferedReader added = _uc.getVerbs(userID);
    FileControllerD _fc = new FileControllerD();
    BufferedReader verbs = _fc.getFileR(_path+"files"+_sep+"verbs.txt");
    BufferedReader irregulars = _fc.getFileR(_path+"files"+_sep+"irregulars.txt");
        VerbDictionary _vd = new VerbDictionary();
        _vd.inicialize(verbs, irregulars, added);
View Full Code Here


        }
    return singleton;
  }

    public void initUserLog() {
      UserController u = new UserController();
      u.initUserLog();
    }
View Full Code Here

      UserController u = new UserController();
      u.initUserLog();
    }

  public void register(int id, String name, String password) {
    UserController u = new UserController();
    u.register(id,name,password);
    }
View Full Code Here

    UserController u = new UserController();
    u.register(id,name,password);
    }

  public boolean checkAvailability(String name) {
    UserController u = new UserController();
    boolean res = u.checkAvailavility(name);
    return res;
  }
View Full Code Here

    boolean res = u.checkAvailavility(name);
    return res;
  }

  private void updateUser(int id, String name, String pass) {
    UserController u = new UserController();
    u.updateUser(id, name, pass);
  }
View Full Code Here

    UserController u = new UserController();
    u.updateUser(id, name, pass);
  }

  public int getNextID() {
    UserController u = new UserController();
    int id = u.getNextID();
    return id;
  }
View Full Code Here

    * @return retorna l'id de l'usuari amb el nom d'usuari name i la contrasenya pass,
  * si l'usuari no existeix retorna 0
    * @throws si hi ha un error retorna -1
    */
  public int login(String user, String pass) {
    UserController u = new UserController();
    int res = u.checkLogin(user, pass);
    if (res != 0) {
      usuari = new User();
      usuari.setID(res);
      usuari.setName(user);
      usuari.setPassword(pass);
      UserController uc = new UserController();
      Constants.setN(uc.getN(res));
      Constants.setGAMMA(uc.getG(res));
      Constants.setSUGGESTIONS(uc.getS(res));
      StatisticDomainController sc = new StatisticDomainController();
      sc.loadStatistics(res);
    }
    return res;
  }
View Full Code Here

    String name = usuari.getName();
    String pass = usuari.getPassword();
    updateUser(id,name,pass);
    usuari = null;
    if (id != 0) {
      UserController uc = new UserController();
      uc.setN(id, Constants.getN());
      uc.setG(id, Constants.getGAMMA());
      uc.setS(id, Constants.getSUGGESTIONS());
      StatisticDomainController sc = new StatisticDomainController();
      sc.saveStatistics(id);
    }
  }
View Full Code Here

    }
  }


  public BufferedReader getVerbs(int id) {
    UserController u = new UserController();
    BufferedReader res = u.getVerbs(id);
    return res;
  }
View Full Code Here

    public void changeUsername(String name) {
    usuari.setName(name);
    }

    public void deleteUser(int id) {
    UserController u = new UserController();
    u.deleteUser(id);
    }
View Full Code Here

TOP

Related Classes of data.UserController

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.