Class JpaUserLoginFailureEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.loginFailure.MapUserLoginFailureEntity.AbstractUserLoginFailureEntity
org.keycloak.models.map.storage.jpa.loginFailure.entity.JpaUserLoginFailureEntity
- All Implemented Interfaces:
Serializable
,AbstractEntity
,UpdatableEntity
,MapUserLoginFailureEntity
,JpaRootEntity
,JpaRootVersionedEntity
@Entity
public class JpaUserLoginFailureEntity
extends MapUserLoginFailureEntity.AbstractUserLoginFailureEntity
implements JpaRootVersionedEntity
JPA
MapUserLoginFailureEntity
implementation. Some fields are annotated with @Column(insertable = false, updatable = false)
to indicate that they are automatically generated from json fields. As such, these fields are non-insertable and non-updatable.- Author:
- Stefan Guilhen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.map.loginFailure.MapUserLoginFailureEntity
MapUserLoginFailureEntity.AbstractUserLoginFailureEntity
Nested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntity
UpdatableEntity.Impl
-
Field Summary
Fields inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
updated
-
Constructor Summary
ConstructorDescriptionNo-argument constructor, used by hibernate to instantiate entities.JpaUserLoginFailureEntity
(UUID id, int version, Integer entityVersion, String realmId, String userId) Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaUserLoginFailureEntity
(DeepCloner cloner) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
int
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
void
setEntityVersion
(Integer entityVersion) void
setFailedLoginNotBefore
(Long failedLoginNotBefore) void
void
setLastFailure
(Long lastFailure) void
setLastIPFailure
(String lastIPFailure) void
setNumFailures
(Integer numFailures) void
setRealmId
(String realmId) void
Methods inherited from class org.keycloak.models.map.loginFailure.MapUserLoginFailureEntity.AbstractUserLoginFailureEntity
clearFailures
Methods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
clearUpdatedFlag, isUpdated, markUpdatedFlag
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntity
updateEntityVersion
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntity
clearUpdatedFlag, isUpdated, markUpdatedFlag
-
Constructor Details
-
JpaUserLoginFailureEntity
public JpaUserLoginFailureEntity()No-argument constructor, used by hibernate to instantiate entities. -
JpaUserLoginFailureEntity
-
JpaUserLoginFailureEntity
public JpaUserLoginFailureEntity(UUID id, int version, Integer entityVersion, String realmId, String userId) Used by hibernate when calling cb.construct from read(QueryParameters) method. It is used to select user login failure without metadata(json) field.
-
-
Method Details
-
isMetadataInitialized
public boolean isMetadataInitialized() -
getEntityVersion
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
- Specified by:
getCurrentSchemaVersion
in interfaceJpaRootEntity
-
getVersion
public int getVersion()Description copied from interface:JpaRootVersionedEntity
Version of the JPA entity used for optimistic locking- Specified by:
getVersion
in interfaceJpaRootVersionedEntity
-
getId
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapUserLoginFailureEntity.AbstractUserLoginFailureEntity
-
setId
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapUserLoginFailureEntity.AbstractUserLoginFailureEntity
-
getRealmId
- Specified by:
getRealmId
in interfaceMapUserLoginFailureEntity
-
setRealmId
- Specified by:
setRealmId
in interfaceMapUserLoginFailureEntity
-
getUserId
- Specified by:
getUserId
in interfaceMapUserLoginFailureEntity
-
setUserId
- Specified by:
setUserId
in interfaceMapUserLoginFailureEntity
-
getFailedLoginNotBefore
- Specified by:
getFailedLoginNotBefore
in interfaceMapUserLoginFailureEntity
-
setFailedLoginNotBefore
- Specified by:
setFailedLoginNotBefore
in interfaceMapUserLoginFailureEntity
-
getNumFailures
- Specified by:
getNumFailures
in interfaceMapUserLoginFailureEntity
-
setNumFailures
- Specified by:
setNumFailures
in interfaceMapUserLoginFailureEntity
-
getLastFailure
- Specified by:
getLastFailure
in interfaceMapUserLoginFailureEntity
-
setLastFailure
- Specified by:
setLastFailure
in interfaceMapUserLoginFailureEntity
-
getLastIPFailure
- Specified by:
getLastIPFailure
in interfaceMapUserLoginFailureEntity
-
setLastIPFailure
- Specified by:
setLastIPFailure
in interfaceMapUserLoginFailureEntity
-
hashCode
public int hashCode() -
equals
-