Package daos.common
Class LoginAttemptDao
- java.lang.Object
-
- daos.common.AbstractDao
-
- daos.common.LoginAttemptDao
-
@Singleton public class LoginAttemptDao extends AbstractDao
DAO for LoginAttempt entity
-
-
Field Summary
-
Fields inherited from class daos.common.AbstractDao
jpa
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountLoginAttemptsOfLastMin(java.lang.String username, java.lang.String remoteAddress)Returns the count of LoginAttempts that happened within the last minute for the given username and remoteAddressvoidcreate(LoginAttempt loginAttempt)LoginAttemptfind(java.lang.Long id)voidremove(LoginAttempt loginAttempt)voidremoveByUsername(java.lang.String username)voidremoveOldAttempts()Removes all LoginAttempts that are older than 1 minutevoidupdate(LoginAttempt loginAttempt)
-
-
-
Method Detail
-
create
public void create(LoginAttempt loginAttempt)
-
update
public void update(LoginAttempt loginAttempt)
-
remove
public void remove(LoginAttempt loginAttempt)
-
find
public LoginAttempt find(java.lang.Long id)
-
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
-
-