Class JpaGroupEntity
java.lang.Object
org.keycloak.models.map.common.UpdatableEntity.Impl
org.keycloak.models.map.group.MapGroupEntity.AbstractGroupEntity
org.keycloak.models.map.storage.jpa.group.entity.JpaGroupEntity
- All Implemented Interfaces:
Serializable,AbstractEntity,EntityWithAttributes,UpdatableEntity,MapGroupEntity,JpaRootEntity,JpaRootVersionedEntity
@Entity
public class JpaGroupEntity
extends MapGroupEntity.AbstractGroupEntity
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.group.MapGroupEntity
MapGroupEntity.AbstractGroupEntityNested 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.JpaGroupEntity(UUID id, int version, Integer entityVersion, String realmId, String name, String parentId) Used by hibernate when calling cb.construct from read(QueryParameters) method.JpaGroupEntity(DeepCloner cloner) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGrantedRole(String role) booleangetAttribute(String name) getId()getName()intVersion of the JPA entity used for optimistic lockinginthashCode()booleanvoidremoveAttribute(String name) voidremoveGrantedRole(String role) voidsetAttribute(String name, List<String> values) voidsetAttributes(Map<String, List<String>> attributes) voidsetEntityVersion(Integer entityVersion) voidsetGrantedRoles(Set<String> grantedRoles) voidvoidvoidsetParentId(String parentId) voidsetRealmId(String realmId) 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.common.UpdatableEntity
clearUpdatedFlag, isUpdated, markUpdatedFlag
-
Constructor Details
-
JpaGroupEntity
public JpaGroupEntity()No-argument constructor, used by hibernate to instantiate entities. -
JpaGroupEntity
-
JpaGroupEntity
public JpaGroupEntity(UUID id, int version, Integer entityVersion, String realmId, String name, String parentId) Used by hibernate when calling cb.construct from read(QueryParameters) method. It is used to select group without metadata(json) field.
-
-
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 classMapGroupEntity.AbstractGroupEntity
-
setId
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapGroupEntity.AbstractGroupEntity
-
getRealmId
- Specified by:
getRealmIdin interfaceMapGroupEntity
-
setRealmId
- Specified by:
setRealmIdin interfaceMapGroupEntity
-
getName
- Specified by:
getNamein interfaceMapGroupEntity
-
setName
- Specified by:
setNamein interfaceMapGroupEntity
-
setParentId
- Specified by:
setParentIdin interfaceMapGroupEntity
-
getParentId
- Specified by:
getParentIdin interfaceMapGroupEntity
-
getGrantedRoles
- Specified by:
getGrantedRolesin interfaceMapGroupEntity
-
setGrantedRoles
- Specified by:
setGrantedRolesin interfaceMapGroupEntity
-
addGrantedRole
- Specified by:
addGrantedRolein interfaceMapGroupEntity
-
removeGrantedRole
- Specified by:
removeGrantedRolein interfaceMapGroupEntity
-
getAttributes
- Specified by:
getAttributesin interfaceEntityWithAttributes
-
setAttributes
- Specified by:
setAttributesin interfaceEntityWithAttributes
-
getAttribute
- Specified by:
getAttributein interfaceEntityWithAttributes
-
setAttribute
- Specified by:
setAttributein interfaceEntityWithAttributes
-
removeAttribute
- Specified by:
removeAttributein interfaceEntityWithAttributes
-
hashCode
public int hashCode() -
equals
-