Class UserDao
java.lang.Object
ru.cg.webbpm.modules.security.api.impl.dao.jooq.BaseDao<org.jooq.Record,User>
ru.cg.webbpm.modules.security.api.impl.dao.jooq.UserDao
- Author:
- latypov
-
Field Summary
Fields inherited from class ru.cg.webbpm.modules.security.api.impl.dao.jooq.BaseDao
dslContext, enrichedRecordMapper, recordMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.jooq.RecordMapper<org.jooq.Record,User> Creates user account record mapper.protected org.jooq.RecordMapper<org.jooq.Record,User> Creates user account record mapper.voidcreateUser(User user) Inserts user into database.protected UserPopulates user instance by OrgUnit instance.getRoleNamesInOrg(String orgUnitCode) Gets all role names of org unit by org unit code.Gets user by user account id.getUserAccountsByRoleNameAndOrgUnitCode(String roleName, String orgUnitCode) Gets users with role name in org unit.getUserByEmail(String email) Gets user by email.getUserByUsername(String username, boolean loginCaseSensitive) Gets user by username.getUserIdsByUsernameAndEmail(String username, String email) Gets user ids by username and email.getUsers(Collection<String> userIds) Gets users by collection of user account ids.getUsers(LoadOptions options) Gets users according to load options.getUserSourceByUserId(String userId) getUsersWithAuthorityIn(Collection<String> authorityIds) getUsersWithGroupIn(Collection<String> groupIds) getUsersWithRoleIn(Collection<String> roleIds) getUserWithAccessLevelId(String accessLevelId) Gets any user with access level id.Gets any existing(not locked) user with max access level (maybe super admin)voidupdateLockedAndEmailConfirmed(String userId, Timestamp updated, boolean locked, boolean emailConfirmed) Updates user's timestamp, emailConfirmed status by user account id.voidupdateUser(User user) Updates user in database.voidupdateUserAccountLocked(Collection<String> userAccountIds, Timestamp updated, boolean locked) Updates user's timestamp, locked status by collection of user account ids.voidupdateUserAccountUpdated(String userId, Timestamp updated) Updates user's timestamp by user account id.
-
Constructor Details
-
UserDao
-
-
Method Details
-
createRecordMapper
Creates user account record mapper.- Specified by:
createRecordMapperin classBaseDao<org.jooq.Record,User> - Returns:
- new record mapper.
-
createEnrichedRecordMapper
Creates user account record mapper.- Overrides:
createEnrichedRecordMapperin classBaseDao<org.jooq.Record,User> - Returns:
- new record mapper.
-
enriched
Populates user instance by OrgUnit instance. -
getUser
Gets user by user account id. -
getUserByUsername
Gets user by username. -
getUserSourceByUserId
-
getUserByEmail
Gets user by email. -
getUserIdsByUsernameAndEmail
Gets user ids by username and email. -
getUserWithAccessLevelId
Gets any user with access level id. -
getUserWithMaxAccessLevel
Gets any existing(not locked) user with max access level (maybe super admin)- Returns:
- requested user or null if does not exist. Instance of
Usertype.
-
getUsers
Gets users according to load options.- Parameters:
options- indicates load option properties. Instance ofLoadOptionstype.- Returns:
- list of users. Instance of
Listtype.
-
getUsers
Gets users by collection of user account ids.- Parameters:
userIds- user account ids of objects to receive. Instance ofCollectiontype.- Returns:
- collection of users. Instance of
Collectiontype.
-
getLdapUsers
-
createUser
Inserts user into database.- Parameters:
user- user to add. Instance ofUsertype.
-
updateUser
Updates user in database. User's username is ignored.- Parameters:
user- user to update. Instance ofUsertype.
-
updateUserAccountLocked
public void updateUserAccountLocked(Collection<String> userAccountIds, Timestamp updated, boolean locked) Updates user's timestamp, locked status by collection of user account ids.- Parameters:
userAccountIds- user account ids of objects to update. Instance ofCollectiontype.updated- updated timestamp of the object. Instance ofTimestamptype.locked- locked status of the object. Instance ofbooleantype.
-
updateUserAccountUpdated
Updates user's timestamp by user account id. -
updateLockedAndEmailConfirmed
public void updateLockedAndEmailConfirmed(String userId, Timestamp updated, boolean locked, boolean emailConfirmed) Updates user's timestamp, emailConfirmed status by user account id. -
getRoleNamesInOrg
Gets all role names of org unit by org unit code. -
getUserAccountsByRoleNameAndOrgUnitCode
Gets users with role name in org unit. -
getUsersWithAuthorityIn
-
getUsersWithRoleIn
-
getUsersWithGroupIn
-