Class JpaScopeEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.authorization.entity.MapScopeEntity.AbstractMapScopeEntity
org.keycloak.models.map.storage.jpa.authorization.scope.entity.JpaScopeEntity
- All Implemented Interfaces:
Serializable
,MapScopeEntity
,AbstractEntity
,UpdatableEntity
,JpaRootEntity
,JpaRootVersionedEntity
@Entity
public class JpaScopeEntity
extends MapScopeEntity.AbstractMapScopeEntity
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.authorization.entity.MapScopeEntity
MapScopeEntity.AbstractMapScopeEntity
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
ConstructorsConstructorDescriptionNo-argument constructor, used by hibernate to instantiate entities.JpaScopeEntity
(UUID id, int version, Integer entityVersion, String realmId, UUID resourceServerId, String name) Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaScopeEntity
(DeepCloner cloner) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
getName()
int
Version of the JPA entity used for optimistic lockingint
hashCode()
boolean
void
setDisplayName
(String displayName) void
setEntityVersion
(Integer entityVersion) void
setIconUri
(String iconUri) void
void
void
setRealmId
(String realmId) void
setResourceServerId
(String resourceServerId) 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.common.UpdatableEntity
clearUpdatedFlag, isUpdated, markUpdatedFlag
-
Constructor Details
-
JpaScopeEntity
public JpaScopeEntity()No-argument constructor, used by hibernate to instantiate entities. -
JpaScopeEntity
-
JpaScopeEntity
public JpaScopeEntity(UUID id, int version, Integer entityVersion, String realmId, UUID resourceServerId, String name) Used by hibernate when calling cb.construct from read(QueryParameters) method. It is used to select object without metadata(json) field.
-
-
Method Details
-
isMetadataInitialized
public boolean isMetadataInitialized() -
getEntityVersion
- Specified by:
getEntityVersion
in interfaceJpaRootEntity
- Returns:
- current supported version of the JPA entity used for schema versioning.
-
setEntityVersion
- Specified by:
setEntityVersion
in interfaceJpaRootEntity
- Parameters:
entityVersion
- sets current supported version to JPA entity.
-
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
- Specified by:
getId
in interfaceAbstractEntity
- Overrides:
getId
in classMapScopeEntity.AbstractMapScopeEntity
-
setId
- Specified by:
setId
in interfaceAbstractEntity
- Overrides:
setId
in classMapScopeEntity.AbstractMapScopeEntity
-
getRealmId
- Specified by:
getRealmId
in interfaceMapScopeEntity
-
setRealmId
- Specified by:
setRealmId
in interfaceMapScopeEntity
-
getResourceServerId
- Specified by:
getResourceServerId
in interfaceMapScopeEntity
-
setResourceServerId
- Specified by:
setResourceServerId
in interfaceMapScopeEntity
-
getName
- Specified by:
getName
in interfaceMapScopeEntity
-
setName
- Specified by:
setName
in interfaceMapScopeEntity
-
getDisplayName
- Specified by:
getDisplayName
in interfaceMapScopeEntity
-
setDisplayName
- Specified by:
setDisplayName
in interfaceMapScopeEntity
-
getIconUri
- Specified by:
getIconUri
in interfaceMapScopeEntity
-
setIconUri
- Specified by:
setIconUri
in interfaceMapScopeEntity
-
hashCode
public int hashCode() -
equals
-