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:
- Serialized Form
-
-
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
Constructors Constructor Description JpaLockEntity()
No-argument constructor, used by hibernate to instantiate entities.JpaLockEntity(UUID id, int version, Integer entityVersion, String name)
JpaLockEntity(DeepCloner cloner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Integer
getCurrentSchemaVersion()
Integer
getEntityVersion()
String
getId()
String
getKeycloakInstanceIdentifier()
String
getName()
Long
getTimeAcquired()
int
getVersion()
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
isMetadataInitialized()
void
setEntityVersion(Integer entityVersion)
void
setId(String id)
void
setKeycloakInstanceIdentifier(String keycloakInstanceIdentifier)
void
setName(String name)
void
setTimeAcquired(Long timeAcquired)
-
Methods inherited from class org.keycloak.models.map.common.UpdatableEntity.Impl
clearUpdatedFlag, isUpdated
-
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
-
-
-
-
Constructor Detail
-
JpaLockEntity
public JpaLockEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaLockEntity
public JpaLockEntity(DeepCloner cloner)
-
-
Method Detail
-
isMetadataInitialized
public boolean isMetadataInitialized()
-
getEntityVersion
public Integer getEntityVersion()
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
getCurrentSchemaVersion
public Integer getCurrentSchemaVersion()
- Specified by:
getCurrentSchemaVersion
in interfaceJpaRootEntity
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- 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
public String getId()
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapLockEntity.AbstractLockEntity
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapLockEntity.AbstractLockEntity
-
getName
public String getName()
- Specified by:
getName
in interfaceMapLockEntity
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceMapLockEntity
-
getKeycloakInstanceIdentifier
public String getKeycloakInstanceIdentifier()
- Specified by:
getKeycloakInstanceIdentifier
in interfaceMapLockEntity
-
setKeycloakInstanceIdentifier
public void setKeycloakInstanceIdentifier(String keycloakInstanceIdentifier)
- Specified by:
setKeycloakInstanceIdentifier
in interfaceMapLockEntity
-
getTimeAcquired
public Long getTimeAcquired()
- Specified by:
getTimeAcquired
in interfaceMapLockEntity
-
setTimeAcquired
public void setTimeAcquired(Long timeAcquired)
- Specified by:
setTimeAcquired
in interfaceMapLockEntity
-
-