com.google.code.ssm.test.dao
Interface AppUserDAO

All Known Implementing Classes:
AppUserDAOImpl

public interface AppUserDAO

Author:
Jakub BiaƂek

Method Summary
 AppUserPK create(AppUser entity)
           
 List<Integer> getAppIdList(int userId, boolean enbled)
           
 AppUser getByPk(AppUserPK pk)
           
 AppUser getByPKFromDB(AppUserPK pk)
           
 List<AppUser> getList(int userId, List<Integer> appsIds)
           
 List<AppUser> getUsersList(int applicationId, List<Integer> userIds)
           
 List<AppUser> getUsersListFromCache(int applicationId, List<Integer> usersIds, Collection<Integer> notFoundUsersIds)
          Fetch AppUser entities from remote cache (memcached).
 void remove(AppUserPK pk)
           
 AppUser update(AppUser entity)
           
 void updateListInCache(int userId, boolean authorized, List<Integer> appsIdsList)
           
 

Method Detail

create

AppUserPK create(AppUser entity)

getAppIdList

List<Integer> getAppIdList(int userId,
                           boolean enbled)

getByPk

AppUser getByPk(AppUserPK pk)

getByPKFromDB

AppUser getByPKFromDB(AppUserPK pk)

getList

List<AppUser> getList(int userId,
                      List<Integer> appsIds)
Parameters:
userId - the user ID
appsIds - sorted list of applications' IDs in ASC order
Returns:
list of entities

getUsersList

List<AppUser> getUsersList(int applicationId,
                           List<Integer> userIds)
Parameters:
applicationId - the ID of application
userIds - sorted list of users IDs
Returns:
list of entities

getUsersListFromCache

List<AppUser> getUsersListFromCache(int applicationId,
                                    List<Integer> usersIds,
                                    Collection<Integer> notFoundUsersIds)
Fetch AppUser entities from remote cache (memcached).

Parameters:
applicationId - ID of application
usersIds - list of users IDs to fetch
notFoundUsersIds - collection with users IDs that weren't found in cache
Returns:
list of users of given application with given IDs from cache

remove

void remove(AppUserPK pk)

update

AppUser update(AppUser entity)

updateListInCache

void updateListInCache(int userId,
                       boolean authorized,
                       List<Integer> appsIdsList)


Copyright © 2014. All rights reserved.