Class MongoFriendDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoFriendDao
- All Implemented Interfaces:
FriendDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteFriendForUser(User user, String friendId) getAllMongoFriendshipsForUser(MongoUser mongoUser) dev.morphia.DatastoregetFriendForUser(User user, String friendId) getFriendsForUser(User user, int offset, int count) getFriendsForUser(User user, int offset, int count, String search) voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapperRegistry(MapperRegistry dozerMapperRegistry) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoProfileDao(MongoProfileDao mongoProfileDao) voidsetMongoUserDao(MongoUserDao mongoUserDao) voidsetValidationHelper(ValidationHelper validationHelper)
-
Constructor Details
-
MongoFriendDao
public MongoFriendDao()
-
-
Method Details
-
getFriendsForUser
Description copied from interface:FriendDao- Specified by:
getFriendsForUserin interfaceFriendDao- Parameters:
user- theUseroffset- the offsetcount- the number of results to return- Returns:
- a
Pagination<Friend>
-
getFriendsForUser
Description copied from interface:FriendDao- Specified by:
getFriendsForUserin interfaceFriendDao- Parameters:
user- theUseroffset- the offsetcount- the number of results to returnsearch- the search query which will be used to filter the returnedFriendinstances- Returns:
- a
Pagination<Friend>
-
getFriendForUser
Description copied from interface:FriendDaoReturns a single instance ofFriendfor the suppliedUser. Throwing aNotFoundExceptionif the friend does not exist for the suppliedUser.- Specified by:
getFriendForUserin interfaceFriendDao- Parameters:
user- theUserfriendId- the id of the friend as returned byFriend.getId()- Returns:
- the
Friendinstance, never null
-
getAllMongoFriendshipsForUser
-
deleteFriendForUser
Description copied from interface:FriendDaoDeletes the single instance ofFriendfor the suppliedUser. Throwing aNotFoundExceptionif the friend does not exist for the suppliedUser.- Specified by:
deleteFriendForUserin interfaceFriendDao- Parameters:
user- theUserfriendId- 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
-