Package jetbrains.buildServer.users.impl
Class UserAttributeStorageImpl
- java.lang.Object
-
- jetbrains.buildServer.users.impl.UserAttributeStorageImpl
-
- All Implemented Interfaces:
UserAttributeStorage
public class UserAttributeStorageImpl extends Object implements UserAttributeStorage
- Author:
- Sergey Pestrikov
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.users.UserAttributeStorage
UserAttributeStorage.InvalidAttributeKeyException, UserAttributeStorage.UserAttributeException, UserAttributeStorage.UserAttributePersistingException
-
-
Constructor Summary
Constructors Constructor Description UserAttributeStorageImpl(SQLRunnerEx sqlRunner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
delete(long userId, String attributeKey)
Delete user attributevoid
deleteAll(long userId)
Delete all user attributesMap<String,String>
findAll(long userId)
Find all user attributesList<Long>
findUsersIdsByAttributeValue(String attributeKey, String attributeValue, boolean caseSensitive)
void
save(long userId, String attributeKey, String attributeValue)
Insert new user attribute or update existing one
-
-
-
Constructor Detail
-
UserAttributeStorageImpl
public UserAttributeStorageImpl(@NotNull SQLRunnerEx sqlRunner)
-
-
Method Detail
-
findAll
@NotNull public Map<String,String> findAll(long userId)
Description copied from interface:UserAttributeStorage
Find all user attributes- Specified by:
findAll
in interfaceUserAttributeStorage
- Parameters:
userId
- user id- Returns:
- a mapping of user attributes keys to their values
-
delete
public boolean delete(long userId, @NotNull String attributeKey)
Description copied from interface:UserAttributeStorage
Delete user attribute- Specified by:
delete
in interfaceUserAttributeStorage
- Parameters:
userId
- user idattributeKey
- attribute key- Returns:
- true if the attribute with specified key was deleted and false otherwise
-
deleteAll
public void deleteAll(long userId)
Description copied from interface:UserAttributeStorage
Delete all user attributes- Specified by:
deleteAll
in interfaceUserAttributeStorage
- Parameters:
userId
- user id
-
save
public void save(long userId, @NotNull String attributeKey, @NotNull String attributeValue)
Description copied from interface:UserAttributeStorage
Insert new user attribute or update existing one- Specified by:
save
in interfaceUserAttributeStorage
- Parameters:
userId
- user idattributeKey
- attribute keyattributeValue
- attribute value
-
findUsersIdsByAttributeValue
public List<Long> findUsersIdsByAttributeValue(@NotNull String attributeKey, @NotNull String attributeValue, boolean caseSensitive)
- Specified by:
findUsersIdsByAttributeValue
in interfaceUserAttributeStorage
-
-