Package org.nemesis.forum.exception

Examples of org.nemesis.forum.exception.UserNotFoundException


        pstmt.setInt(1, id);
      }

      ResultSet rs = pstmt.executeQuery();
      if (!rs.next()) {
        throw new UserNotFoundException("Failed to read user " + id + " from database.");
      }
      this.id = rs.getInt("userID");
      this.username = rs.getString("username");
      this.passwordHash = rs.getString("passwordHash");
      this.name = rs.getString("name");
      this.nameVisible = (rs.getInt("nameVisible") == 1);
      this.email = rs.getString("email");
      this.emailVisible = (rs.getInt("emailVisible") == 1);
    } catch (SQLException sqle) {
      throw new UserNotFoundException("Failed to read user " + id + " from database.", sqle);
    } finally {
      try {
        pstmt.close();
      } catch (Exception e) {
        log.error("" , e);
View Full Code Here

TOP

Related Classes of org.nemesis.forum.exception.UserNotFoundException

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.