Class JpaClientScopeEntity
- java.lang.Object
-
- org.keycloak.models.map.common.UpdatableEntity.Impl
-
- org.keycloak.models.map.clientscope.MapClientScopeEntity.AbstractClientScopeEntity
-
- org.keycloak.models.map.storage.jpa.clientScope.entity.JpaClientScopeEntity
-
- All Implemented Interfaces:
Serializable
,MapClientScopeEntity
,AbstractEntity
,EntityWithAttributes
,UpdatableEntity
,JpaRootEntity
,JpaRootVersionedEntity
@Entity public class JpaClientScopeEntity extends MapClientScopeEntity.AbstractClientScopeEntity 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.clientscope.MapClientScopeEntity
MapClientScopeEntity.AbstractClientScopeEntity
-
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 JpaClientScopeEntity()
No-argument constructor, used by hibernate to instantiate entities.JpaClientScopeEntity(UUID id, int version, Integer entityVersion, String realmId, String name)
Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaClientScopeEntity(DeepCloner cloner)
-
Method Summary
-
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.common.UpdatableEntity
clearUpdatedFlag, isUpdated
-
-
-
-
Constructor Detail
-
JpaClientScopeEntity
public JpaClientScopeEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaClientScopeEntity
public JpaClientScopeEntity(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.
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
getCurrentSchemaVersion
public Integer 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
public String getId()
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapClientScopeEntity.AbstractClientScopeEntity
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapClientScopeEntity.AbstractClientScopeEntity
-
getRealmId
public String getRealmId()
- Specified by:
getRealmId
in interfaceMapClientScopeEntity
-
setRealmId
public void setRealmId(String realmId)
- Specified by:
setRealmId
in interfaceMapClientScopeEntity
-
getProtocolMappers
public Set<MapProtocolMapperEntity> getProtocolMappers()
- Specified by:
getProtocolMappers
in interfaceMapClientScopeEntity
-
getProtocolMapper
public Optional<MapProtocolMapperEntity> getProtocolMapper(String id)
- Specified by:
getProtocolMapper
in interfaceMapClientScopeEntity
-
addProtocolMapper
public void addProtocolMapper(MapProtocolMapperEntity mapping)
- Specified by:
addProtocolMapper
in interfaceMapClientScopeEntity
-
removeProtocolMapper
public void removeProtocolMapper(String id)
- Specified by:
removeProtocolMapper
in interfaceMapClientScopeEntity
-
addScopeMapping
public void addScopeMapping(String id)
- Specified by:
addScopeMapping
in interfaceMapClientScopeEntity
-
removeScopeMapping
public void removeScopeMapping(String id)
- Specified by:
removeScopeMapping
in interfaceMapClientScopeEntity
-
getScopeMappings
public Collection<String> getScopeMappings()
- Specified by:
getScopeMappings
in interfaceMapClientScopeEntity
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceMapClientScopeEntity
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceMapClientScopeEntity
-
getName
public String getName()
- Specified by:
getName
in interfaceMapClientScopeEntity
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceMapClientScopeEntity
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceMapClientScopeEntity
-
setProtocol
public void setProtocol(String protocol)
- Specified by:
setProtocol
in interfaceMapClientScopeEntity
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interfaceEntityWithAttributes
-
setAttribute
public void setAttribute(String name, List<String> values)
- Specified by:
setAttribute
in interfaceEntityWithAttributes
-
getAttribute
public List<String> getAttribute(String name)
- Specified by:
getAttribute
in interfaceEntityWithAttributes
-
getAttributes
public Map<String,List<String>> getAttributes()
- Specified by:
getAttributes
in interfaceEntityWithAttributes
-
setAttributes
public void setAttributes(Map<String,List<String>> attributes)
- Specified by:
setAttributes
in interfaceEntityWithAttributes
-
-