Examples of ForumNotFoundException


Examples of org.nemesis.forum.exception.ForumNotFoundException

        pstmt = con.prepareStatement(LOAD_FORUM_BY_ID);
        pstmt.setInt(1, id);
      }
      ResultSet rs = pstmt.executeQuery();
      if (!rs.next()) {
        throw new ForumNotFoundException("Forum " + getID() + " could not be loaded from the database.");
      }
      id = rs.getInt("forumID");
      name = rs.getString("name");
      description = rs.getString("description");
      this.creationDate = new java.util.Date(Long.parseLong(rs.getString("creationDate").trim()));
      this.modifiedDate = new java.util.Date(Long.parseLong(rs.getString("modifiedDate").trim()));
      moderation = rs.getInt("moderated");
    } catch (SQLException sqle) {
      log.error("",sqle);
      throw new ForumNotFoundException("Forum " + getID() + " could not be loaded from the database.");
    } catch (NumberFormatException nfe) {
      log.error(
        "WARNING: In DbForum.loadFromDb() -- there "
          + "was an error parsing the dates returned from the database. Ensure "
          + "that they're being stored correctly.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.