Class MongoFriendDao

java.lang.Object
dev.getelements.elements.dao.mongo.MongoFriendDao
All Implemented Interfaces:
FriendDao

public class MongoFriendDao extends Object implements FriendDao
  • Constructor Details

    • MongoFriendDao

      public MongoFriendDao()
  • Method Details

    • getFriendsForUser

      public Pagination<Friend> getFriendsForUser(User user, int offset, int count)
      Description copied from interface: FriendDao
      Fetches all Friend instances for the supplied User.
      Specified by:
      getFriendsForUser in interface FriendDao
      Parameters:
      user - the User
      offset - the offset
      count - the number of results to return
      Returns:
      a Pagination<Friend>
    • getFriendsForUser

      public Pagination<Friend> getFriendsForUser(User user, int offset, int count, String search)
      Description copied from interface: FriendDao
      Fetches all Friend instances for the supplied User, specifying search query.
      Specified by:
      getFriendsForUser in interface FriendDao
      Parameters:
      user - the User
      offset - the offset
      count - the number of results to return
      search - the search query which will be used to filter the returned Friend instances
      Returns:
      a Pagination<Friend>
    • getFriendForUser

      public Friend getFriendForUser(User user, String friendId)
      Description copied from interface: FriendDao
      Returns a single instance of Friend for the supplied User. Throwing a NotFoundException if the friend does not exist for the supplied User.
      Specified by:
      getFriendForUser in interface FriendDao
      Parameters:
      user - the User
      friendId - the id of the friend as returned by Friend.getId()
      Returns:
      the Friend instance, never null
    • getAllMongoFriendshipsForUser

      public List<MongoFriendship> getAllMongoFriendshipsForUser(MongoUser mongoUser)
    • deleteFriendForUser

      public void deleteFriendForUser(User user, String friendId)
      Description copied from interface: FriendDao
      Deletes the single instance of Friend for the supplied User. Throwing a NotFoundException if the friend does not exist for the supplied User.
      Specified by:
      deleteFriendForUser in interface FriendDao
      Parameters:
      user - the User
      friendId - the id of the friend as returned by Friend.getId()
    • getDatastore

      public dev.morphia.Datastore getDatastore()
    • setDatastore

      @Inject public void setDatastore(dev.morphia.Datastore datastore)
    • getValidationHelper

      public ValidationHelper getValidationHelper()
    • setValidationHelper

      @Inject public void setValidationHelper(ValidationHelper validationHelper)
    • getMongoDBUtils

      public MongoDBUtils getMongoDBUtils()
    • setMongoDBUtils

      @Inject public void setMongoDBUtils(MongoDBUtils mongoDBUtils)
    • getMapperRegistry

      public MapperRegistry getMapperRegistry()
    • setMapperRegistry

      @Inject public void setMapperRegistry(MapperRegistry dozerMapperRegistry)
    • getMongoUserDao

      public MongoUserDao getMongoUserDao()
    • setMongoUserDao

      @Inject public void setMongoUserDao(MongoUserDao mongoUserDao)
    • getMongoProfileDao

      public MongoProfileDao getMongoProfileDao()
    • setMongoProfileDao

      @Inject public void setMongoProfileDao(MongoProfileDao mongoProfileDao)