Resets user bad submission counter to 0 @param ApplicationRoot Application's running context @param userId User Identifier to reset @return
(String ApplicationRoot, String userId)
| 238 | * @return |
| 239 | */ |
| 240 | public static boolean resetBadSubmission(String ApplicationRoot, String userId) |
| 241 | { |
| 242 | log.debug("*** Setter.resetBadSubmission ***"); |
| 243 | |
| 244 | boolean result = false; |
| 245 | Connection conn = Database.getCoreConnection(ApplicationRoot); |
| 246 | try |
| 247 | { |
| 248 | log.debug("Prepairing resetUserBadSubmission call"); |
| 249 | PreparedStatement callstmnt = conn.prepareCall("CALL resetUserBadSubmission(?)"); |
| 250 | callstmnt.setString(1, userId); |
| 251 | log.debug("Executing resetUserBadSubmission statement on id '" + userId + "'"); |
| 252 | callstmnt.execute(); |
| 253 | result = true; |
| 254 | } |
| 255 | catch(SQLException e) |
| 256 | { |
| 257 | log.error("resetUserBadSubmission Failure: " + e.toString()); |
| 258 | result = false; |
| 259 | } |
| 260 | Database.closeConnection(conn); |
| 261 | log.debug("*** END resetBadSubmission ***"); |
| 262 | return result; |
| 263 | } |
| 264 | |
| 265 | /** |
| 266 | * This method converts the default database properties file at applicationRoot/WEB-INF/site.properties |