Class JpaComponentEntity
- java.lang.Object
- 
- org.keycloak.models.map.common.UpdatableEntity.Impl
- 
- org.keycloak.models.map.storage.jpa.realm.entity.JpaComponentEntity
 
 
- 
- All Implemented Interfaces:
- Serializable,- AbstractEntity,- UpdatableEntity,- MapComponentEntity,- JpaChildEntity<JpaRealmEntity>,- JpaRootEntity,- JpaRootVersionedEntity
 
 @Entity public class JpaComponentEntity extends UpdatableEntity.Impl implements MapComponentEntity, JpaRootVersionedEntity, JpaChildEntity<JpaRealmEntity> JPAMapComponentEntityimplementation. 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. Components are independent (i.e. a component doesn't depend on another component) and can be manipulated directly via the component endpoints. By implementingJpaRootVersionedEntity, this entity will enforce optimistic locking, which can lead toOptimisticLockExceptionif more than one thread attempts to modify the same component at the same time.- Author:
- Stefan Guilhen
- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.keycloak.models.map.common.UpdatableEntityUpdatableEntity.Impl
 
- 
 - 
Field Summary- 
Fields inherited from class org.keycloak.models.map.common.UpdatableEntity.Implupdated
 
- 
 - 
Constructor SummaryConstructors Constructor Description JpaComponentEntity()No-argument constructor, used by hibernate to instantiate entities.JpaComponentEntity(DeepCloner cloner)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Map<String,List<String>>getConfig()IntegergetCurrentSchemaVersion()IntegergetEntityVersion()StringgetId()StringgetName()JpaRealmEntitygetParent()Parent entity that should get its optimistic locking version updated upon changes in the childStringgetParentId()StringgetProviderId()StringgetProviderType()StringgetSubType()intgetVersion()Version of the JPA entity used for optimistic lockinginthashCode()booleanisMetadataInitialized()voidsetConfig(Map<String,List<String>> config)voidsetEntityVersion(Integer version)voidsetId(String id)voidsetName(String name)voidsetParent(JpaRealmEntity root)voidsetParentId(String parentId)voidsetProviderId(String providerId)voidsetProviderType(String providerType)voidsetSubType(String subType)- 
Methods inherited from class org.keycloak.models.map.common.UpdatableEntity.ImplclearUpdatedFlag, isUpdated
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.keycloak.models.map.storage.jpa.JpaRootEntityupdateEntityVersion
 - 
Methods inherited from interface org.keycloak.models.map.common.UpdatableEntityclearUpdatedFlag, isUpdated
 
- 
 
- 
- 
- 
Constructor Detail- 
JpaComponentEntitypublic JpaComponentEntity() No-argument constructor, used by hibernate to instantiate entities.
 - 
JpaComponentEntitypublic JpaComponentEntity(DeepCloner cloner) 
 
- 
 - 
Method Detail- 
getParentpublic JpaRealmEntity getParent() Description copied from interface:JpaChildEntityParent entity that should get its optimistic locking version updated upon changes in the child- Specified by:
- getParentin interface- JpaChildEntity<JpaRealmEntity>
 
 - 
setParentpublic void setParent(JpaRealmEntity root) 
 - 
isMetadataInitializedpublic boolean isMetadataInitialized() 
 - 
getIdpublic String getId() - Specified by:
- getIdin interface- AbstractEntity
 
 - 
setIdpublic void setId(String id) - Specified by:
- setIdin interface- AbstractEntity
 
 - 
getEntityVersionpublic Integer getEntityVersion() - Specified by:
- getEntityVersionin interface- JpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
 
 - 
setEntityVersionpublic void setEntityVersion(Integer version) - Specified by:
- setEntityVersionin interface- JpaRootEntity
- Parameters:
- version- sets current supported version to JPA entity.
 
 - 
getVersionpublic int getVersion() Description copied from interface:JpaRootVersionedEntityVersion of the JPA entity used for optimistic locking- Specified by:
- getVersionin interface- JpaRootVersionedEntity
 
 - 
getCurrentSchemaVersionpublic Integer getCurrentSchemaVersion() - Specified by:
- getCurrentSchemaVersionin interface- JpaRootEntity
 
 - 
getNamepublic String getName() - Specified by:
- getNamein interface- MapComponentEntity
 
 - 
setNamepublic void setName(String name) - Specified by:
- setNamein interface- MapComponentEntity
 
 - 
getProviderIdpublic String getProviderId() - Specified by:
- getProviderIdin interface- MapComponentEntity
 
 - 
setProviderIdpublic void setProviderId(String providerId) - Specified by:
- setProviderIdin interface- MapComponentEntity
 
 - 
getProviderTypepublic String getProviderType() - Specified by:
- getProviderTypein interface- MapComponentEntity
 
 - 
setProviderTypepublic void setProviderType(String providerType) - Specified by:
- setProviderTypein interface- MapComponentEntity
 
 - 
getSubTypepublic String getSubType() - Specified by:
- getSubTypein interface- MapComponentEntity
 
 - 
setSubTypepublic void setSubType(String subType) - Specified by:
- setSubTypein interface- MapComponentEntity
 
 - 
getParentIdpublic String getParentId() - Specified by:
- getParentIdin interface- MapComponentEntity
 
 - 
setParentIdpublic void setParentId(String parentId) - Specified by:
- setParentIdin interface- MapComponentEntity
 
 - 
getConfigpublic Map<String,List<String>> getConfig() - Specified by:
- getConfigin interface- MapComponentEntity
 
 - 
setConfigpublic void setConfig(Map<String,List<String>> config) - Specified by:
- setConfigin interface- MapComponentEntity
 
 
- 
 
-