Package com.Yasna.forum.Exceptions

Examples of com.Yasna.forum.Exceptions.UserBlackListedException


            ResultSet rs = pstmt.executeQuery();
            if(rs.next()){
                pstmt = con.prepareStatement(UPDATE_BLACK_LIST_IP);
                pstmt.setString(1,clientIP.getRemoteIP());
                pstmt.executeUpdate();
                throw new UserBlackListedException("User Black Listed Error. The IP address "+clientIP.getRemoteIP()+" has been black listed");
            }
            pstmt = con.prepareStatement(CHECK_BLACK_LIST_USER);
            pstmt.setInt(1,user.getID());
            pstmt.setString(2,"BLOCKED");
            pstmt.setString(3,"true");
            rs = pstmt.executeQuery();
            if(rs.next()){
                throw new UserBlackListedException("User Black Listed Error. This user has been black listed from the sytem");
            }
        }
        catch( SQLException sqle ) {
            System.err.println("an error occured in DbForumMessage (0935):"+sqle.getMessage());
            sqle.printStackTrace();
View Full Code Here

TOP

Related Classes of com.Yasna.forum.Exceptions.UserBlackListedException

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.