Package daos.common

Class LoginAttemptDao


  • @Singleton
    public class LoginAttemptDao
    extends AbstractDao
    DAO for LoginAttempt entity
    • Method Detail

      • create

        public void create​(LoginAttempt loginAttempt)
      • update

        public void update​(LoginAttempt loginAttempt)
      • remove

        public void remove​(LoginAttempt loginAttempt)
      • removeByUsername

        public void removeByUsername​(java.lang.String username)
      • removeOldAttempts

        public void removeOldAttempts()
        Removes all LoginAttempts that are older than 1 minute
      • countLoginAttemptsOfLastMin

        public int countLoginAttemptsOfLastMin​(java.lang.String username,
                                               java.lang.String remoteAddress)
        Returns the count of LoginAttempts that happened within the last minute for the given username and remoteAddress