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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.map.group.MapGroupEntity
MapGroupEntity.AbstractGroupEntity
-
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 JpaGroupEntity()No-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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGrantedRole(String role)booleanequals(Object obj)List<String>getAttribute(String name)Map<String,List<String>>getAttributes()IntegergetCurrentSchemaVersion()IntegergetEntityVersion()Set<String>getGrantedRoles()StringgetId()StringgetName()StringgetParentId()StringgetRealmId()intgetVersion()Version of the JPA entity used for optimistic lockinginthashCode()booleanisMetadataInitialized()voidremoveAttribute(String name)voidremoveGrantedRole(String role)voidsetAttribute(String name, List<String> values)voidsetAttributes(Map<String,List<String>> attributes)voidsetEntityVersion(Integer entityVersion)voidsetGrantedRoles(Set<String> grantedRoles)voidsetId(String id)voidsetName(String name)voidsetParentId(String parentId)voidsetRealmId(String realmId)-
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
-
JpaGroupEntity
public JpaGroupEntity()
No-argument constructor, used by hibernate to instantiate entities.
-
JpaGroupEntity
public JpaGroupEntity(DeepCloner cloner)
-
-
Method Detail
-
isMetadataInitialized
public boolean isMetadataInitialized()
-
getEntityVersion
public Integer getEntityVersion()
- Specified by:
getEntityVersionin interfaceJpaRootEntity- Returns:
- current supported version of the JPA entity used for schema versioning.
-
getCurrentSchemaVersion
public Integer getCurrentSchemaVersion()
- Specified by:
getCurrentSchemaVersionin interfaceJpaRootEntity
-
setEntityVersion
public void setEntityVersion(Integer entityVersion)
- 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
public String getId()
- Specified by:
getIdin interfaceAbstractEntity- Overrides:
getIdin classMapGroupEntity.AbstractGroupEntity
-
setId
public void setId(String id)
- Specified by:
setIdin interfaceAbstractEntity- Overrides:
setIdin classMapGroupEntity.AbstractGroupEntity
-
getRealmId
public String getRealmId()
- Specified by:
getRealmIdin interfaceMapGroupEntity
-
setRealmId
public void setRealmId(String realmId)
- Specified by:
setRealmIdin interfaceMapGroupEntity
-
getName
public String getName()
- Specified by:
getNamein interfaceMapGroupEntity
-
setName
public void setName(String name)
- Specified by:
setNamein interfaceMapGroupEntity
-
setParentId
public void setParentId(String parentId)
- Specified by:
setParentIdin interfaceMapGroupEntity
-
getParentId
public String getParentId()
- Specified by:
getParentIdin interfaceMapGroupEntity
-
getGrantedRoles
public Set<String> getGrantedRoles()
- Specified by:
getGrantedRolesin interfaceMapGroupEntity
-
setGrantedRoles
public void setGrantedRoles(Set<String> grantedRoles)
- Specified by:
setGrantedRolesin interfaceMapGroupEntity
-
addGrantedRole
public void addGrantedRole(String role)
- Specified by:
addGrantedRolein interfaceMapGroupEntity
-
removeGrantedRole
public void removeGrantedRole(String role)
- Specified by:
removeGrantedRolein interfaceMapGroupEntity
-
getAttributes
public Map<String,List<String>> getAttributes()
- Specified by:
getAttributesin interfaceEntityWithAttributes
-
setAttributes
public void setAttributes(Map<String,List<String>> attributes)
- Specified by:
setAttributesin interfaceEntityWithAttributes
-
getAttribute
public List<String> getAttribute(String name)
- Specified by:
getAttributein interfaceEntityWithAttributes
-
setAttribute
public void setAttribute(String name, List<String> values)
- Specified by:
setAttributein interfaceEntityWithAttributes
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfaceEntityWithAttributes
-
-