Class JpaLockEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.lock.MapLockEntity.AbstractLockEntity
org.keycloak.models.map.storage.jpa.lock.entity.JpaLockEntity
- All Implemented Interfaces:
Serializable
,AbstractEntity
,UpdatableEntity
,MapLockEntity
,JpaRootEntity
,JpaRootVersionedEntity
@Entity
public class JpaLockEntity
extends MapLockEntity.AbstractLockEntity
implements JpaRootVersionedEntity
There are some fields marked by
@Column(insertable = false, updatable = false)
.
Those fields are automatically generated by database from json field,
therefore marked as non-insertable and non-updatable to instruct hibernate.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.map.lock.MapLockEntity
MapLockEntity.AbstractLockEntity, MapLockEntity.SearchableFields
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.JpaLockEntity
(UUID id, int version, Integer entityVersion, String name) JpaLockEntity
(DeepCloner cloner) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
getName()
int
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
void
setEntityVersion
(Integer entityVersion) void
void
setKeycloakInstanceIdentifier
(String keycloakInstanceIdentifier) void
void
setTimeAcquired
(Long timeAcquired) 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.lock.MapLockEntity
isLockUnchanged
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntity
clearUpdatedFlag, isUpdated, markUpdatedFlag
-
Constructor Details
-
JpaLockEntity
public JpaLockEntity()No-argument constructor, used by hibernate to instantiate entities. -
JpaLockEntity
-
JpaLockEntity
-
-
Method Details
-
isMetadataInitialized
public boolean isMetadataInitialized() -
getEntityVersion
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
getCurrentSchemaVersion
- Specified by:
getCurrentSchemaVersion
in interfaceJpaRootEntity
-
setEntityVersion
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
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 classMapLockEntity.AbstractLockEntity
-
setId
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapLockEntity.AbstractLockEntity
-
getName
- Specified by:
getName
in interfaceMapLockEntity
-
setName
- Specified by:
setName
in interfaceMapLockEntity
-
getKeycloakInstanceIdentifier
- Specified by:
getKeycloakInstanceIdentifier
in interfaceMapLockEntity
-
setKeycloakInstanceIdentifier
- Specified by:
setKeycloakInstanceIdentifier
in interfaceMapLockEntity
-
getTimeAcquired
- Specified by:
getTimeAcquired
in interfaceMapLockEntity
-
setTimeAcquired
- Specified by:
setTimeAcquired
in interfaceMapLockEntity
-
hashCode
public int hashCode() -
equals
-