Package sk.gursky.films.persist.users
Class MemoryUserDao
java.lang.Object
sk.gursky.films.persist.users.MemoryUserDao
- All Implemented Interfaces:
UserDao
public class MemoryUserDao extends java.lang.Object implements UserDao
-
Constructor Summary
Constructors Constructor Description MemoryUserDao()
-
Method Summary
Modifier and Type Method Description java.lang.String
authorizeAndGetToken(java.lang.String name, java.lang.String password)
User
authorizeByToken(java.lang.String token)
java.util.List<java.lang.String>
conflict(User user)
void
deleteToken(java.lang.String token)
java.util.List<User>
getAll()
java.util.List<User>
getByGroupId(java.lang.Long groupId)
User
getById(java.lang.Long userId)
MyUser
getMyUserById(java.lang.Long userId)
java.util.List<SimpleUser>
getSimpleUsers()
boolean
remove(java.lang.Long userId)
User
save(User user)
-
Constructor Details
-
MemoryUserDao
public MemoryUserDao()
-
-
Method Details
-
getMyUserById
- Specified by:
getMyUserById
in interfaceUserDao
-
getAll
-
getSimpleUsers
- Specified by:
getSimpleUsers
in interfaceUserDao
-
getByGroupId
- Specified by:
getByGroupId
in interfaceUserDao
-
save
- Specified by:
save
in interfaceUserDao
- Throws:
DaoException
-
conflict
-
remove
public boolean remove(java.lang.Long userId) -
authorizeAndGetToken
public java.lang.String authorizeAndGetToken(java.lang.String name, java.lang.String password)- Specified by:
authorizeAndGetToken
in interfaceUserDao
-
authorizeByToken
- Specified by:
authorizeByToken
in interfaceUserDao
-
getById
-
deleteToken
public void deleteToken(java.lang.String token)- Specified by:
deleteToken
in interfaceUserDao
-