Interface UserDao


  • public interface UserDao
    Provides an interface with methods that perform actions on the User table of the database.
    • Method Detail

      • insert

        Single<Long> insert​(User user)
        Inserts a single user into the database.
        Parameters:
        user - The user to be inserted.
        Returns:
        A Single holding the id of the user that was inserted.
      • insert

        Single<List<Long>> insert​(User... users)
        Inserts multiple users into the database.
        Parameters:
        users - The users to be inserted.
        Returns:
        A Single holding a List of ids of the the users that were inserted.
      • insert

        Single<List<Long>> insert​(Collection<User> users)
        Inserts multiple users into the database.
        Parameters:
        users - The users to be inserted.
        Returns:
        A Single holding a List of ids of the the users that were inserted.
      • update

        Single<Integer> update​(User user)
        Updates a single user in the database.
        Parameters:
        user - The user to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(User... users)
        Updates multiple users in the database.
        Parameters:
        users - The users to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Collection<User> users)
        Updates multiple users in the database.
        Parameters:
        users - The users to be updated.
        Returns:
        A Single holding the number of updates performed.
      • delete

        Single<Integer> delete​(User user)
        Deletes a single user from the database.
        Parameters:
        user - The user to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(User... users)
        Deletes multiple users from the database.
        Parameters:
        users - The users to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Collection<User> users)
        Deletes multiple users from the database.
        Parameters:
        users - The users to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • findByUserId

        LiveData<User> findByUserId​(long id)
        Queries the database for a specific user, based on id.
        Parameters:
        id - The user's id.
        Returns:
        LiveData of the selected user.
      • findByOauthKey

        Maybe<User> findByOauthKey​(String oauthKey)
        Queries the database for a specific user, based on OAuth key.
        Parameters:
        oauthKey - The user's OAuth key.
        Returns:
        LiveData of the selected user.