public interface DbUserDAO extends DAO
DbUserDAO
defines a type for performing CRUD operations on instances of DbUser
.Modifier and Type | Method and Description |
---|---|
DbUser |
get(Guid id)
Retrieves the suser with the specified id.
|
List<DbUser> |
getAll()
Retrieves all defined used.
|
List<DbUser> |
getAllForVm(Guid id)
Retrieves all users associated with the specified virtual machine.
|
List<DbUser> |
getAllTimeLeasedUsersForVm(int vmid)
Retrieves all users associated with the specified virtual machine id.
|
List<user_sessions> |
getAllUserSessions()
Retrieves all sessions.
|
List<DbUser> |
getAllWithQuery(String query)
Retrieves all users who meet some arbitrary SQL query.
|
DbUser |
getByUsername(String username)
Retrieves a user by username.
|
void |
remove(Guid user)
Removes the user with the specified id.
|
void |
removeAllSessions()
Removes all user sessions.
|
void |
removeUserSession(String session,
Guid user)
Removes the specified session for the specified user.
|
void |
removeUserSessions(Map<String,Guid> sessionmap)
Removes the specified user sessions.
|
void |
save(DbUser user)
Saves the user.
|
void |
saveSession(user_sessions session)
Saves the specified user session.
|
void |
update(DbUser user)
Updates the specified user in the database.
|
DbUser get(Guid id)
id
- the idnull
if the id was invalidDbUser getByUsername(String username)
username
- the usernameList<DbUser> getAllForVm(Guid id)
id
- the VM idList<DbUser> getAllTimeLeasedUsersForVm(int vmid)
vmid
- the virtual machine idList<DbUser> getAllWithQuery(String query)
query
- the queryList<user_sessions> getAllUserSessions()
void save(DbUser user)
user
- the uservoid saveSession(user_sessions session)
session
- the sessionvoid update(DbUser user)
user
- the uservoid remove(Guid user)
user
- the user idvoid removeUserSession(String session, Guid user)
session
- the sessionuser
- the uservoid removeUserSessions(Map<String,Guid> sessionmap)
sessionmap
- the session mapvoid removeAllSessions()
Copyright © 2012. All Rights Reserved.