Class MongoFriendDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoFriendDao
- All Implemented Interfaces:
FriendDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteFriendForUser
(User user, String friendId) getAllMongoFriendshipsForUser
(MongoUser mongoUser) dev.morphia.Datastore
getFriendForUser
(User user, String friendId) getFriendsForUser
(User user, int offset, int count) getFriendsForUser
(User user, int offset, int count, String search) void
setDatastore
(dev.morphia.Datastore datastore) void
setMapperRegistry
(MapperRegistry dozerMapperRegistry) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils) void
setMongoProfileDao
(MongoProfileDao mongoProfileDao) void
setMongoUserDao
(MongoUserDao mongoUserDao) void
setValidationHelper
(ValidationHelper validationHelper)
-
Constructor Details
-
MongoFriendDao
public MongoFriendDao()
-
-
Method Details
-
getFriendsForUser
Description copied from interface:FriendDao
- Specified by:
getFriendsForUser
in interfaceFriendDao
- Parameters:
user
- theUser
offset
- the offsetcount
- the number of results to return- Returns:
- a
Pagination<Friend>
-
getFriendsForUser
Description copied from interface:FriendDao
- Specified by:
getFriendsForUser
in interfaceFriendDao
- Parameters:
user
- theUser
offset
- the offsetcount
- the number of results to returnsearch
- the search query which will be used to filter the returnedFriend
instances- Returns:
- a
Pagination<Friend>
-
getFriendForUser
Description copied from interface:FriendDao
Returns a single instance ofFriend
for the suppliedUser
. Throwing aNotFoundException
if the friend does not exist for the suppliedUser
.- Specified by:
getFriendForUser
in interfaceFriendDao
- Parameters:
user
- theUser
friendId
- the id of the friend as returned byFriend.getId()
- Returns:
- the
Friend
instance, never null
-
getAllMongoFriendshipsForUser
-
deleteFriendForUser
Description copied from interface:FriendDao
Deletes the single instance ofFriend
for the suppliedUser
. Throwing aNotFoundException
if the friend does not exist for the suppliedUser
.- Specified by:
deleteFriendForUser
in interfaceFriendDao
- Parameters:
user
- theUser
friendId
- the id of the friend as returned byFriend.getId()
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getMapperRegistry
-
setMapperRegistry
-
getMongoUserDao
-
setMongoUserDao
-
getMongoProfileDao
-
setMongoProfileDao
-