com.google.code.ssm.test.dao
Class AppUserDAOImpl
java.lang.Object
com.google.code.ssm.test.dao.AppUserDAOImpl
- All Implemented Interfaces:
- AppUserDAO
@Service
public class AppUserDAOImpl
- extends Object
- implements AppUserDAO
- Author:
- Jakub BiaĆek
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppUserDAOImpl
public AppUserDAOImpl()
create
public AppUserPK create(AppUser entity)
- Specified by:
create in interface AppUserDAO
getByPk
public AppUser getByPk(AppUserPK pk)
- Specified by:
getByPk in interface AppUserDAO
update
public AppUser update(AppUser entity)
- Specified by:
update in interface AppUserDAO
remove
public void remove(AppUserPK pk)
- Specified by:
remove in interface AppUserDAO
getList
public List<AppUser> getList(int userId,
List<Integer> appsIds)
- Specified by:
getList in interface AppUserDAO
- Parameters:
userId - the user IDappsIds - sorted list of applications' IDs in ASC order
- Returns:
- list of entities
getAppIdList
public List<Integer> getAppIdList(int userId,
boolean authorized)
- Specified by:
getAppIdList in interface AppUserDAO
getUsersList
public List<AppUser> getUsersList(int applicationId,
List<Integer> userIds)
- Specified by:
getUsersList in interface AppUserDAO
- Parameters:
applicationId - the ID of applicationuserIds - sorted list of users IDs
- Returns:
- list of entities
getUsersListFromCache
public List<AppUser> getUsersListFromCache(int applicationId,
List<Integer> usersIds,
Collection<Integer> notFoundUsersIds)
- Description copied from interface:
AppUserDAO
- Fetch
AppUser entities from remote cache (memcached).
- Specified by:
getUsersListFromCache in interface AppUserDAO
- Parameters:
applicationId - ID of applicationusersIds - list of users IDs to fetchnotFoundUsersIds - collection with users IDs that weren't found in cache
- Returns:
- list of users of given application with given IDs from cache
updateListInCache
public void updateListInCache(int userId,
boolean authorized,
List<Integer> appsIdsList)
- Specified by:
updateListInCache in interface AppUserDAO
getByPKFromDB
public AppUser getByPKFromDB(AppUserPK pk)
- Specified by:
getByPKFromDB in interface AppUserDAO
Copyright © 2014. All rights reserved.