Used to increment bad submission counter in DB. DB will handle point deductions once the counter hits 40 @param ApplicationRoot application running context @param userId user identifier to increment @return False if the statement fails to execute
(String ApplicationRoot, String userId)
| 100 | * @return False if the statement fails to execute |
| 101 | */ |
| 102 | public static boolean incrementBadSubmission(String ApplicationRoot, String userId) |
| 103 | { |
| 104 | log.debug("*** Setter.incrementBadSubmission ***"); |
| 105 | |
| 106 | boolean result = false; |
| 107 | Connection conn = Database.getCoreConnection(ApplicationRoot); |
| 108 | try |
| 109 | { |
| 110 | log.debug("Prepairing bad Submission call"); |
| 111 | PreparedStatement callstmnt = conn.prepareCall("CALL userBadSubmission(?)"); |
| 112 | callstmnt.setString(1, userId); |
| 113 | log.debug("Executing userBadSubmission statement on id '" + userId + "'"); |
| 114 | callstmnt.execute(); |
| 115 | result = true; |
| 116 | } |
| 117 | catch(SQLException e) |
| 118 | { |
| 119 | log.error("userBadSubmission Failure: " + e.toString()); |
| 120 | result = false; |
| 121 | } |
| 122 | Database.closeConnection(conn); |
| 123 | log.debug("*** END userBadSubmisison ***"); |
| 124 | return result; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * This method sets every module status to Open. |