Package org.keycloak.models.jpa
Class UserAdapter
java.lang.Object
org.keycloak.models.jpa.UserAdapter
- All Implemented Interfaces:
JpaModel<UserEntity>,RoleMapperModel,UserModel
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.models.UserModel
UserModel.RequiredAction, UserModel.UserRemovedEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManagerprotected RealmModelprotected UserEntityFields inherited from interface org.keycloak.models.UserModel
COMPARE_BY_USERNAME, DISABLED_REASON, EMAIL, EMAIL_VERIFIED, ENABLED, EXACT, FIRST_NAME, GROUPS, IDP_ALIAS, IDP_USER_ID, INCLUDE_SERVICE_ACCOUNT, LAST_NAME, LOCALE, SEARCH, USERNAME -
Constructor Summary
ConstructorsConstructorDescriptionUserAdapter(KeycloakSession session, RealmModel realm, jakarta.persistence.EntityManager em, UserEntity user) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequiredAction(String actionName) voiddeleteRoleMapping(RoleModel role) booleangetAttributeStream(String name) getEmail()getFirstAttribute(String name) longlonggetGroupsCountByNameContaining(String search) getGroupsStream(String search, Integer first, Integer max) getId()protected jakarta.persistence.TypedQuery<UserGroupMembershipEntity>protected jakarta.persistence.TypedQuery<UserRoleMappingEntity>voidvoidgrantRoleImpl(RoleModel role) inthashCode()booleanbooleanbooleanbooleanisMemberOf(GroupModel group) voidjoinGroup(GroupModel group) protected voidjoinGroupImpl(GroupModel group) voidleaveGroup(GroupModel group) voidremoveAttribute(String name) voidremoveRequiredAction(String actionName) voidsetAttribute(String name, List<String> values) voidsetCreatedTimestamp(Long timestamp) voidvoidsetEmailVerified(boolean verified) voidsetEnabled(boolean enabled) voidsetFederationLink(String link) voidsetFirstName(String firstName) voidsetLastName(String lastName) voidsetServiceAccountClientLink(String clientInternalId) voidsetSingleAttribute(String name, String value) voidsetUsername(String username) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.models.RoleMapperModel
hasDirectRoleMethods inherited from interface org.keycloak.models.UserModel
addRequiredAction, removeRequiredAction
-
Field Details
-
user
-
em
protected jakarta.persistence.EntityManager em -
realm
-
-
Constructor Details
-
UserAdapter
public UserAdapter(KeycloakSession session, RealmModel realm, jakarta.persistence.EntityManager em, UserEntity user)
-
-
Method Details
-
getEntity
- Specified by:
getEntityin interfaceJpaModel<UserEntity>
-
getId
-
getUsername
- Specified by:
getUsernamein interfaceUserModel
-
setUsername
- Specified by:
setUsernamein interfaceUserModel
-
getCreatedTimestamp
- Specified by:
getCreatedTimestampin interfaceUserModel
-
setCreatedTimestamp
- Specified by:
setCreatedTimestampin interfaceUserModel
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabledin interfaceUserModel
-
setSingleAttribute
- Specified by:
setSingleAttributein interfaceUserModel
-
setAttribute
- Specified by:
setAttributein interfaceUserModel
-
removeAttribute
- Specified by:
removeAttributein interfaceUserModel
-
getFirstAttribute
- Specified by:
getFirstAttributein interfaceUserModel
-
getAttributeStream
- Specified by:
getAttributeStreamin interfaceUserModel
-
getAttributes
- Specified by:
getAttributesin interfaceUserModel
-
getRequiredActionsStream
- Specified by:
getRequiredActionsStreamin interfaceUserModel
-
addRequiredAction
- Specified by:
addRequiredActionin interfaceUserModel
-
removeRequiredAction
- Specified by:
removeRequiredActionin interfaceUserModel
-
getFirstName
- Specified by:
getFirstNamein interfaceUserModel
-
setFirstName
- Specified by:
setFirstNamein interfaceUserModel
-
getLastName
- Specified by:
getLastNamein interfaceUserModel
-
setLastName
- Specified by:
setLastNamein interfaceUserModel
-
getEmail
-
setEmail
-
isEmailVerified
public boolean isEmailVerified()- Specified by:
isEmailVerifiedin interfaceUserModel
-
setEmailVerified
public void setEmailVerified(boolean verified) - Specified by:
setEmailVerifiedin interfaceUserModel
-
getGroupsStream
- Specified by:
getGroupsStreamin interfaceUserModel
-
getGroupsStream
- Specified by:
getGroupsStreamin interfaceUserModel
-
getGroupsCount
public long getGroupsCount()- Specified by:
getGroupsCountin interfaceUserModel
-
getGroupsCountByNameContaining
- Specified by:
getGroupsCountByNameContainingin interfaceUserModel
-
joinGroup
-
joinGroupImpl
-
leaveGroup
- Specified by:
leaveGroupin interfaceUserModel
-
isMemberOf
- Specified by:
isMemberOfin interfaceUserModel
-
getUserGroupMappingQuery
protected jakarta.persistence.TypedQuery<UserGroupMembershipEntity> getUserGroupMappingQuery(GroupModel group) -
hasRole
- Specified by:
hasRolein interfaceRoleMapperModel
-
getUserRoleMappingEntityTypedQuery
protected jakarta.persistence.TypedQuery<UserRoleMappingEntity> getUserRoleMappingEntityTypedQuery(RoleModel role) -
grantRole
- Specified by:
grantRolein interfaceRoleMapperModel
-
grantRoleImpl
-
getRealmRoleMappingsStream
- Specified by:
getRealmRoleMappingsStreamin interfaceRoleMapperModel
-
getRoleMappingsStream
- Specified by:
getRoleMappingsStreamin interfaceRoleMapperModel
-
deleteRoleMapping
- Specified by:
deleteRoleMappingin interfaceRoleMapperModel
-
getClientRoleMappingsStream
- Specified by:
getClientRoleMappingsStreamin interfaceRoleMapperModel
-
getFederationLink
- Specified by:
getFederationLinkin interfaceUserModel
-
setFederationLink
- Specified by:
setFederationLinkin interfaceUserModel
-
getServiceAccountClientLink
- Specified by:
getServiceAccountClientLinkin interfaceUserModel
-
setServiceAccountClientLink
- Specified by:
setServiceAccountClientLinkin interfaceUserModel
-
credentialManager
- Specified by:
credentialManagerin interfaceUserModel
-
equals
-
hashCode
public int hashCode()
-