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.SearchableFieldsNested 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
ConstructorsConstructorDescriptionNo-argument constructor, used by hibernate to instantiate entities.JpaLockEntity(UUID id, int version, Integer entityVersion, String name) JpaLockEntity(DeepCloner cloner) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()getName()intVersion of the JPA entity used for optimistic lockinginthashCode()booleanvoidsetEntityVersion(Integer entityVersion) voidvoidsetKeycloakInstanceIdentifier(String keycloakInstanceIdentifier) voidvoidsetTimeAcquired(Long timeAcquired) Methods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
clearUpdatedFlag, isUpdated, markUpdatedFlagMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntity
updateEntityVersionMethods inherited from interface org.keycloak.models.map.lock.MapLockEntity
isLockUnchangedMethods 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:
getEntityVersionin interfaceJpaRootEntity- Returns:
- current supported version of the JPA entity used for schema versioning.
-
getCurrentSchemaVersion
- Specified by:
getCurrentSchemaVersionin interfaceJpaRootEntity
-
setEntityVersion
- Specified by:
setEntityVersionin interfaceJpaRootEntity- Parameters:
entityVersion- sets current supported version to JPA entity.
-
getVersion
public int getVersion()Description copied from interface:JpaRootVersionedEntityVersion of the JPA entity used for optimistic locking- Specified by:
getVersionin interfaceJpaRootVersionedEntity
-
getId
- Specified by:
getIdin interfaceAbstractEntity- Overrides:
getIdin classMapLockEntity.AbstractLockEntity
-
setId
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapLockEntity.AbstractLockEntity
-
getName
- Specified by:
getNamein interfaceMapLockEntity
-
setName
- Specified by:
setNamein interfaceMapLockEntity
-
getKeycloakInstanceIdentifier
- Specified by:
getKeycloakInstanceIdentifierin interfaceMapLockEntity
-
setKeycloakInstanceIdentifier
- Specified by:
setKeycloakInstanceIdentifierin interfaceMapLockEntity
-
getTimeAcquired
- Specified by:
getTimeAcquiredin interfaceMapLockEntity
-
setTimeAcquired
- Specified by:
setTimeAcquiredin interfaceMapLockEntity
-
hashCode
public int hashCode() -
equals
-