Package data

Examples of data.User


      InetAddress inetAddress = InetAddress.getLocalHost();
      String ip = inetAddress.getHostAddress().toString();
      //nun mit dem Server connecten und ihm die Logindaten senden!
      user = Datenbank.getInstance().getLoggedUser(tfNickname.getText(),
        User.toHash(new String(pfPasswort.getPassword())));
      newUser = new User(user.getNick(), user.getNachname(), user.getVorname(),
        user.getKlasse(), user.getPwHash(), user.getKoop(), user.getNKoop(),
        user.getPunkteG(), user.getPunkte5(), user.getPunkte10(),
        user.getPunkte20(), user.getPunkte50(), user.getOnline(), ip);
      isOk = true;
      dispose();
View Full Code Here


    throws Exception
  {
    final String sql = "SELECT * FROM benutzer WHERE nick = '" + nick +
      "' AND passwort = '" + pwHash + "'";

    User loggedUser = null;
    Statement stmt = null;
    ResultSet res = null;
    try
    {
      connect();
      stmt = getConnection().createStatement();
      res = stmt.executeQuery(sql);
      if (res.next())
      {
        loggedUser = new User(res);
      }
    }
    finally
    {
      if (res != null)
View Full Code Here

      connect();
      stmt = getConnection().createStatement();
      res = stmt.executeQuery("SELECT * FROM benutzer ORDER BY nick");
      while (res.next())
      {
        users.add(new User(res));
      }
      return users;
    }
    finally
    {
View Full Code Here

      connect();
      stmt = getConnection().createStatement();
      res = stmt.executeQuery("SELECT * FROM benutzer WHERE online=true");
      while (res.next())
      {
        users.add(new User(res));
      }
      return users;
    }
    finally
    {
View Full Code Here

    {
      try
      {
        InetAddress inetAddress = InetAddress.getLocalHost();
        String ip = inetAddress.getHostAddress().toString();
        user = new User(tfNickname.getText(), tfNachname.getText(),
          tfVorname.getText(), cbKlasse.getSelectedItem().toString(),
          new String(pfPasswort.getPassword()), 0, 0, 0, 0, 0,
          0, 0, true, ip);
        isOk = true;
        (new AddUserWorker(user)).execute();
View Full Code Here

TOP

Related Classes of data.User

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.