if(loginAttempt<4 && !loginStatus.equals("Locked") ){ statement = connection.prepareStatement("update user_data_management set attempt=?,status =? where user_code=? "); if (loginStatus.equals("Logged")) throw new UserAlreadyLoggedIn(); else statement.setInt(1, loginAttempt); statement.setString(2, "Open"); statement.setString(3,userID); statement.executeUpdate(); throw new PasswordNotValidException(); }else{ statement = connection.prepareStatement("update user_data_management set status =? where user_code=? "); statement.setString(1,"Locked"); statement.setString(2,userID); statement.executeUpdate(); throw new UserLockedException("Your LoginId and Password is blocked"); } } }else throw new PasswordNotValidException(); }catch (SQLException e) { e.printStackTrace(); throw new DataRetrievalFailureException();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)